1.0.2 • Published 4 years ago
kipa v1.0.2
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 kipaUsage:
- 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