Markov: remove debugging noise that snuck in via 42d414a0a4
This commit is contained in:
parent
1945637752
commit
a73aec8ff0
@ -320,7 +320,6 @@ class Markov(Module):
|
|||||||
if line != '':
|
if line != '':
|
||||||
words = line.split()
|
words = line.split()
|
||||||
target_word = words[random.randint(0, len(words)-1)]
|
target_word = words[random.randint(0, len(words)-1)]
|
||||||
print('target word ' + target_word)
|
|
||||||
|
|
||||||
# start with an empty chain, and work from there
|
# start with an empty chain, and work from there
|
||||||
gen_words = [self.start1, self.start2]
|
gen_words = [self.start1, self.start2]
|
||||||
@ -328,7 +327,6 @@ class Markov(Module):
|
|||||||
# walk a chain, randomly, building the list of words
|
# walk a chain, randomly, building the list of words
|
||||||
while len(gen_words) < max_size + 2 and gen_words[-1] != self.stop:
|
while len(gen_words) < max_size + 2 and gen_words[-1] != self.stop:
|
||||||
key_hits = self._retrieve_chains_for_key(gen_words[-2], gen_words[-1])
|
key_hits = self._retrieve_chains_for_key(gen_words[-2], gen_words[-1])
|
||||||
print(key_hits)
|
|
||||||
# use the chain that includes the target word, if it is found
|
# use the chain that includes the target word, if it is found
|
||||||
if target_word != '' and target_word in key_hits:
|
if target_word != '' and target_word in key_hits:
|
||||||
gen_words.append(target_word)
|
gen_words.append(target_word)
|
||||||
|
Loading…
Reference in New Issue
Block a user