diff --git a/src/arabic/OrthoAra.gf b/src/arabic/OrthoAra.gf index a15dc7cf..3a24690c 100644 --- a/src/arabic/OrthoAra.gf +++ b/src/arabic/OrthoAra.gf @@ -11,6 +11,13 @@ flags coding=utf8 ; -- "Sun letters": assimilate with def. article sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ; + -- Shadda: https://www.unicode.org/L2/L2017/17253-arabic-ordering.pdf + fixShd : Str -> Str -> Str = \word,vowel -> + case word of { + x + "ّ" => x + vowel + "ّ" ; + x => x + vowel + } ; + -- Hamza hamza : pattern Str = #("ء"|"؟") ; diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index 3aaa804f..089421cc 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -438,7 +438,7 @@ resource ParadigmsAra = open -- e.g. al-jamii3, 2a7ad regNP : Str -> Number -> NP = \word,n -> - { s = \\c => word ++ vowel ! c ; ---- gives strange chars + { s = \\c => fixShd word (dec1sg ! Def ! c) ; a = {pgn = Per3 Masc n; isPron = False }; lock_NP = <> }; diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index 7d07fe75..c3cc2aa9 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -842,13 +842,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> -- takes a singular or broken plural word and tests the ending to -- determine the declension and gives the corresponding inf table - sing : Str -> State => Case => Str = - \word -> - case word of { - lemma + "ِي" => \\s,c => defArt s lemma + dec2sg ! s ! c ; - _ + ("ا"|"ى") => \\s,c => defArt s word + dec3sg ! s ! c ; - _ => \\s,c => defArt s word + dec1sg ! s ! c - }; + sing : Str -> State => Case => Str = \word -> + \\s,c => defArt s (case word of { + lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ; + _ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ; + _ => fixShd word (dec1sg ! s ! c) + }) ; -- takes a singular word and tests the ending to