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: