修复suggest_freq中add_word指向的bug (#723)

pull/544/head^2
Hongxiang Lin 6 years ago committed by Sun Junyi
parent 3645a5bb5d
commit 38134ee20f

@ -449,7 +449,7 @@ class Tokenizer(object):
freq *= self.FREQ.get(seg, 1) / ftotal
freq = min(int(freq * self.total), self.FREQ.get(word, 0))
if tune:
add_word(word, freq)
self.add_word(word, freq)
return freq
def tokenize(self, unicode_sentence, mode="default", HMM=True):

Loading…
Cancel
Save