Switch the language to: Russian
Find out if the library is right for you by trying it out on the website
A mini-library that you can use to:
- Translate hiragana/katakana to the Russian or English alphabet
- Transform syllables of Russian or English alphabet to hiragana/katakana
- Convert one kana to the other
There is a function to perform each item. Before using them, see the functions overview for limitations and recommendations. Keeping the recommendations in mind will improve accuracy, and keeping the limitations in mind will prepare you for the shortcomings of the algorithm.
- Functions overview
- Reasons for recommendations and limitations
- Supported transcription/transliteration systems
npm install kana-transcription
import { transcriptKana } from 'kana-transcription'
const kanaText = 'わたし は じぶん に おちゃ を たてました'
//Understood in the Hepburn system - by default
const hepburnText = transcriptKana(kanaText)
//hepburnText = 'watashi wa jibun ni ocha o tatemashita'
//Understood in Kunrei-shiki
const kunreiShikiText = transcriptKana(kanaText, 'kunrei-shiki')
//kunreiShikiText = 'watasi wa zibun ni otya o tatemasita'
//Understood in the Polivanov system; for Russian - by default
const polivanovText = transcriptKana(kanaText, 'ru')
//polivanovText = 'ватаси ва дзибун ни отя о татэмасита'
//Understood in a nonstandard-ru system
const nonstandardRuText = transcriptKana(kanaText, 'nonstandard-ru')
//nonstandardRuText = 'ватащи ва джибун ни очя о татэмащита'
import { transformToKana } from 'kana-transcription'
const hepburnText = 'watashi wa kinoo haha ni daijina tegami o yonda'
//Understood in the Hepburn system - by default
const transformedFromEN = transformToKana(hepburnText)
//transformedFromEN = 'わたし は きのお はは に だいじな てがみ を よんだ'
const polivanovText = 'ватаси ва киноо хаха ни даидзина тэгами о ёнда'
//Understood in the Polivanov system; for Russian - by default
const transformedFromRU = transformToKana(polivanovText, 'ru')
//transformedFromRU = 'わたし は きのお はは に だいじな てがみ を よんだ'
If you want to participate in the work on the project, feel free to use issues and pull requests.