0.2.1 • Published 1 year ago
@vuadu/ipa-to-vie v0.2.1
@vuadu/ipa-to-vie
Typescript code to Transcribe English IPA to Vietnamese Phonetic.
Install
Using Yarn
yarn add @vuadu/ipa-to-vieUsing NPM
npm install @vuadu/ipa-to-vieUsage
ipaToVie
Options
uppercaseStress: boolean - uppercase stress syllable of vietnamese transcriptionvowelEpenthesis: object
| type | description | |
|---|---|---|
| skipAll | boolean | Skip all syllables have null vowel |
| skipLast | boolean | Skip end syllable if it has null vowel |
| replacement | string | Replace all null vowel with a string |
Examples
import { ipaToVie } from '@vuadu/ipa-to-vie';
const viePhonetic = ipaToVie('/əˈkweɪntənsʃɪp/'); // acquaintanceship
console.log(viePhonetic) // ờ-quên-thờn-xờ-sịpimport { ipaToVie } from '@vuadu/ipa-to-vie';
const options = { uppercaseStress: true };
const viePhonetic = ipaToVie('/əˈkweɪntənsʃɪp/'); // acquaintanceship
console.log(viePhonetic) // ờ-QUÊN-thờn-xờ-sịpimport { ipaToVie } from '@vuadu/ipa-to-vie';
const options = { vowelEpenthesis: { skipAll: true } };
const viePhonetic = ipaToVie('/əˈkweɪntənsʃɪp/', options); // acquaintanceship
console.log(viePhonetic) // ờ-quên-thờn-sịpimport { ipaToVie } from '@vuadu/ipa-to-vie';
const options = { vowelEpenthesis: { replacement: "" } };
const viePhonetic = ipaToVie('/əˈkweɪntənsʃɪp/', options); // acquaintanceship
console.log(viePhonetic) // ờ-quên-thờn-x-sịp