From 76f09ca801360d7ba5413f34eefd581d0199aeba Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 10 Feb 2012 16:53:11 +0800 Subject: improves pinyin parsers --- src/storage/pinyin_parser2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 494daad..80a525b 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -397,6 +397,15 @@ int FullPinyinParser2::parse (pinyin_option_t options, ChewingKeyVector & keys, nextstep->m_key.m_middle == CHEWING_ZERO_MIDDLE && nextstep->m_key.m_final == CHEWING_ZERO_FINAL)) *nextstep = value; + + /* "zheyanga$" -> "zhe'yang'a$" */ + if (value.m_parsed_len == len && + (nextstep->m_key.m_initial != CHEWING_ZERO_INITIAL && + nextstep->m_key.m_final == CHEWING_A) && + (value.m_key.m_initial == CHEWING_ZERO_INITIAL && + value.m_key.m_middle == CHEWING_ZERO_MIDDLE && + value.m_key.m_final == CHEWING_A)) + *nextstep = value; } } } -- cgit