summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-10-22 10:15:27 +0800
committerPeng Wu <alexepico@gmail.com>2011-10-22 10:15:27 +0800
commit86771016e43aab669a3866ccbad4962689633194 (patch)
tree5e43a513d1410632bc76d26c49ca30a2557f774d /scripts
parentdf20383358485ac69158b6dd4bec1a3c2e5bf9ea (diff)
downloadlibpinyin-86771016e43aab669a3866ccbad4962689633194.tar.gz
libpinyin-86771016e43aab669a3866ccbad4962689633194.tar.xz
libpinyin-86771016e43aab669a3866ccbad4962689633194.zip
begin to write chewing key
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genpytable.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/genpytable.py b/scripts/genpytable.py
index dff65dd..d887793 100644
--- a/scripts/genpytable.py
+++ b/scripts/genpytable.py
@@ -66,6 +66,10 @@ def get_chewing(pinyin_key):
if middle == "CHEWING_U" and final == "CHEWING_ENG":
middle, final = "CHEWING_ZERO_MIDDLE", "PINYIN_ONG"
+ #handle "veng"/"iong"
+ if middle == "CHEWING_V" and final == "CHEWING_ENG":
+ middle, final = "CHEWING_I", "PINYIN_ONG"
+
#handle "ien"/"in"
if middle == "CHEWING_I" and final == "CHEWING_EN":
middle, final = "CHEWING_ZERO_MIDDLE", "PINYIN_IN"
@@ -82,5 +86,5 @@ if __name__ == "__main__":
#pre-check here
check_pinyin_chewing_map()
#dump
- for pinyin_key in pinyin.PINYIN_DICT.keys():
+ for pinyin_key in sorted(pinyin.PINYIN_DICT.keys()):
print (pinyin_key, get_chewing(pinyin_key))