summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-01-29 10:26:17 +0800
committerPeng Wu <alexepico@gmail.com>2012-01-29 10:43:53 +0800
commitb54a7e1600ba00d9886a0d17b0f923e40cf9672c (patch)
treed8d29b03a70610ff724d4567b003b5e0f344b89b
parenteea8efbb20177320550eedcbde9bfa2facfa6fa1 (diff)
downloadlibpinyin-b54a7e1600ba00d9886a0d17b0f923e40cf9672c.zip
libpinyin-b54a7e1600ba00d9886a0d17b0f923e40cf9672c.tar.gz
libpinyin-b54a7e1600ba00d9886a0d17b0f923e40cf9672c.tar.xz
fixes pinyin parsers
-rw-r--r--src/storage/pinyin_parser2.cpp4
1 files changed, 3 insertions, 1 deletions
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;