3.5.0 • Published 10 months ago

kana-transformer v3.5.0

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

NPM Version test NPM License

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.

Documentation

Installation

npm install kana-transformer

Default behaviour

  • 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.

Usage examples

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('ワタシハジブンニオチャヲタテマシタ')
// => 'わたしはじぶんにおちゃをたてました'

Contributing

If you have a suggestion for improving the library, feel free to use issues and pull requests.

License

Apache-2.0

3.4.0

11 months ago

3.3.1

11 months ago

3.3.0

11 months ago

3.5.0

10 months ago

3.4.1

11 months ago

3.3.2

11 months ago

3.2.0

11 months ago

3.1.1

11 months ago

3.1.0

11 months ago

3.0.1

11 months ago

3.0.0

11 months ago