summaryrefslogtreecommitdiff
path: root/engine/tables.py
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2009-05-30 15:04:46 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2009-05-30 15:04:46 +0800
commitb8113559288c08e2f279bccf4e1eadb35a95e8b9 (patch)
treea9e349d879df556aa036f3b6c58b8c4f2e80339a /engine/tables.py
parentba22c5983d2d7987db530f99ed7db65338d1b877 (diff)
downloadibus-anthy-b8113559288c08e2f279bccf4e1eadb35a95e8b9.tar.gz
apply patch from Hideaki ABE.
Diffstat (limited to 'engine/tables.py')
-rw-r--r--engine/tables.py53
1 files changed, 42 insertions, 11 deletions
diff --git a/engine/tables.py b/engine/tables.py
index 6a19979..bd77920 100644
--- a/engine/tables.py
+++ b/engine/tables.py
@@ -21,7 +21,7 @@
# string, result, cont
romaji_typing_rule = {
- u"-" : u"ー",
+ u"-" : u"-",
u"a" : u"あ",
u"i" : u"い",
u"u" : u"う",
@@ -188,6 +188,11 @@ romaji_typing_rule = {
u"fu" : u"ふ",
u"fe" : u"ふぇ",
u"fo" : u"ふぉ",
+ u"fya" : u"ふゃ",
+ u"fyi" : u"ふぃ",
+ u"fyu" : u"ふゅ",
+ u"fye" : u"ふぇ",
+ u"fyo" : u"ふょ",
u"ma" : u"ま",
u"mi" : u"み",
u"mu" : u"む",
@@ -232,21 +237,21 @@ symbol_rule = {
u"," : u"、",
u"." : u"。",
u"!" : u"!",
- u"\"" : u"”",
+ u"\"" : u""",
u"#" : u"#",
u"$" : u"$",
u"%" : u"%",
u"&" : u"&",
- u"'" : u"’",
+ u"'" : u"'",
u"(" : u"(",
u")" : u")",
- u"~" : u"〜",
- u"-" : u"ー",
+ u"~" : u"~",
+ u"-" : u"-",
u"=" : u"=",
u"^" : u"^",
u"\\" : u"\",
u"|" : u"|",
- u"`" : u"‘",
+ u"`" : u"`",
u"@" : u"@",
u"{" : u"{",
u"[" : u"「",
@@ -262,6 +267,18 @@ symbol_rule = {
u"/" : u"/",
u"_" : u"_",
u"¥" : u"¥",
+
+ # numbers
+ u'0': u'0',
+ u'1': u'1',
+ u'2': u'2',
+ u'3': u'3',
+ u'4': u'4',
+ u'5': u'5',
+ u'6': u'6',
+ u'7': u'7',
+ u'8': u'8',
+ u'9': u'9',
}
# this is only used with romaji_typing_rule
@@ -308,6 +325,8 @@ romaji_correction_rule = {
u"nx" : (u"ん", u"x"),
u"nz" : (u"ん", u"z"),
u"n\0" : (u"ん", u""),
+ u"n," : (u"ん", u","),
+ u"n." : (u"ん", u"."),
}
# a port of 101kana.sty from scim-anthy
@@ -420,7 +439,7 @@ kana_typing_rule = {
u"?" : u"・",
u"_" : u"ろ",
- u"¥" : u"ー",
+ u"¥" : u"-",
}
kana_voiced_consonant_rule = {
@@ -565,20 +584,20 @@ hiragana_katakana_table = {
u"、" : (u"、", u"、"),
u"。" : (u"。", u"。"),
u"!" : (u"!", u"!"),
- u"”" : (u"”", u"\""),
+ u""" : (u""", u"\""),
u"#" : (u"#", u"#"),
u"$" : (u"$", u"$"),
u"%" : (u"%", u"%"),
u"&" : (u"&", u"&"),
- u"’" : (u"’", u"'"),
+ u"'" : (u"'", u"'"),
u"(" : (u"(", u"("),
u")" : (u")", u")"),
- u"〜" : (u"〜", u"~"),
+ u"~" : (u"~", u"~"),
u"=" : (u"=", u"="),
u"^" : (u"^", u"^"),
u"\" : (u"\", u"\\"),
u"|" : (u"|", u"|"),
- u"‘" : (u"‘", u"`"),
+ u"`" : (u"`", u"`"),
u"@" : (u"@", u"@"),
u"{" : (u"{", u"{"),
u"「" : (u"「", u"「"),
@@ -594,4 +613,16 @@ hiragana_katakana_table = {
u"/" : (u"/", u"/"),
u"_" : (u"_", u"_"),
u"¥" : (u"¥", u"¥"),
+
+ # numbers
+ u'0': (u'0', u'0'),
+ u'1': (u'1', u'1'),
+ u'2': (u'2', u'2'),
+ u'3': (u'3', u'3'),
+ u'4': (u'4', u'4'),
+ u'5': (u'5', u'5'),
+ u'6': (u'6', u'6'),
+ u'7': (u'7', u'7'),
+ u'8': (u'8', u'8'),
+ u'9': (u'9', u'9'),
}