2 # -*- encoding: utf-8 -*-
6 # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with this program; if not, write to the
20 # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21 # Boston, MA 02111-1307 USA
23 # string, result, cont
24 romaji_typing_rule = {
231 #hiragana, katakana, half_katakana
232 hiragana_katakana_table = {
243 u"が" : (u"ガ", u"ガ"),
244 u"ぎ" : (u"ギ", u"ギ"),
245 u"ぐ" : (u"グ", u"グ"),
246 u"げ" : (u"ゲ", u"ゲ"),
247 u"ご" : (u"ゴ", u"ゴ"),
253 u"ざ" : (u"ザ", u"ザ"),
254 u"じ" : (u"ジ", u"ジ"),
255 u"ず" : (u"ズ", u"ズ"),
256 u"ぜ" : (u"ゼ", u"ゼ"),
257 u"ぞ" : (u"ゾ", u"ゾ"),
263 u"だ" : (u"ダ", u"ダ"),
264 u"ぢ" : (u"ヂ", u"ヂ"),
265 u"づ" : (u"ヅ", u"ヅ"),
266 u"で" : (u"デ", u"デ"),
267 u"ど" : (u"ド", u"ド"),
278 u"ば" : (u"バ", u"バ"),
279 u"び" : (u"ビ", u"ビ"),
280 u"ぶ" : (u"ブ", u"ブ"),
281 u"べ" : (u"ベ", u"ベ"),
282 u"ぼ" : (u"ボ", u"ボ"),
283 u"ぱ" : (u"パ", u"パ"),
284 u"ぴ" : (u"ピ", u"ピ"),
285 u"ぷ" : (u"プ", u"プ"),
286 u"ぺ" : (u"ペ", u"ペ"),
287 u"ぽ" : (u"ポ", u"ポ"),
318 u"ヴ" : (u"ヴ", u"ヴ"),
323 u"”" : (u"”", u"\""),
334 u"\" : (u"\", u"\\"),
343 u":" : (u":", u" : u"),