2.2.2 • Published 12 months ago

kana-transcription v2.2.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

kana-transcription

NPM Version test NPM License

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.

Documentation

Installation

npm install kana-transcription

Usage examples

From kana

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 = 'ватащи ва джибун ни очя о татэмащита'

To kana

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 = 'わたし は きのお はは に だいじな てがみ を よんだ'

Contributing

If you want to participate in the work on the project, feel free to use issues and pull requests.

License

Apache-2.0

2.2.2

12 months ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago