From 464727cc7461dfc1e3914cf00585923157564870 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 30 Jun 2016 23:16:13 -0500 Subject: [PATCH] markov: abandon min_words_per_sentence for lines was yielding too many short chains, i think --- dr_botzo/markov/lib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dr_botzo/markov/lib.py b/dr_botzo/markov/lib.py index 136f87c..6020d16 100644 --- a/dr_botzo/markov/lib.py +++ b/dr_botzo/markov/lib.py @@ -15,9 +15,8 @@ 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_per_sentence, + line += generate_longish_sentence(context, topics=topics, min_words=min_words, max_words=max_words, max_tries=max_tries) sentences += 1 if sentences >= max_sentences: