summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2010-01-18 16:24:02 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2010-01-18 16:24:02 +0800
commit56518df0f50db706a9331b04c1b866c7de0fd814 (patch)
tree8e9fb9c274243158031b201060f97aba8ad849c9 /scripts
parentea33ab8c6312d9cad4f371b61e276cb82ac8bf3d (diff)
downloadibus-libpinyin-56518df0f50db706a9331b04c1b866c7de0fd814.tar.gz
ibus-libpinyin-56518df0f50db706a9331b04c1b866c7de0fd814.tar.xz
ibus-libpinyin-56518df0f50db706a9331b04c1b866c7de0fd814.zip
Fix fuzzy and auto correct problem with 'rve rue'
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genpytable.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/genpytable.py b/scripts/genpytable.py
index 8abb2e1..70158a5 100644
--- a/scripts/genpytable.py
+++ b/scripts/genpytable.py
@@ -120,6 +120,14 @@ def get_pinyin():
for y in yunmu_list:
if s1 + y not in pinyin_list and s2 + y in pinyin_list:
yield s1 + y, s1, y, len(s1) + len(y), [flag]
+ for c, w in auto_correct:
+ if s1 + w not in pinyin_list and \
+ s1 + c not in pinyin_list and \
+ s2 + w not in pinyin_list and \
+ s2 + c in pinyin_list:
+ flag_correct = "PINYIN_CORRECT_%s_TO_%s" % (w.upper(), c.upper())
+ yield s1 + w, s2, c, len(s2) + len(w), ["%s | %s" % (flag, flag_correct)]
+
# if s2 + y not in pinyin_list and s1 + y in pinyin_list:
# yield s2 + y, s2, y, len (s2) + len(y), [flag]