From d92850fa529561d8e3cb9dfdc28a6280ce3fc81a Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Sun, 29 Jan 2012 10:26:17 +0800 Subject: fixes pinyin parsers --- src/storage/pinyin_parser2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index deef306..4ab36aa 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -526,6 +526,7 @@ bool FullPinyinParser2::post_process(pinyin_option_t options, bool DoublePinyinParser2::parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const { + options &= ~(PINYIN_CORRECT_ALL|PINYIN_AMB_ALL); if (1 == len) { if (!(options & PINYIN_INCOMPLETE)) @@ -548,7 +549,7 @@ bool DoublePinyinParser2::parse_one_key(pinyin_option_t options, } ChewingTone tone = CHEWING_ZERO_TONE; - options &= ~(PINYIN_CORRECT_ALL|PINYIN_AMB_ALL); + options &= ~(PINYIN_INCOMPLETE|CHEWING_INCOMPLETE); /* parse tone */ if (3 == len) { @@ -718,6 +719,7 @@ static bool search_chewing_tones(const chewing_tone_item_t * tone_table, bool ChewingParser2::parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const { + options &= ~(PINYIN_CORRECT_ALL|PINYIN_AMB_ALL); char tone = CHEWING_ZERO_TONE; int symbols_len = len; -- cgit