diff options
author | Peng Huang <shawn.p.huang@gmail.com> | 2009-09-30 19:46:22 +0800 |
---|---|---|
committer | Peng Huang <shawn.p.huang@gmail.com> | 2009-09-30 19:46:22 +0800 |
commit | 1caefa8402499902e5b89b2763c2ab5e75b06e37 (patch) | |
tree | 2f770d1d5e4778fd6e63e1dc4e3aa7bdb3c7553f | |
parent | 02413c97d10f845d9daa90425a132b90b87d7d9b (diff) | |
download | ibus-libpinyin-1caefa8402499902e5b89b2763c2ab5e75b06e37.tar.gz ibus-libpinyin-1caefa8402499902e5b89b2763c2ab5e75b06e37.tar.xz ibus-libpinyin-1caefa8402499902e5b89b2763c2ab5e75b06e37.zip |
Fix fuzzy pinyin problem with ian <=> iang
-rw-r--r-- | src/Config.cc | 2 | ||||
-rw-r--r-- | src/Types.h | 34 |
2 files changed, 4 insertions, 32 deletions
diff --git a/src/Config.cc b/src/Config.cc index ecf861f..3503632 100644 --- a/src/Config.cc +++ b/src/Config.cc @@ -74,6 +74,8 @@ static const struct { { StaticString ("FuzzyPinyin_ENG_EN"), PINYIN_FUZZY_ENG_EN, FALSE }, { StaticString ("FuzzyPinyin_IN_ING"), PINYIN_FUZZY_IN_ING, FALSE }, { StaticString ("FuzzyPinyin_ING_IN"), PINYIN_FUZZY_ING_IN, FALSE }, + { StaticString ("FuzzyPinyin_IAN_IANG"), PINYIN_FUZZY_IAN_IANG, FALSE }, + { StaticString ("FuzzyPinyin_IANG_IAN"), PINYIN_FUZZY_IANG_IAN, FALSE }, { StaticString ("FuzzyPinyin_UAN_UANG"), PINYIN_FUZZY_UAN_UANG, FALSE }, { StaticString ("FuzzyPinyin_UANG_UAN"), PINYIN_FUZZY_UANG_UAN, FALSE }, }; diff --git a/src/Types.h b/src/Types.h index 136a3c4..a49aee1 100644 --- a/src/Types.h +++ b/src/Types.h @@ -74,13 +74,7 @@ namespace PY { #define PINYIN_CORRECT_UEI_TO_UI (1 << 4) #define PINYIN_CORRECT_UEN_TO_UN (1 << 5) #define PINYIN_CORRECT_VE_TO_UE (1 << 6) -#define PINYIN_CORRECT_ALL \ - ( PINYIN_CORRECT_GN_TO_NG | \ - PINYIN_CORRECT_MG_TO_NG | \ - PINYIN_CORRECT_IOU_TO_IU | \ - PINYIN_CORRECT_UEI_TO_UI | \ - PINYIN_CORRECT_UEN_TO_UN | \ - PINYIN_CORRECT_VE_TO_UE) +#define PINYIN_CORRECT_ALL (0x0000007e) #define PINYIN_FUZZY_C_CH (1 << 7) #define PINYIN_FUZZY_CH_C (1 << 8) @@ -107,31 +101,7 @@ namespace PY { #define PINYIN_FUZZY_IANG_IAN (1 << 28) #define PINYIN_FUZZY_UAN_UANG (1 << 29) #define PINYIN_FUZZY_UANG_UAN (1 << 30) -#define PINYIN_FUZZY_ALL \ - ( PINYIN_FUZZY_C_CH | \ - PINYIN_FUZZY_CH_C | \ - PINYIN_FUZZY_Z_ZH | \ - PINYIN_FUZZY_ZH_Z | \ - PINYIN_FUZZY_S_SH | \ - PINYIN_FUZZY_SH_S | \ - PINYIN_FUZZY_L_N | \ - PINYIN_FUZZY_N_L | \ - PINYIN_FUZZY_F_H | \ - PINYIN_FUZZY_H_F | \ - PINYIN_FUZZY_L_R | \ - PINYIN_FUZZY_R_L | \ - PINYIN_FUZZY_K_G | \ - PINYIN_FUZZY_G_K | \ - PINYIN_FUZZY_AN_ANG | \ - PINYIN_FUZZY_ANG_AN | \ - PINYIN_FUZZY_EN_ENG | \ - PINYIN_FUZZY_ENG_EN | \ - PINYIN_FUZZY_IN_ING | \ - PINYIN_FUZZY_ING_IN | \ - PINYIN_FUZZY_IAN_IANG | \ - PINYIN_FUZZY_IANG_IAN | \ - PINYIN_FUZZY_UAN_UANG | \ - PINYIN_FUZZY_UANG_UAN ) +#define PINYIN_FUZZY_ALL (0x7fffff80) typedef struct _Pinyin Pinyin; struct _Pinyin { |