diff options
| author | Peng Wu <alexepico@gmail.com> | 2025-12-30 16:20:49 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2025-12-30 16:20:49 +0800 |
| commit | 219e7ab4e1364cbc9e246eb3122b8fed30ec7bfe (patch) | |
| tree | ff66d2fa17d958fa68390b91167e6aa7db96e728 | |
| parent | 8351ccc1a96f4dd3550b172e1989e3132cbac40c (diff) | |
| download | libpinyin-fuzzy-correct.tar.gz libpinyin-fuzzy-correct.tar.xz libpinyin-fuzzy-correct.zip | |
Update check_pinyin_options and check_chewing_options functionsfuzzy-correct
| -rw-r--r-- | src/storage/pinyin_parser2.cpp | 4 | ||||
| -rw-r--r-- | src/storage/zhuyin_parser2.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index ce640c3..47c5876 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -46,8 +46,8 @@ static bool check_pinyin_options(pinyin_option_t options, const pinyin_index_ite } /* handle correct pinyin, currently only one flag per item. */ - flags &= PINYIN_CORRECT_ALL; - options &= PINYIN_CORRECT_ALL; + flags &= PINYIN_CORRECT_ALL | PINYIN_AMB_ALL; + options &= PINYIN_CORRECT_ALL | PINYIN_AMB_ALL; if (flags) { if ((flags & options) != flags) diff --git a/src/storage/zhuyin_parser2.cpp b/src/storage/zhuyin_parser2.cpp index 3f14eab..4ef4500 100644 --- a/src/storage/zhuyin_parser2.cpp +++ b/src/storage/zhuyin_parser2.cpp @@ -26,6 +26,7 @@ #include "stl_lite.h" #include "pinyin_phrase3.h" #include "pinyin_custom2.h" +#include "zhuyin_custom2.h" #include "chewing_key.h" #include "pinyin_parser_table.h" #include "zhuyin_table.h" @@ -51,8 +52,8 @@ static bool check_chewing_options(pinyin_option_t options, const chewing_index_i } /* handle correct chewing, currently only one flag per item. */ - flags &= ZHUYIN_CORRECT_ALL; - options &= ZHUYIN_CORRECT_ALL; + flags &= ZHUYIN_CORRECT_ALL | ZHUYIN_AMB_ALL; + options &= ZHUYIN_CORRECT_ALL | ZHUYIN_AMB_ALL; if (flags) { if ((flags & options) != flags) |
