mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-24 00:00:05 +08:00
fix a bug of add_word
This commit is contained in:
parent
0125548a37
commit
5e6a2c4661
@ -276,6 +276,7 @@ def load_userdict(f):
|
|||||||
else:
|
else:
|
||||||
add_word(word, freq)
|
add_word(word, freq)
|
||||||
|
|
||||||
|
@require_initialized
|
||||||
def add_word(word, freq, tag=None):
|
def add_word(word, freq, tag=None):
|
||||||
global FREQ, trie, total, user_word_tag_tab
|
global FREQ, trie, total, user_word_tag_tab
|
||||||
freq = float(freq)
|
freq = float(freq)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user