Markov: off by one while counting up to min_size
Bu işleme şunda yer alıyor:
ebeveyn
7b2e3fa9aa
işleme
9ec74d0e35
@ -409,7 +409,7 @@ class Markov(Module):
|
|||||||
self.log.debug("gen_words: {0:s}".format(" ".join(gen_words)))
|
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
|
# 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")
|
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
|
# chop off the end text, if it was the keyword indicating an end of chain
|
||||||
|
|||||||
Yükleniyor…
x
Yeni konuda referans
Bir kullanıcı engelle