Skip to content

Commit

Permalink
修复suggest_freq中add_word指向的bug (fxsjy#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
linhx13 authored and fxsjy committed Jul 1, 2019
1 parent 3645a5b commit 38134ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jieba/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 449,7 @@ def suggest_freq(self, segment, tune=False):
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):
Expand Down

0 comments on commit 38134ee

Please sign in to comment.