summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-10-19 12:57:20 +0800
committerPeng Wu <alexepico@gmail.com>2015-10-19 12:57:20 +0800
commite19961b71aacaa4136c0a7e603aabcddd09de054 (patch)
treed26251e36062184d396c5965189c11b625f06339
parent105517b9e8aa729cfdda104ee3ded16ad8959d1a (diff)
downloadlibpinyin-e19961b71aacaa4136c0a7e603aabcddd09de054.tar.gz
libpinyin-e19961b71aacaa4136c0a7e603aabcddd09de054.tar.xz
libpinyin-e19961b71aacaa4136c0a7e603aabcddd09de054.zip
update scripts1.2.91
-rw-r--r--scripts2/fullpinyintable.py10
-rw-r--r--scripts2/generateheader.py2
2 files changed, 7 insertions, 5 deletions
diff --git a/scripts2/fullpinyintable.py b/scripts2/fullpinyintable.py
index 8c7d4ae..ef0a6a2 100644
--- a/scripts2/fullpinyintable.py
+++ b/scripts2/fullpinyintable.py
@@ -165,9 +165,9 @@ def gen_u_to_v():
#pinyin table
content_table = []
pinyin_index = []
-luoma_pinyin_index = []
zhuyin_index = []
shuffle_zhuyin_index = []
+luoma_pinyin_index = []
secondary_zhuyin_index = []
hsu_zhuyin_index = []
eten26_zhuyin_index = []
@@ -246,9 +246,9 @@ def sort_all():
#remove duplicates
content_table = list(set(content_table))
pinyin_index = list(set(pinyin_index))
- luoma_pinyin_index = list(set(luoma_pinyin_index))
zhuyin_index = list(set(zhuyin_index))
shuffle_zhuyin_index = list(set(shuffle_zhuyin_index))
+ luoma_pinyin_index = list(set(luoma_pinyin_index))
secondary_zhuyin_index = list(set(secondary_zhuyin_index))
hsu_zhuyin_index = list(set(hsu_zhuyin_index))
eten26_zhuyin_index = list(set(eten26_zhuyin_index))
@@ -261,9 +261,9 @@ def sort_all():
content_table.insert(0, ("", "", "", "", "ChewingKey()"))
#sort index
pinyin_index = sorted(pinyin_index, key=sortfunc)
- luoma_pinyin_index = sorted(luoma_pinyin_index, key=sortfunc)
zhuyin_index = sorted(zhuyin_index, key=sortfunc)
shuffle_zhuyin_index = sorted(shuffle_zhuyin_index, key=sortfunc)
+ luoma_pinyin_index = sorted(luoma_pinyin_index, key=sortfunc)
secondary_zhuyin_index = sorted(secondary_zhuyin_index, key=sortfunc)
hsu_zhuyin_index = sorted(hsu_zhuyin_index, key=sortfunc)
eten26_zhuyin_index = sorted(eten26_zhuyin_index, key=sortfunc)
@@ -283,9 +283,9 @@ def get_sheng_yun(pinyin):
def gen_content_table():
entries = []
- for ((pinyin, zhuyin, luoma, second, chewing_key)) in content_table:
+ for ((pinyin, zhuyin, luoma, secondary, chewing_key)) in content_table:
(shengmu, yunmu) = get_sheng_yun(pinyin)
- entry = '{{"{0}", "{1}", "{2}", "{3}", "{4}", "{5}", {6}}}'.format(pinyin, shengmu, yunmu, zhuyin, luoma, second, chewing_key)
+ entry = '{{"{0}", "{1}", "{2}", "{3}", "{4}", "{5}", {6}}}'.format(pinyin, shengmu, yunmu, zhuyin, luoma, secondary, chewing_key)
entries.append(entry)
return ',\n'.join(entries)
diff --git a/scripts2/generateheader.py b/scripts2/generateheader.py
index 7e6b2ff..f91b843 100644
--- a/scripts2/generateheader.py
+++ b/scripts2/generateheader.py
@@ -91,6 +91,8 @@ def get_table_content(tablename):
if part == "TONES":
return gen_chewing_tones(scheme)
+ assert False, "No such table."
+
def expand_file(filename):
infile = open(filename, "r")