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:27:57 +0800
commitd92850fa529561d8e3cb9dfdc28a6280ce3fc81a (patch)
tree81b3c6f49256f705984f66a20090e4f8c0fce2e5
parentf53ffed3119c278b4e6e7d3db7579fc0eae195a0 (diff)
downloadlibpinyin-d92850fa529561d8e3cb9dfdc28a6280ce3fc81a.zip
libpinyin-d92850fa529561d8e3cb9dfdc28a6280ce3fc81a.tar.gz
libpinyin-d92850fa529561d8e3cb9dfdc28a6280ce3fc81a.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;