summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-06-20 16:03:46 +0800
committerPeng Wu <alexepico@gmail.com>2016-06-20 16:03:46 +0800
commit1ac3ccf02bf12678057ac0c6d89d4d3d41e5bdba (patch)
tree2e9948633b6dafe947ebfaa681b0c56334a4b970 /utils
parent8861bc3da5e49f0c0ae074593a72df3771d57ec6 (diff)
downloadlibpinyin-1ac3ccf02bf12678057ac0c6d89d4d3d41e5bdba.zip
libpinyin-1ac3ccf02bf12678057ac0c6d89d4d3d41e5bdba.tar.gz
libpinyin-1ac3ccf02bf12678057ac0c6d89d4d3d41e5bdba.tar.xz
fixes bugs
Diffstat (limited to 'utils')
-rw-r--r--utils/segment/spseg.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp
index b434e4a..5934270 100644
--- a/utils/segment/spseg.cpp
+++ b/utils/segment/spseg.cpp
@@ -106,6 +106,7 @@ bool segment(FacadePhraseTable3 * phrase_table,
ucs4_t * cur_phrase = phrase + i;
phrase_token_t token = null_token;
+ phrase_index->clear_tokens(tokens);
int result = phrase_table->search(len, cur_phrase, tokens);
int num = get_first_token(tokens, token);