summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-09 14:31:04 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-09 14:31:04 +0800
commit266386321bc1ac40551e63977d58a68ff9abb8ce (patch)
tree2fb3ead6ac41f409b51c42f282041677ba1db304 /scripts
parent4f995dab994c66b68b4821e69f170ddc4c0285f7 (diff)
downloadlibpinyin-266386321bc1ac40551e63977d58a68ff9abb8ce.tar.gz
libpinyin-266386321bc1ac40551e63977d58a68ff9abb8ce.tar.xz
libpinyin-266386321bc1ac40551e63977d58a68ff9abb8ce.zip
revert re-split table
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genspecialtable.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/genspecialtable.py b/scripts/genspecialtable.py
index 0ef9d44..0b03404 100644
--- a/scripts/genspecialtable.py
+++ b/scripts/genspecialtable.py
@@ -68,17 +68,12 @@ def gen_resplit_table():
(orig_first_key, orig_second_key, new_first_key, new_second_key) = map\
(get_chewing_string, (orig_first_key, orig_second_key, \
new_first_key, new_second_key))
- if new_freq > orig_freq:
- if orig_freq == 0:
- benefit = 0.5
- else:
- benefit = 0.3
- elif orig_freq >= new_freq:
+ if orig_freq >= new_freq:
assert orig_freq > 0, "Expected orig_freq > 0 here."
- benefit = 0
- entry = '{{{0}, {1}, {2}, {3}, {4}}}'.format \
- (orig_first_key, orig_second_key, \
- new_first_key, new_second_key, benefit)
+
+ entry = '{{{0}, {1}, {2}, {3}, {4}, {5}}}'.format \
+ (orig_first_key, orig_second_key, orig_freq,\
+ new_first_key, new_second_key, new_freq)
entries.append(entry)
return ',\n'.join(entries)