Python/Romkan ローマ字とひらがなを相互に変換する Python用のライブラリ

What is this?

“Python/Romkan” is the Python ver. of Ruby/Romkan, which can convert a Japanese Romaji string to a Japanese Kana string or vice versa.

Download and Usage

Download the source code from here: romkan.py (Hosted by Google Code) . Ruby/Romkan is a free software with ABSOLUTELY NO WARRANTY under the terms of the Ruby’s licence.

% python
>>> import romkan
>>> print romkan.to_kana(u”syatyou”)
しゃちょう
>>> print romkan.to_roma(u”しゃちょう”)

shachou
>>> print romkan.to_hepburn(u”syatyou”)
shachou

Features

  • The input/output of all the APIs are Unicode strings.
  • For the API detail, please refer to the original Ruby/Romkan page

History

  • 2010/ 8/24 – Updated (changed input/output all to Katakana, and modified Kana to Roma conversion to some foreign pronunciation like “wi” “we” “wo”.
  • 2010/ 6/14 – Released the first version.

Acknowledgement

I really thank Mr. Satoru Takabayashi for developing this wonderful library.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>