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, WoEndingO,
ShortAForAlefBeforeFathatan, ShortAForAlefBeforeFathatan,
NOnFathatan, NOnFathatan,
HamzaOnWow,
} }
export function stateInfo({ state, i, phonemes, phoneme }: { 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) === "د") { if (isBeginningOfWord && phoneme === "u" && prevPLetter === " " && lastNonWhitespace(state.pOut) === "د") {
return PhonemeStatus.EndOfDuParticle return PhonemeStatus.EndOfDuParticle
} }
if (phoneme === "a" && previousPhoneme === "U" && currentPLetter === "و") {
return PhonemeStatus.HamzaOnWow;
}
if (phoneme === "a" && currentPLetter === "ا" && nextPLetter === fathahan) { if (phoneme === "a" && currentPLetter === "ا" && nextPLetter === fathahan) {
return PhonemeStatus.ShortAForAlefBeforeFathatan; return PhonemeStatus.ShortAForAlefBeforeFathatan;
} }

View File

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

View File

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