From abcaf3e47546192450e8fc84ccd05318adf14739 Mon Sep 17 00:00:00 2001 From: fxsjy Date: Sat, 14 Feb 2015 19:56:38 +0800 Subject: [PATCH] fix bug: load_userdict --- jieba/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jieba/__init__.py b/jieba/__init__.py index affefa3..4129554 100644 --- a/jieba/__init__.py +++ b/jieba/__init__.py @@ -332,8 +332,8 @@ def add_word(word, freq, tag=None): user_word_tag_tab[word] = tag for ch in xrange(len(word)): wfrag = word[:ch + 1] - if wfrag not in lfreq: - lfreq[wfrag] = 0 + if wfrag not in FREQ: + FREQ[wfrag] = 0 __ref_cut = cut __ref_cut_for_search = cut_for_search