diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index 0900043c..4209267b 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -76,7 +76,7 @@ resource ParadigmsAra = open --- = sdfN ; } ; - dualN : N -> N ; + dualN : N -> N ; -- Force the plural of the N into dual (e.g. "twins") --This is used for loan words or anything that has untreated irregularities --in the interdigitization process of its words @@ -130,16 +130,15 @@ resource ParadigmsAra = open -- Overloaded operator for main cases mkA = overload { - mkA : (root,patt : Str) -> A + mkA : (root,sg : Str) -> A -- adjective with sound plural; takes root string and sg. pattern string = \r,p -> lin A (sndA r p); - mkA : (root : Str) -> A -- forms adjectives with positive form aFCal + mkA : (root : Str) -> A -- adjective with positive form aFCal = \r -> lin A (clrA r); - mkA : (root,sg,pl : Str) -> A + mkA : (root,sg,pl : Str) -> A -- adjective with broken plural = \r,s,p -> lin A (brkA r s p) ; - -- mkA : (posit,compar,plur : Str) -> A - -- = degrA ; } ; + degrA : (posit,compar,plur : Str) -> A ; --Takes a root string and a pattern string sndA : (root,patt : Str) -> Adj ; @@ -147,6 +146,8 @@ resource ParadigmsAra = open --Takes a root string only clrA : (root : Str) -> Adj ; -- forms adjectives of type aFCal + nisbaA : Str -> Adj ; -- forms relative adjectives by adding the suffix ِيّ + --3 Two-place adjectives -- -- Two-place adjectives need a preposition for their second argument. @@ -637,6 +638,14 @@ resource ParadigmsAra = open } }; + nisbaA : Str -> Adj = \Haal -> + let Haaliyy = Haal + "ِيّ" in { + s = table { + APosit g n d c => positAdj Haaliyy ! g ! n ! d ! c ; + AComp d c => "أَكْثَر" ++ indeclN Haaliyy ! d ! c + } + } ; + clrA root = let { eaHmar = mkWord "أَفعَل" root; HamrA' = mkWord "فَعلاء" root; diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index 9b80898d..3c3afade 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -966,9 +966,10 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> -- determine the declension and gives the corresponding inf table sing : Str -> State => Case => Str = \word -> \\s,c => defArt s (case word of { - lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ; - _ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ; - lemma + "ة" => case s of { + lemma + "ِيّ" => fixShd word (decNisba ! s ! c) ; + lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ; + _ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ; + lemma + "ة" => case s of { Poss => lemma + "ت" + dec1sg ! s ! c ; _ => word + dec1sg ! s ! c } ; @@ -1046,6 +1047,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> _ => "ِي" }; + --declension 3 (ending in alif) dec3sg : State => Case => Str = \\s,c => case of { @@ -1054,6 +1056,15 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> _ => [] }; + --declension 2 (ends in yaa') + decNisba : State => Case => Str = \\s,c => + case of { + <_, Bare> => [] ; + => "اً" ; + => "ٍ" ; + <_, Acc> => "َ" ; + _ => [] + }; --dual suffixes dl : State => Case => Str =