A NPM package to convert Kurdish (Kurmanji) text to IPA phonetics.
- Instant, no limitations.
- Auto convert numbers included.
- With
npm
:
npm install kipa
- With
yarn
:
yarn add kipa
- 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']
}
]
}
You can test with mocha
:
npm test