markov: some debugging statements in longish

This commit is contained in:
Brian S. Stephan 2016-06-30 23:05:58 -05:00
parent ccfc5e7484
commit dcb7a0af4a
1 changed files with 3 additions and 0 deletions

View File

@ -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