This commit is contained in:
Bill D 2021-06-03 20:26:08 +04:30
parent 1a0480a9d3
commit b1aac313f9
3 changed files with 15 additions and 2 deletions

View File

@ -335,6 +335,7 @@ export enum PhonemeStatus {
WoEndingO,
ShortAForAlefBeforeFathatan,
NOnFathatan,
HamzaOnWow,
}
export function stateInfo({ state, i, phonemes, phoneme }: {
@ -390,6 +391,9 @@ export function stateInfo({ state, i, phonemes, phoneme }: {
if (isBeginningOfWord && phoneme === "u" && prevPLetter === " " && lastNonWhitespace(state.pOut) === "د") {
return PhonemeStatus.EndOfDuParticle
}
if (phoneme === "a" && previousPhoneme === "U" && currentPLetter === "و") {
return PhonemeStatus.HamzaOnWow;
}
if (phoneme === "a" && currentPLetter === "ا" && nextPLetter === fathahan) {
return PhonemeStatus.ShortAForAlefBeforeFathatan;
}

View File

@ -803,7 +803,7 @@ const diacriticsSections: {
p: "توقع",
f: "tawaqqÚ",
},
out: "تَوَقّعُ",
out: "تَوَقُّع",
},
],
},
@ -1050,7 +1050,7 @@ const diacriticsSections: {
p: "مودب",
f: "mUaddab",
},
out: ؤدَّب",
out: ُؤَدَّب",
},
],
},

View File

@ -189,7 +189,16 @@ function processPhoneme(
pipe(
advanceP,
)(state)
: (phs === PhonemeStatus.HamzaOnWow) ?
pipe(
advanceP,
addP(hamzaAbove),
addP(diacritic),
)(state)
: state;
// (phs === PhonemeStatus.AlefWithHamzaWithGlottalStop) ?
// state