diff options
author | Peng Wu <alexepico@gmail.com> | 2012-11-14 15:31:11 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-11-14 15:31:18 +0800 |
commit | 1c3139f0910b3d382247698f8831439c3314f4dc (patch) | |
tree | e30b6bb631660a7ccb04756b112bb5b6ae72275a /src/lookup | |
parent | e007f82e9b6bd208f4a32da82f52fef7965361a3 (diff) | |
download | libpinyin-1c3139f0910b3d382247698f8831439c3314f4dc.tar.gz |
fixes one step constraint in get_best_match
Diffstat (limited to 'src/lookup')
-rw-r--r-- | src/lookup/pinyin_lookup2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp index 24c0fee..46ec141 100644 --- a/src/lookup/pinyin_lookup2.cpp +++ b/src/lookup/pinyin_lookup2.cpp @@ -265,6 +265,9 @@ bool PinyinLookup2::get_best_match(TokenVector prefixes, search_unigram2(topresults, i, ranges); } + if (CONSTRAINT_ONESTEP == next_constraint->m_type) + break; + /* no longer pinyin */ if (!(result & SEARCH_CONTINUED)) break; |