summaryrefslogtreecommitdiffstats
path: root/scripts/specialtable.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/specialtable.py')
-rw-r--r--scripts/specialtable.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/specialtable.py b/scripts/specialtable.py
index 41f9a26..89fa097 100644
--- a/scripts/specialtable.py
+++ b/scripts/specialtable.py
@@ -107,7 +107,11 @@ def gen_all_resplit():
def filter_resplit():
for (orig_first_key, orig_second_key, new_first_key, new_second_key) \
in gen_all_resplit():
- if not (new_first_key, new_second_key) in phrase_dict:
+ #do the reverse here, as libpinyin pinyin parser is different with
+ #ibus-pinyin's parser.
+ (orig_first_key, orig_second_key, new_first_key, new_second_key) = \
+ (new_first_key, new_second_key, orig_first_key, orig_second_key)
+ if (new_first_key, new_second_key) not in phrase_dict:
continue
orig_freq = 0
new_freq = phrase_dict[(new_first_key, new_second_key)]