fix user dict tag bug : wrong buf index assigned

This commit is contained in:
bigelephant29 2016-07-21 10:06:24 +08:00
parent 8b75bf14a3
commit b82acaf71e

View File

@ -111,7 +111,7 @@ class DictTrie {
MakeNodeInfo(node_info, MakeNodeInfo(node_info,
buf[0], buf[0],
user_word_default_weight_, user_word_default_weight_,
(buf.size() == 2 ? buf[1] : UNKNOWN_TAG)); (buf.size() == 3 ? buf[2] : UNKNOWN_TAG));
static_node_infos_.push_back(node_info); static_node_infos_.push_back(node_info);
if (node_info.word.size() == 1) { if (node_info.word.size() == 1) {
user_dict_single_chinese_word_.insert(node_info.word[0]); user_dict_single_chinese_word_.insert(node_info.word[0]);