summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-08-08 13:22:14 +0800
committerPeng Wu <alexepico@gmail.com>2013-08-08 13:22:14 +0800
commita50ef850d4f8af898317e7a7834083f8e30532f1 (patch)
treecd43f9ef1a49ef43a21530072672fdf3bb7ebd17 /src/storage
parent314568bc3dee76b2fc4a0f7f1ea7d06b4ca48bde (diff)
downloadlibzhuyin-a50ef850d4f8af898317e7a7834083f8e30532f1.tar.gz
libzhuyin-a50ef850d4f8af898317e7a7834083f8e30532f1.tar.xz
libzhuyin-a50ef850d4f8af898317e7a7834083f8e30532f1.zip
update codes
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/pinyin_custom2.h19
-rw-r--r--src/storage/pinyin_parser2.cpp5
2 files changed, 4 insertions, 20 deletions
diff --git a/src/storage/pinyin_custom2.h b/src/storage/pinyin_custom2.h
index 1d1ebe3..505cc36 100644
--- a/src/storage/pinyin_custom2.h
+++ b/src/storage/pinyin_custom2.h
@@ -61,25 +61,6 @@ enum PinyinAmbiguity2{
};
/**
- * PinyinCorrection2:
- *
- * The enums of pinyin corrections.
- *
- */
-
-enum PinyinCorrection2{
- PINYIN_CORRECT_GN_NG = 1U << 21,
- PINYIN_CORRECT_MG_NG = 1U << 22,
- PINYIN_CORRECT_IOU_IU = 1U << 23,
- PINYIN_CORRECT_UEI_UI = 1U << 24,
- PINYIN_CORRECT_UEN_UN = 1U << 25,
- PINYIN_CORRECT_UE_VE = 1U << 26,
- PINYIN_CORRECT_V_U = 1U << 27,
- PINYIN_CORRECT_ON_ONG = 1U << 28,
- PINYIN_CORRECT_ALL = 0xFFU << 21
-};
-
-/**
* @brief enums of Chewing Schemes.
*/
enum ChewingScheme
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 4c0c6f6..e3f43b2 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -45,6 +45,7 @@ static bool check_pinyin_options(pinyin_option_t options, const pinyin_index_ite
return false;
}
+#if 0
/* handle correct pinyin, currently only one flag per item. */
flags &= PINYIN_CORRECT_ALL;
options &= PINYIN_CORRECT_ALL;
@@ -53,6 +54,7 @@ static bool check_pinyin_options(pinyin_option_t options, const pinyin_index_ite
if ((flags & options) != flags)
return false;
}
+#endif
return true;
}
@@ -650,7 +652,8 @@ 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);
+ /* options &= ~(PINYIN_CORRECT_ALL|PINYIN_AMB_ALL); */
+ options &= ~PINYIN_AMB_ALL;
char tone = CHEWING_ZERO_TONE;
int symbols_len = len;