romkan2

raw JSON →
0.1.1 verified Fri May 01 auth: no python

A Python library for converting between Romaji (Romanized Japanese) and Kana (Hiragana/Katakana). It supports both to_romaji and to_kana conversions. Current version 0.1.1, released 2025, with no fixed release cadence.

pip install romkan2
error ModuleNotFoundError: No module named 'romkan2'
cause Library not installed or installed under a different name.
fix
pip install romkan2
error ImportError: cannot import name 'to_romaji' from 'romkan2'
cause Possible installation corruption or very old version (pre-0.1.0).
fix
pip install --upgrade romkan2
gotcha The 'to_romaji' function may return 'konnnichiha' (with double n) for 'こんにちは' due to Hepburn romanization rules; not a bug.
fix Use 'to_kana' to reverse; accept double n as standard Hepburn.
deprecated Unlike the older 'romkan' library, 'romkan2' does not support custom romanization systems or extended conversions like 'to_hepburn'.
fix If you need custom systems, consider using 'pykakasi' instead.

Convert between Romaji and Kana.

from romkan2 import to_romaji, to_kana

print(to_romaji('こんにちは'))  # konnnichiha
print(to_kana('konnnichiha'))    # こんにちは