Japanese to Romaji, Hiragana & Furigana Converter (Kanji) avatar

Japanese to Romaji, Hiragana & Furigana Converter (Kanji)

Pricing

$1.00 / 1,000 text converteds

Go to Apify Store
Japanese to Romaji, Hiragana & Furigana Converter (Kanji)

Japanese to Romaji, Hiragana & Furigana Converter (Kanji)

Convert Japanese text (kanji) to hiragana, katakana, romaji (Hepburn, Kunrei, Nihon-shiki) and furigana as HTML ruby. Offline, bulk up to 10,000 texts, custom readings.

Pricing

$1.00 / 1,000 text converteds

Rating

0.0

(0)

Developer

HexaX

HexaX

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Security

Limited permissions

Share

Japanese to romaji, kanji to hiragana, furigana generator: turn Japanese text into hiragana, katakana, romaji and furigana in one call.

Use cases

  • Learning materials and graded readers that need furigana.

  • Subtitles and lyrics that need romaji.

  • Search indexes that need kana readings.

  • Name lists you want romanized.

  • Romaji in Hepburn, Kunrei-shiki or Nihon-shiki.

  • Furigana as HTML <ruby> (okurigana stay outside the ruby: <ruby>食<rt>た</rt></ruby>べる) or as plain text 食(た)べる.

  • Custom readings for names and words the dictionary gets wrong.

  • Runs fully offline with a bundled dictionary. Your text is not sent to any other service.

Quick start

Keep the example texts and press Start. Each text becomes one row with hiragana, katakana, romaji, furigana_html and furigana_text.

Input

{
"texts": ["今日は良い天気ですね。", "お父さんと東京へ行った。", "山田太郎さんは日本に住んでいます。"],
"romajiSystem": "hepburn",
"keepForeignSpelling": true,
"customReadings": {"日本": "にほん", "山田太郎": "やまだたろう"},
"useBuiltInReadings": true,
"includeTokens": false
}
FieldDefaultNotes
texts(required)Up to 10,000 texts per run, each up to 10,000 characters.
romajiSystemhepburnhepburn, kunrei or nihon.
keepForeignSpellingtrueWrite known loanwords in their source spelling (コンピューター → computer).
customReadings{}{word: kana reading}, up to 1,000 entries. The longest match wins. Readings apply to hiragana, katakana, furigana and romaji.
useBuiltInReadingstrueFixes for common words the dictionary misreads: お父さん, お母さん, お兄さん, お姉さん, お祖父さん, お祖母さん, 日本語, 日本人, 二十歳.
includeTokensfalseAdds a word-by-word list with reading, part of speech and dictionary form.

Output

{
"index": 0,
"text": "今日は良い天気ですね。",
"hiragana": "きょうはよいてんきですね。",
"katakana": "キョウハヨイテンキデスネ。",
"romaji": "Kyou wa yoi tenki desu ne.",
"furigana_html": "<ruby>今日<rt>きょう</rt></ruby>は<ruby>良<rt>よ</rt></ruby>い<ruby>天気<rt>てんき</rt></ruby>ですね。",
"furigana_text": "今日(きょう)は良(よ)い天気(てんき)ですね。",
"has_kanji": true,
"error": null
}

index is the position of the text in your input. Empty or over-long texts return a row with error set.

Pricing (pay per event)

EventPriceWhen
text-converted$0.001 ($1 per 1,000 texts)Each text converted
Actor startApify defaultOnce per run

Empty and over-long texts are not charged. If you set a maximum charge for the run, the Actor stops once it is reached.

FAQ

Why is a reading wrong? The dictionary picks the most likely reading from context. Names, place names and rare words are the usual misses. Add them to customReadings (for example {"山田太郎": "やまだたろう"}); the longest match wins.

Hepburn, Kunrei or Nihon-shiki? Hepburn is the common one for English readers (shi, chi, tsu). Kunrei-shiki (ISO 3602) and Nihon-shiki follow the kana table (si, ti, tu).

Is my text sent anywhere? No. Everything runs offline with a bundled dictionary.

Japanese search words: ふりがな変換, ローマ字変換, ひらがな変換, 漢字 読み仮名.

Accuracy and limits

  • Readings come from morphological analysis (MeCab via fugashi with UniDic-lite) and romaji from cutlet.
  • Expect mistakes on personal and place names, rare words, and words with several valid readings. For example, the dictionary reads 日本 as にっぽん and 明日 as あす. Use customReadings for anything that matters.
  • hiragana writes particles as spelled (は, へ). romaji writes them as pronounced (wa, e).
  • Numbers and Latin letters are kept as they are.
  • No network access and no external services. Nothing is stored beyond the run's dataset.

Run locally

python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt # includes the UniDic-lite dictionary (~250 MB unpacked)
python -m unittest discover -s tests -t .
mkdir -p storage/key_value_stores/default
echo '{"texts": ["今日は良い天気ですね。"]}' > storage/key_value_stores/default/INPUT.json
python -m src # or `apify run`; results in storage/datasets/default/
ACTOR_TEST_PAY_PER_EVENT=true python -m src # simulate pay-per-event charging locally

Licenses of bundled components

ComponentLicense
fugashiMIT AND BSD-3-Clause
cutletMIT
unidic-liteMIT (package); UniDic data © The UniDic Consortium, BSD-3-Clause (LICENSE.unidic in the package)