From 9ec74d0e35795a9b4d1ce307f61ee26fc61322ad Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 5 Oct 2012 17:09:04 -0500 Subject: [PATCH] Markov: off by one while counting up to min_size --- modules/Markov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Markov.py b/modules/Markov.py index 8e9f25b..d966b2f 100644 --- a/modules/Markov.py +++ b/modules/Markov.py @@ -409,7 +409,7 @@ class Markov(Module): self.log.debug("gen_words: {0:s}".format(" ".join(gen_words))) # tack a new chain onto the list and resume if we're too short - if gen_words[-1] == self.stop and len(gen_words) < min_size + 2: + if gen_words[-1] == self.stop and len(gen_words) < min_size + 3: self.log.debug("starting a new chain on end of old one") # chop off the end text, if it was the keyword indicating an end of chain