From 9b5e8445bf8933d9d49fdb1a6ab6567ad86a9aad Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 30 Jun 2016 23:20:05 -0500 Subject: [PATCH] Revert "markov: abandon min_words_per_sentence for lines" This reverts commit 464727cc7461dfc1e3914cf00585923157564870. it turns out that without the min_words_per_sentence adjustment, the default min_words (15) is way too demanding on a lot of chains, so we're going to go back to this for the moment --- dr_botzo/markov/lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dr_botzo/markov/lib.py b/dr_botzo/markov/lib.py index c0394d9..03f9010 100644 --- a/dr_botzo/markov/lib.py +++ b/dr_botzo/markov/lib.py @@ -15,8 +15,9 @@ def generate_line(context, topics=None, min_words=15, max_words=30, max_sentence tries = 0 sentences = 0 line = [] + min_words_per_sentence = min_words / max_sentences while tries < max_tries: - line += generate_longish_sentence(context, topics=topics, min_words=min_words, + line += generate_longish_sentence(context, topics=topics, min_words=min_words_per_sentence, max_words=max_words, max_tries=max_tries) sentences += 1 if sentences >= max_sentences: