summaryrefslogtreecommitdiffstats
path: root/scripts2/chewing.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-09-06 15:55:47 +0800
committerPeng Wu <alexepico@gmail.com>2015-09-06 15:55:47 +0800
commit0e2cbd36b424ba10cc329662d3aca443ad414363 (patch)
tree43f7c6d409c8bf6d55995d466161f53afa90a3cb /scripts2/chewing.py
parent4c6198bb8862fcba958afb7c31e0d74b13647017 (diff)
downloadlibpinyin-0e2cbd36b424ba10cc329662d3aca443ad414363.tar.gz
libpinyin-0e2cbd36b424ba10cc329662d3aca443ad414363.tar.xz
libpinyin-0e2cbd36b424ba10cc329662d3aca443ad414363.zip
rename gen_table_index to gen_table_index_for_chewing_key
Diffstat (limited to 'scripts2/chewing.py')
-rw-r--r--scripts2/chewing.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/scripts2/chewing.py b/scripts2/chewing.py
index e6c9fd9..c3eab03 100644
--- a/scripts2/chewing.py
+++ b/scripts2/chewing.py
@@ -146,26 +146,6 @@ def gen_tones():
'CHEWING_NUMBER_OF_TONES')
-def gen_table_index(content_table):
- entries = []
- for i in range(0, len(CHEWING_INITIAL_LIST)):
- initial = CHEWING_INITIAL_LIST[i]
- for m in range(0, len(CHEWING_MIDDLE_LIST)):
- middle = CHEWING_MIDDLE_LIST[m]
- for f in range(0, len(CHEWING_FINAL_LIST)):
- final = CHEWING_FINAL_LIST[f]
- chewingkey = 'ChewingKey({0}, {1}, {2})'.format(initial, middle, final)
- index = -1
- try:
- index = [x[4] for x in content_table].index(chewingkey)
- except ValueError:
- pass
-
- entry = '{0:<7} /* {1} */'.format(index, chewingkey)
- entries.append(entry)
- return ",\n".join(entries)
-
-
### main function ###
if __name__ == "__main__":
print(ASCII_CHEWING_INITIAL_LIST)