summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMATSUU Takuto <matsuu@gentoo.org>2009-01-13 18:50:49 +0900
committerMATSUU Takuto <matsuu@gentoo.org>2009-01-13 18:50:49 +0900
commit31764f1f208178c890e3a8f33e50b8e971e9a111 (patch)
treeaf83bd26eb38a47a09227e56ffa9e95f696364f1
parent151f1f4ea685227c0381add295d96a7bd0bb82ad (diff)
downloadibus-anthy-31764f1f208178c890e3a8f33e50b8e971e9a111.tar.gz
Fix convert handling
-rw-r--r--engine/romaji.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/romaji.py b/engine/romaji.py
index 90437f1..34a1dde 100644
--- a/engine/romaji.py
+++ b/engine/romaji.py
@@ -56,6 +56,12 @@ class RomajiSegment(segment.Segment):
self._jachars = jachars
return [RomajiSegment(c)]
+ jachars, c = romaji_correction_rule.get(text, (None, None))
+ if jachars:
+ self._enchars = text[0]
+ self._jachars = jachars
+ return [RomajiSegment(c)]
+
for i in range(-min(4, len(text)), 0):
enchars = text[i:]
@@ -107,6 +113,11 @@ class RomajiSegment(segment.Segment):
self._enchars = c
return [RomajiSegment(text[0], jachars)]
+ jachars, c = romaji_correction_rule.get(text, (None, None))
+ if jachars:
+ self._enchars = c
+ return [RomajiSegment(text[0], jachars)]
+
for i in range(min(4, len(text)), 0, -1):
enchars = text[:i]