Markov: check for start2-only lists correctly while working backwards
what i was doing before had practically no chance of working right, so that's fun
This commit is contained in:
parent
e8e4354358
commit
c064f6ebe1
@ -379,7 +379,7 @@ class Markov(Module):
|
||||
gen_words += working_backwards
|
||||
self.log.debug("gen_words: {0:s}".format(" ".join(gen_words)))
|
||||
break
|
||||
elif len(key_hits) == 1 and self.start2 in key_hits:
|
||||
elif len(filter(lambda a: a!= self.start2, key_hits)) == 0:
|
||||
self.log.debug("only start2 in key_hits, finishing")
|
||||
gen_words += working_backwards
|
||||
self.log.debug("gen_words: {0:s}".format(" ".join(gen_words)))
|
||||
|
Loading…
Reference in New Issue
Block a user