Skip to main content
Formerly kana_to_romaji
Tries to translate Kanji to Romaji with the help of JMdict
Some typograhic characters are also translated since one of the original goals was to make the string printable in ascii

Installation

pip install kanji_to_romaji
or if pip is not available:
git clone https://github.com/rcamba/kanji_to_romaji
install.bat

Usage

ktr.py is a script included to be used in the command line provided you have your python’s script folder in your environment variables

> ktr.py 友達に会いました
tomodachi ni aimashita
Although Windows cmd doesn’t seem to natively support unicode characters so you can use unicode escaped strings if you’d like…
> ktr.py \u53cb\u9054\u306b\u4f1a\u3044\u307e\u3057\u305f
tomodachi ni aimashita

The more common usage will probably to be used in another program:

from kanji_to_romaji import kanji_to_romaji
print kanji_to_romaji(u"友達に会いました")

Argument must be in unicode

More examples

私は嬉: watashi wa ureshii
更に向こうへ: sarani mukou e
友達に会いました: tomodachi ni aimashita
車には一人分の空きがあった: kuruma ni wa hitoribun no aki ga atta
bl∞dy☆: bl dy
乷: \u4e77 (not in Kanji unicode range)
See tests\test_kanji.py for more examples
Note: The particles は (ha/wa) or へ (he/e) won’t always be translated properly. Same goes for some of the Kanji translations since there are multiple possible readings for some of them depending on the context.

Metadata

Release files for Kanji_to_Romaji 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Kanji_to_Romaji 1.0.0
File Size Uploaded
Kanji_to_Romaji-1.0.0.zip 2.5 MB Details

Release files / Kanji_to_Romaji-1.0.0.zip

Download URL Kanji_to_Romaji-1.0.0.zip
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
6d347244daf9eb233d8add3ff112edab508ebc56dacd9fb1490ca8da868f5a52
BLAKE2b-256 checksum
How to use checksums
07f56b0fc8db2dc66b9a442aa5f20be170a443a720543531ad643e1b973fc395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page