Switch the language to: Russian
Try out the functionality on the website
With the library, you will be able to:
- Transform Russian or English syllables into kana
- Turn kana to the Russian or English alphabet
- 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-transformer
-
toKana()
understands English, by Hepburn system; returns hiragana -
fromKana()
returns English, by Hepburn system -
convertKana()
converts to hiragana
More details about the customization options are written in functions overview.
import { fromKana, toKana, convertKana } from 'kana-transformer'
//Recommendation: in the first two functions, separate words with a space
fromKana('わたし は じぶん に おちゃ を たてました')
// => 'watashi wa jibun ni ocha o tatemashita'
toKana('watashi wa jibun ni ocha o tatemashita')
// => 'わたし は じぶん に おちゃ を たてました'
convertKana('ワタシハジブンニオチャヲタテマシタ')
// => 'わたしはじぶんにおちゃをたてました'
If you have a suggestion for improving the library, feel free to use issues and pull requests.