summaryrefslogtreecommitdiffstats
path: root/scripts/genspecialtable.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-09 15:02:13 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-09 15:03:55 +0800
commitaf7acd67e0b8649c2dcd79b2de7d4a6b20446d29 (patch)
tree38befba4712268641efaaa7fa5477b1d70e75e67 /scripts/genspecialtable.py
parent266386321bc1ac40551e63977d58a68ff9abb8ce (diff)
downloadlibpinyin-af7acd67e0b8649c2dcd79b2de7d4a6b20446d29.tar.gz
libpinyin-af7acd67e0b8649c2dcd79b2de7d4a6b20446d29.tar.xz
libpinyin-af7acd67e0b8649c2dcd79b2de7d4a6b20446d29.zip
add origin freq for divided table
Diffstat (limited to 'scripts/genspecialtable.py')
-rw-r--r--scripts/genspecialtable.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/genspecialtable.py b/scripts/genspecialtable.py
index 0b03404..4393274 100644
--- a/scripts/genspecialtable.py
+++ b/scripts/genspecialtable.py
@@ -52,11 +52,12 @@ def get_chewing_string(pinyin):
def gen_divided_table():
entries = []
- for (pinyin_key, first_key, second_key, freq) in divided_list:
+ for (pinyin_key, orig_freq, first_key, second_key, new_freq) \
+ in divided_list:
(pinyin_key, first_key, second_key) = map \
(get_chewing_string, (pinyin_key, first_key, second_key))
- entry = '{{{0}, {1}, {2}, {3}}}'.format \
- (pinyin_key, first_key, second_key, freq)
+ entry = '{{{0}, {1}, {2}, {3}, {4}}}'.format \
+ (pinyin_key, orig_freq, first_key, second_key, new_freq)
entries.append(entry)
return ',\n'.join(entries)