diff --git a/src/arabic/AdjectiveAra.gf b/src/arabic/AdjectiveAra.gf index 5b738fb8b..baae0935e 100644 --- a/src/arabic/AdjectiveAra.gf +++ b/src/arabic/AdjectiveAra.gf @@ -4,15 +4,15 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in { lin - PositA a = { - s = \\h,g,n,d,c => case h of { + PositA a = { + s = \\h,g,n,d,c => case h of { Hum => a.s ! APosit g n d c; NoHum => case n of { Pl => a.s ! APosit Fem Sg d c ; _ => a.s ! APosit g n d c } } - }; + }; ---- guessed by AR ComparA a np = { s = \\sp,g,n,st,c => a.s ! AComp st c ++ "مِنْ" ++ np.s ! Gen ; @@ -20,9 +20,9 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in { -- -- $SuperlA$ belongs to determiner syntax in $Noun$. -- - ComplA2 a np = { - s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2 ++ np.s ! Gen ; - } ; + ComplA2 a np = { + s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2 ++ np.s ! Gen ; + } ; -- -- ReflA2 a = { -- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ; @@ -34,9 +34,9 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in { -- isPre = False -- } ; -- - AdAP ada ap = { - s = \\sp,g,n,st,c => ada.s ++ ap.s ! sp ! g ! n ! st ! c - } ; + AdAP ada ap = { + s = \\sp,g,n,st,c => ada.s ++ ap.s ! sp ! g ! n ! st ! c + } ; -- -- UseA2 a = a ; -- diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 8dc9a1af6..2ed255154 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -82,17 +82,15 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in { V, VS, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ; V2, V2A = ResAra.Verb ** {c2 : Str} ; - V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR + VV, V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR V3 = ResAra.Verb ** {c2, c3 : Str} ; - VV = ResAra.Verb ** {c2 : Str ; isAux : Bool} ; --- IL A = ResAra.Adj ; A2 = ResAra.Adj ** {c2 : Str} ; - N, N2 = ResAra.Noun ; ---{s : ResAra.Number => State => Case => Str; g : Gender ; h = Species} ; --- N2 = {s : ResAra.Number => Case => Str} ** {c2 : Str} ;?? - N3 = ResAra.Noun ** {c2,c3 : Str} ; + N = ResAra.Noun ; + N2 = ResAra.Noun ** {c2 : Str} ; + N3 = ResAra.Noun ** {c2, c3 : Str} ; PN = {s : Case => Str; g : Gender; h : Species} ; } diff --git a/src/arabic/LexiconAra.gf b/src/arabic/LexiconAra.gf index 7b60364f4..30d3675e6 100644 --- a/src/arabic/LexiconAra.gf +++ b/src/arabic/LexiconAra.gf @@ -39,7 +39,7 @@ flags break_V2 = dirV2 (regV "يَكسُر") ; -- break_V2 = dirV2 (v1 "كسر" a u) ; broad_A = sndA "وسع" "فاعِل" ; - brother_N2 = brkN "؟خو" "فَع" "فِعلة" Masc Hum ; --FIXME + brother_N2 = mkN2 (brkN "؟خو" "فَع" "فِعلة" Masc Hum) ; --FIXME brown_A = sndA "بني" "فُعِّل"; butter_N = sdfN "سبد" "فُعلة" Fem NoHum ; buy_V2 = dirV2 (v8 "شري") ; @@ -78,7 +78,7 @@ flags empty_A = sndA "فرغ" "فاعِل" ; enemy_N = brkN "عدو" "فَعُلّ" "أَفعاء" Masc Hum ; factory_N = brkN "صنع" "مَفعَل" "مَفاعِل" Masc NoHum ; - father_N2 = brkN "؟ب" "فَع" "أَفعاء" Masc Hum; + father_N2 = mkN2 (brkN "؟ب" "فَع" "أَفعاء" Masc Hum); fear_VS = mkVS (v1 "خشي" i a ); find_V2 = dirV2 (v1 "وجد" a i ) ; fish_N = brkN "سمك" "فَعَلة" "أَفعال" Fem NoHum ; @@ -133,7 +133,7 @@ flags meat_N = brkN "لحم" "فَعلة" "فُعُول" Masc NoHum ; milk_N = brkN "حلب" "فَعِيل" "فَعِيل" Masc NoHum ; --no plur moon_N = brkN "قمر" "فَعَل" "أَفعال" Masc NoHum ; - mother_N2 = sdfN "؟م" "فُعّ" Fem Hum ; + mother_N2 = mkN2 (sdfN "؟م" "فُعّ" Fem Hum) ; mountain_N = brkN "جبل" "فَعَل" "فِعال" Masc NoHum ; music_N = mkN (reg "مُوسِيقَى" "مُوسِيقَى") Fem NoHum ; --no plur narrow_A = sndA "ضيق" "فَعِّل" ; diff --git a/src/arabic/MissingAra.gf b/src/arabic/MissingAra.gf index 2e417386d..7d82c4eb1 100644 --- a/src/arabic/MissingAra.gf +++ b/src/arabic/MissingAra.gf @@ -7,7 +7,6 @@ oper AdjOrd : Ord -> AP = notYet "AdjOrd" ; oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ; oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ; oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; -oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; oper AdvS : Adv -> S -> S = notYet "AdvS" ; oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ; oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ; @@ -19,8 +18,6 @@ oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ; oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ; oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ; -oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ; -oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ; oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ; oper ComplVQ : VQ -> QS -> VP = notYet "ComplVQ" ; oper ComplVS : VS -> S -> VP = notYet "ComplVS" ; @@ -43,7 +40,6 @@ oper ExistNP : NP -> Cl = notYet "ExistNP" ; oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ; oper GenericCl : VP -> Cl = notYet "GenericCl" ; oper IdRP : RP = notYet "IdRP" ; -oper IdetIP : IDet -> IP = notYet "IdetIP" ; oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ; oper ImpersCl : VP -> Cl = notYet "ImpersCl" ; oper PConjConj : Conj -> PConj = notYet "PConjConj" ; @@ -66,17 +62,11 @@ oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ; oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ; oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ; oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ; -oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ; oper SubjS : Subj -> S -> Adv = notYet "SubjS" ; -oper Use2N3 : N3 -> N2 = notYet "Use2N3" ; oper UseA2 : A2 -> AP = notYet "UseA2" ; oper UseComparA : A -> AP = notYet "UseComparA" ; -oper UseN2 : N2 -> CN = notYet "UseN2" ; oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ; oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ; -oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ; -oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ; -oper UttVP : VP -> Utt = notYet "UttVP" ; oper VocNP : NP -> Voc = notYet "VocNP" ; oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ; diff --git a/src/arabic/NounAra.gf b/src/arabic/NounAra.gf index 8fa166831..143d422ce 100644 --- a/src/arabic/NounAra.gf +++ b/src/arabic/NounAra.gf @@ -172,13 +172,17 @@ lin -- MassDet = {s = \\_,_,_,_ => [] ; d = Indef; -- isNum = False; isPron = False} ; - UseN n = n ** {adj = \\_,_,_ => []}; - -- ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c} ; - -- ComplN3 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; c2 = f.c3} ; - -- - -- UseN2 n = n ; - -- UseN3 n = n ; - -- + UseN, + UseN2 = \n -> n ** {adj = \\_,_,_ => []}; + Use2N3 n3 = n3 ; + Use3N3 n3 = n3 ** {c2 = n3.c3} ; + + ComplN2 n2 np = UseN n2 ** --- IL + {s = \\n,s,c => n2.s ! n ! s ! c ++ n2.c2 ++ np.s ! Gen} ; + + + ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ; + AdjCN ap cn = { s = \\n,d,c => cn.s ! n ! d ! c; adj = \\n,d,c => ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c ; diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index 3ef6236ea..67df66685 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -92,7 +92,11 @@ resource ParadigmsAra = open --3 Relational nouns - mkN2 : N -> Preposition -> N2 ; + mkN2 = overload { + mkN2 : N -> Preposition -> N2 = prepN2 ; + mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = []}) ; + mkN2 : Str -> N2 = \str -> lin N2 (smartN str ** {c2 = []}) + } ; mkN3 : N -> Preposition -> Preposition -> N3 ; @@ -402,7 +406,7 @@ resource ParadigmsAra = open }; - mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ; + prepN2 : N -> Str -> N2 = \n,p -> lin N2 (n ** {c2 = p}) ; mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ; @@ -519,7 +523,7 @@ resource ParadigmsAra = open mkVS v = v ** {lock_VS = <>} ; mkVQ v = v ** {lock_VQ = <>} ; - regVV : V -> VV = \v -> lin VV v ** {isAux = False; c2 = []} ; + regVV : V -> VV = \v -> lin VV v ** {c2 = []} ; c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = prep} ; V0 : Type = V ; diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index 353106a79..011a31dbd 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -1116,8 +1116,8 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> IP : Type = { s : Gender -- because of CompIP - => State => Case -- because of PrepIP: e.g. "in which" chooses definite accusative - => Str ; + => State => Case -- because of PrepIP: e.g. "in which" chooses definite accusative + => Str ; n : Number } ; @@ -1140,11 +1140,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> -- TODO: does verbal complement agree with the noun compVP : VP -> Comp = \vp -> ---- IL { s = table { - aagr@{g=g ; n=n} => \\c => - vp.s ! Per3 g n ! VPImpf Ind ---- IL guesswork + https://arabic.desert-sky.net/g_modals.html - ++ vp.s2 - ++ vp.pred.s ! aagr ! Acc - ++ vp.obj.s } + aagr@{g=g ; n=n} => \\c => + vp.s ! Per3 g n ! VPImpf Ind ---- IL guesswork + https://arabic.desert-sky.net/g_modals.html + ++ vp.s2 + ++ vp.pred.s ! aagr ! Acc + ++ vp.obj.s } } ; predV : Verb -> VP = \v ->