forked from GitHub/gf-rgl
(Ara) Normalise the order of combining characters ّ + vowel
This commit is contained in:
@@ -11,6 +11,13 @@ flags coding=utf8 ;
|
|||||||
-- "Sun letters": assimilate with def. article
|
-- "Sun letters": assimilate with def. article
|
||||||
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
|
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
|
||||||
hamza : pattern Str = #("ء"|"؟") ;
|
hamza : pattern Str = #("ء"|"؟") ;
|
||||||
|
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
-- e.g. al-jamii3, 2a7ad
|
-- e.g. al-jamii3, 2a7ad
|
||||||
regNP : Str -> Number -> NP = \word,n ->
|
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 };
|
a = {pgn = Per3 Masc n; isPron = False };
|
||||||
lock_NP = <>
|
lock_NP = <>
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -842,13 +842,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
|
|
||||||
-- takes a singular or broken plural word and tests the ending to
|
-- takes a singular or broken plural word and tests the ending to
|
||||||
-- determine the declension and gives the corresponding inf table
|
-- determine the declension and gives the corresponding inf table
|
||||||
sing : Str -> State => Case => Str =
|
sing : Str -> State => Case => Str = \word ->
|
||||||
\word ->
|
\\s,c => defArt s (case word of {
|
||||||
case word of {
|
lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ;
|
||||||
lemma + "ِي" => \\s,c => defArt s lemma + dec2sg ! s ! c ;
|
_ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ;
|
||||||
_ + ("ا"|"ى") => \\s,c => defArt s word + dec3sg ! s ! c ;
|
_ => fixShd word (dec1sg ! s ! c)
|
||||||
_ => \\s,c => defArt s word + dec1sg ! s ! c
|
}) ;
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
-- takes a singular word and tests the ending to
|
-- takes a singular word and tests the ending to
|
||||||
|
|||||||
Reference in New Issue
Block a user