summaryrefslogtreecommitdiffstats
path: root/src/lookup/phrase_lookup.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-03-31 14:28:32 +0800
committerPeng Wu <alexepico@gmail.com>2016-03-31 14:28:32 +0800
commite8c7c29acb9f039d97fff5ca7872564c754f535e (patch)
tree98ed04ffde91a45d1b6326d8a47f672580198e14 /src/lookup/phrase_lookup.cpp
parent93f272f43dd5cea6d6b96e7569a281736f077c33 (diff)
downloadlibpinyin-e8c7c29acb9f039d97fff5ca7872564c754f535e.tar.gz
libpinyin-e8c7c29acb9f039d97fff5ca7872564c754f535e.tar.xz
libpinyin-e8c7c29acb9f039d97fff5ca7872564c754f535e.zip
fixes src/lookup
Diffstat (limited to 'src/lookup/phrase_lookup.cpp')
-rw-r--r--src/lookup/phrase_lookup.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
index b22ef84..6e661ec 100644
--- a/src/lookup/phrase_lookup.cpp
+++ b/src/lookup/phrase_lookup.cpp
@@ -136,6 +136,8 @@ bool PhraseLookup::get_best_match(int sentence_length, ucs4_t sentence[],
for ( int i = 0; i < nstep - 1; ++i ){
for ( int m = i + 1; m < nstep; ++m ){
+ m_phrase_index->clear_tokens(tokens);
+
/* do one phrase table search. */
int result = m_phrase_table->search(m - i, sentence + i, tokens);