From dcb7a0af4a4dd0007257f6fb8144b5f81a50f8b6 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 30 Jun 2016 23:05:58 -0500 Subject: [PATCH] markov: some debugging statements in longish --- dr_botzo/markov/lib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dr_botzo/markov/lib.py b/dr_botzo/markov/lib.py index 54e767d..136f87c 100644 --- a/dr_botzo/markov/lib.py +++ b/dr_botzo/markov/lib.py @@ -42,7 +42,10 @@ def generate_longish_sentence(context, topics=None, min_words=15, max_words=30, while tries < max_tries: sent = generate_sentence(context, topics=topics, min_words=min_words, max_words=max_words) if len(sent) >= min_words: + log.debug("found a longish sentence, %s", sent) return sent + else: + log.debug("%s isn't long enough, going to try again", sent) tries += 1