diff options
| author | Peng Wu <alexepico@gmail.com> | 2012-01-12 12:30:19 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2012-01-12 12:30:19 +0800 |
| commit | 845f8ed78a9a1ffe2ac8adf7cdb111473bb997e4 (patch) | |
| tree | b00ea62f7c1e5bebea42abde1da0da0daeb90699 /scripts/specialtable.py | |
| parent | ee0b9cde31d362a95f514cbab043229940d04973 (diff) | |
| download | libpinyin-845f8ed78a9a1ffe2ac8adf7cdb111473bb997e4.tar.gz libpinyin-845f8ed78a9a1ffe2ac8adf7cdb111473bb997e4.tar.xz libpinyin-845f8ed78a9a1ffe2ac8adf7cdb111473bb997e4.zip | |
update pinyin parser
Diffstat (limited to 'scripts/specialtable.py')
| -rw-r--r-- | scripts/specialtable.py | 6 |
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)] |
