This commit is contained in:
bakatrouble 2019-11-27 22:41:59 +03:00
parent b821e96084
commit c90445aaf0

View File

@ -68,7 +68,7 @@ class MTG(object):
while not (len(gen_words) > size and w2 == '.'):
gen_words.append(w2.capitalize() if (w1 == '.') else w2)
w1, w2 = w2, random.choice(self.MC[w1 + '+' + w2])
gen_words.append(w2)
gen_words.append(w2)
text = ' '.join(gen_words)
text = text.replace(' ,', ',').replace(' .', '.')
return text