1.0.2 • Published 3 years ago

kipa v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

KIPA

A NPM package to convert Kurdish (Kurmanji) text to IPA phonetics.

Features

  • Instant, no limitations.
  • Auto convert numbers included.

Installation:

  • With npm:
npm install kipa
  • With yarn:
yarn add kipa

Usage:

  • To only get the resulted ipa text:
import Kipa from 'kipa'

let ipa = Kipa.translate_text('dem baş ji bo we!')
console.log(ipa)
| dɛm bɑːʃ ʒɪ boː wɛ |
  • To get more details as an object:
import Kipa from 'kipa'

let ipa = Kipa.get_ipa('dem baş ji bo we hemûyan û 4 kesên din jî!')
console.log(ipa)
{
  resulted_ipa: '| dɛm bɑːʃ ʒɪ boː wɛ hɛmuːjɑːn uː tʃɑːɾ kɛseːn dɪn ʒiː |\n',
  alternatives: [
    {
      word: 'hemûyan',
      inserted_ipa: 'hɛmuːjɑːn',
      alternative_ipa: 'ħɛmuːjɑːn',
      reasons: ['Different accents or positions']
    }
  ]
}

Testing:

You can test with mocha:

npm test