diff --git a/src/arabic/AdjectiveAra.gf b/src/arabic/AdjectiveAra.gf index ed897a8cb..b731100f8 100644 --- a/src/arabic/AdjectiveAra.gf +++ b/src/arabic/AdjectiveAra.gf @@ -40,7 +40,7 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in { UseA2 = PositA ; UseComparA a = { - s = \\h,g,n,d,c => a.s ! AComp d c + s = \\h,g,n,d,c => a.s ! AComp d c }; -- : Ord -> AP ; -- warmest diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 48e5d221b..3afc23e1d 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -26,7 +26,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in { QCl = ResAra.QCl ; -- {s : Tense => Polarity => QForm => Str} ; IDet = ResAra.IDet ; -- {s : Gender => State => Case => Str ; n : Number} ; IP = ResAra.IP ; -- {s : (isPred : Bool) => State => Case => Str ; n : Number} ; - IComp = ResAra.IComp ; -- + IComp = ResAra.IComp ; -- IQuant = {s : State => Case => Str} ; -- Relative diff --git a/src/arabic/ConjunctionAra.gf b/src/arabic/ConjunctionAra.gf index 24b16903f..b7aca53a7 100644 --- a/src/arabic/ConjunctionAra.gf +++ b/src/arabic/ConjunctionAra.gf @@ -1,4 +1,4 @@ -concrete ConjunctionAra of Conjunction = +concrete ConjunctionAra of Conjunction = CatAra ** open ResAra, Coordination, Prelude in { lincat @@ -28,7 +28,7 @@ lin empty = [] } ; ConjNP conj ss = conjunctDistrTable Case conj ss ** { - a = let gn = pgn2gn ss.a.pgn in + a = let gn = pgn2gn ss.a.pgn in {pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ; empty = [] } ; @@ -53,30 +53,25 @@ oper -- move to predef? - ListTable5 : PType -> PType -> PType -> PType -> PType -> Type = \P,Q,R,T,S -> - {s1,s2 : P => Q => R => T => S => Str} ; + ListTable5 : PType -> PType -> PType -> PType -> PType -> Type = \P,Q,R,T,S -> + {s1,s2 : P => Q => R => T => S => Str} ; - twoTable5 : (P,Q,R,T,S : PType) -> (_,_ : {s : P => Q => R => T => S => Str}) -> - ListTable5 P Q R T S = + twoTable5 : (P,Q,R,T,S : PType) -> (_,_ : {s : P => Q => R => T => S => Str}) -> + ListTable5 P Q R T S = \_,_,_,_,_,x,y -> - {s1 = x.s ; s2 = y.s} ; + {s1 = x.s ; s2 = y.s} ; - consrTable5 : - (P,Q,R,T,S : PType) -> Str -> {s : P => Q => R => T => S => Str} -> + consrTable5 : + (P,Q,R,T,S : PType) -> Str -> {s : P => Q => R => T => S => Str} -> ListTable5 P Q R T S -> ListTable5 P Q R T S = \P,Q,R,T,S,c,x,xs -> - {s1 = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ c ++ xs.s2 ! p ! q ! r ! t ! s ; + {s1 = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ c ++ xs.s2 ! p ! q ! r ! t ! s ; s2 = x.s - } ; + } ; - conjunctTable5 : - (P,Q,R,T,S : PType) -> Conjunction -> ListTable5 P Q R T S -> {s : P => Q => R => T => S => Str} = - \P,Q,R,T,S,or,xs -> - {s = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ or.s ++ xs.s2 ! p ! q ! r ! t ! s} ; - - conjunctDistrTable5 : - (P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S -> - {s : P => Q => R => T => S => Str} = + conjunctDistrTable5 : + (P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S -> + {s : P => Q => R => T => S => Str} = \P,Q,R,T,S,or,xs -> {s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ; } diff --git a/src/arabic/ConstructionAra.gf b/src/arabic/ConstructionAra.gf index 21a008470..ac5716b5c 100644 --- a/src/arabic/ConstructionAra.gf +++ b/src/arabic/ConstructionAra.gf @@ -47,11 +47,11 @@ lin intMonthday = symb ; -- : Card -> CN -> A -> AP - n_units_AP card cn a = + n_units_AP card cn a = let ap = mkAP a in ap ** { - s = \\s,g,n,d,c => - ap.s ! s ! g ! n ! d ! c - ++ (mkAdv R.biPrep (mkNP amount_N)).s + s = \\s,g,n,d,c => + ap.s ! s ! g ! n ! d ! c + ++ (mkAdv R.biPrep (mkNP amount_N)).s ++ (mkNP card cn).s ! R.Bare ---- ? /IL } ; diff --git a/src/arabic/ExtendAra.gf b/src/arabic/ExtendAra.gf index a3bb0953d..457bc8813 100644 --- a/src/arabic/ExtendAra.gf +++ b/src/arabic/ExtendAra.gf @@ -36,15 +36,15 @@ concrete ExtendAra of Extend = -- : Temp -> Pol -> VP -> VPS ; -- hasn't slept MkVPS t p vp = { s = \\pgn => let vps = - wordOrderNoSubj + wordOrderNoSubj Nominal -- Nominal (=SVO) generalises best for ConjVPS. - vp.obj.a.isPron + vp.obj.a.isPron (vStr vp pgn t.t p.p Nominal) (case of { => BIND ++ vp.obj.s ; _ => vp.obj.s }) - (pred vp pgn t.t p.p) - vp.s2 + (pred vp pgn t.t p.p) + vp.s2 in vps.before ++ vps.after -- word order is SVO, so this is safe for just this case. } ; diff --git a/src/arabic/LangAra.gf b/src/arabic/LangAra.gf index bf4be4c7d..fc08a4a80 100644 --- a/src/arabic/LangAra.gf +++ b/src/arabic/LangAra.gf @@ -1,6 +1,6 @@ --# -path=.:../abstract:../common:../api:../prelude -concrete LangAra of Lang = +concrete LangAra of Lang = GrammarAra, LexiconAra, ConstructionAra @@ -9,5 +9,3 @@ concrete LangAra of Lang = flags startcat = Phr ; unlexer = text ; lexer = text ; coding = utf8 ; } - - diff --git a/src/arabic/NounAra.gf b/src/arabic/NounAra.gf index 1372f5ac3..0f3c8b134 100644 --- a/src/arabic/NounAra.gf +++ b/src/arabic/NounAra.gf @@ -27,7 +27,7 @@ lin let c' = case c of {Dat => Gen ; x => x} in case cnB4det det of { False => determiner c' - ++ noun c' + ++ noun c' ++ adj c' ++ cn.np ! c' ; True => noun (cas c) -- deal with possessive suffix + dative hack @@ -205,10 +205,10 @@ lin PossNP cn np = cn ** { s = \\n,d,c => cn.s ! n ! case d of {Poss=>d ; _=>Const} ! c ; s2 = \\n,d,c => cn.s2 ! n ! case d of {Poss=>d ; _=>Const} ! Gen ; - np = \\c => cn.np ! c + np = \\c => cn.np ! c ++ case is1sg np.a of { True => "لَدَي" ++ np.empty ; - False => + False => case np.a.isPron of { True => "لَدَي" ++ BIND ++ np.s ! Gen ; False => np.s ! Gen } diff --git a/src/arabic/NumeralAra.gf b/src/arabic/NumeralAra.gf index 4dcd463b6..fd5104698 100644 --- a/src/arabic/NumeralAra.gf +++ b/src/arabic/NumeralAra.gf @@ -27,7 +27,7 @@ lincat lin n5 = num3_10 "خَمس" "خامِس"; lin n6 = num3_10 "سِتّ" "سادِس"; lin n7 = num3_10 "سَبع" "سابِع"; - lin n8 = num3_10 "ثَمانِي" "ثامِن"; + lin n8 = num3_10 "ثَمَانِي" "ثامِن"; lin n9 = num3_10 "تِسع" "تاسِع"; lin pot01 = mkNum "واحِد" "أَوَّل" "أُولى" ** { n = One } ; diff --git a/src/arabic/OrthoAra.gf b/src/arabic/OrthoAra.gf index 22a325dba..a5ae801a8 100644 --- a/src/arabic/OrthoAra.gf +++ b/src/arabic/OrthoAra.gf @@ -42,8 +42,8 @@ oper l@(""|"ل"|"ال") + ("أ"|"أَ") + #hamza + tail => l + "آ" + tail; l@(""|"ال") + #hamza + v@("َ"|"ُ") + tail => l + "أ" + v + tail; l@(""|"ال") + #hamza + v@("ِ") + tail => l + "إ" + v + tail; - head + v1@#vstar - + #hamza + v2@(#vow|"ْ") + tail => + head + v1@#vstar + + #hamza + v2@(#vow|"ْ") + tail => case v2 of { "ْ" => head + v1 + bHmz v1 v2 + tail ; -- unsure about this /IL _ => head + v1 + bHmz v1 v2 + v2 + tail } ; head + v1@#vstar -- the same but it ends in vowel diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index 0256826b6..562c2e665 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -283,10 +283,10 @@ resource ParadigmsAra = open -- questions, verb phrases, and adjectives. mkV0 : V -> V0 ; - -- mkVS = overload { - -- mkVS : V -> VS ; - -- mkVS : V -> Str -> VS - -- } ; + mkVS : overload { + mkVS : V -> VS ; + mkVS : V -> Str -> VS + } ; mkV2S : V -> Str -> V2S ; mkVV = overload { mkVV : V -> VV = regVV ; diff --git a/src/arabic/QuestionAra.gf b/src/arabic/QuestionAra.gf index d2ce38cf5..aa059ebd6 100644 --- a/src/arabic/QuestionAra.gf +++ b/src/arabic/QuestionAra.gf @@ -20,8 +20,6 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA cl = PredVP np vp ; in { s = \\t,p,qf => cl.s ! t ! p ! toOrder qf } ; - - ---- AR guessed QuestIAdv iadv cl = {s = \\t,p,qf => iadv.s ++ cl.s ! t ! p ! toOrder qf} ; @@ -34,7 +32,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA in QuestVP ip vp ; -- : IP -> IComp ; - CompIP ip = ip ** { + CompIP ip = ip ** { s = \\gn => ip.s ! True -- True=IP will be a subject of predicative sentence ! gn.g -- IComp agrees in gender with eventual head ! Def ! Nom ; -- IP will be a subject @@ -44,11 +42,11 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA -- QCl = {s : Tense => Polarity => QForm => Str} ; QuestSlash ip cls = { ----IL just guessing - s = \\t,p,qf => + s = \\t,p,qf => let cl : ResAra.Cl = complClSlash cls ; -- dummy conversion to Cl o = toOrder qf - in cls.c2.s ++ bindIf cls.c2.binds - ++ ip.s ! False ! Masc ! Def ! Nom + in cls.c2.s ++ bindIf cls.c2.binds + ++ ip.s ! False ! Masc ! Def ! Nom ++ cl.s ! t ! p ! o } ; @@ -66,14 +64,14 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA AdvIAdv iadv adv = {s = iadv.s ++ adv.s} ; -- : IDet -> IP - IdetIP idet = idet ** { + IdetIP idet = idet ** { s = \\isPred => idet.s ; a = { pgn = agrP3 NoHum Masc idet.n ; isPron = False } } ; -- : IDet -> CN -> IP IdetCN idet cn = { - s = \\isPred,g,s,c + s = \\isPred,g,s,c => idet.s ! cn.g ! s ! c ++ cn2str cn idet.n idet.d Gen ; a = { pgn = agrP3 NoHum cn.g idet.n ; isPron = False } diff --git a/src/arabic/RelativeAra.gf b/src/arabic/RelativeAra.gf index 25f1fe645..4f0054adb 100644 --- a/src/arabic/RelativeAra.gf +++ b/src/arabic/RelativeAra.gf @@ -1,4 +1,4 @@ -concrete RelativeAra of Relative = CatAra ** +concrete RelativeAra of Relative = CatAra ** open ResAra in { flags coding=utf8; @@ -10,8 +10,8 @@ concrete RelativeAra of Relative = CatAra ** -- : RP -> VP -> RCl ; -- who loves John RelVP rp vp = { - s = \\t,p,agr,c => - let + s = \\t,p,agr,c => + let npS : Case => Str = \\_ => rp.s ! agr2ragr agr c ; np : ResAra.NP = agrNP agr ** {s = npS} ; cl = predVP np vp ; @@ -19,9 +19,9 @@ concrete RelativeAra of Relative = CatAra ** cl.s ! t ! p ! Nominal } ; - -- : RP -> ClSlash -> RCl ; -- whom John loves + -- : RP -> ClSlash -> RCl ; -- whom John loves RelSlash rp cls = cls ** { - s = \\t,p,agr,c => + s = \\t,p,agr,c => let --empty : Agr -> NP = emptyNP ; obj : ResAra.NP = pgn2pron agr.pgn ; -- head is repeated as a clitic object pronoun cl : ResAra.Cl = complClSlash obj cls ; @@ -45,6 +45,6 @@ concrete RelativeAra of Relative = CatAra ** RDl Fem Bare => "اَللَّتَيْن" ; RDl Fem Nom => "اَللَّتَانِ" ; RDl Fem _ => "اَللَّتَيْنِ" - } + } } ; } diff --git a/src/arabic/SentenceAra.gf b/src/arabic/SentenceAra.gf index b3fc8bf73..e08d120cc 100644 --- a/src/arabic/SentenceAra.gf +++ b/src/arabic/SentenceAra.gf @@ -20,7 +20,7 @@ concrete SentenceAra of Sentence = CatAra ** open case p of { Pos => vp.s ! Per2 g n ! VPImp ; Neg => "لَا" ++ vp.s ! Per2 g n ! VPImpf Jus - } ++ vp.obj.s ++ vp.pred.s ! {g=g;n=n} ! Acc ++ vp.s2 + } ++ vp.obj.s ++ vp.pred.s ! {g=g;n=n} ! Acc ++ vp.s2 }; -- diff --git a/src/arabic/StructuralAra.gf b/src/arabic/StructuralAra.gf index 5f3c34516..01b41b4c8 100644 --- a/src/arabic/StructuralAra.gf +++ b/src/arabic/StructuralAra.gf @@ -43,7 +43,7 @@ concrete StructuralAra of Structural = CatAra ** how_IAdv = ss "كَيفَ" ; how8many_IDet = { s = \\g,s,c => "كَمْ عَدَد" + caseTbl ! c ; - n = Pl ; d = Def + n = Pl ; d = Def } ; -- IL how8much_IAdv = ss "كَمْ" ; if_Subj = mkSubj "إِذَا" Verbal ; diff --git a/src/arabic/VerbAra.gf b/src/arabic/VerbAra.gf index 59ed6b4f5..8b35a96da 100644 --- a/src/arabic/VerbAra.gf +++ b/src/arabic/VerbAra.gf @@ -38,7 +38,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { Slash2V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []}; Slash3V3 v np = - let vp = slashV2 v ** {c2 = + let vp = slashV2 v ** {c2 = v.c2 ** { s = case np.a.isPron of { True => case v.c2.binds of { @@ -48,7 +48,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { } } in vp ** { - c2 = v.c3 ; + c2 = v.c3 ; agrObj = \\_ => bindIfPron np vp -- will be emptied when insertObj is called /IL } ; @@ -66,7 +66,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { -- : VS -> S -> VP ; -- say that she runs ComplVS vs s = predV vs ** { -- IL - obj = emptyObj ** {s = vs.s2 ++ s.s ! vs.o} + obj = emptyObj ** {s = vs.s2 ++ s.s ! vs.o} } ; -- : VQ -> QS -> VP ; -- wonder who runs @@ -83,7 +83,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { UseComp xabar = case xabar.isNP of { False => kaan xabar ; - True => predV copula ** {obj = xabar.obj ; isPred=True} + True => predV copula ** {obj = xabar.obj ; isPred=True} } ; UseCopula = predV copula ; @@ -112,8 +112,8 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { CompCN cn = {s = \\agr,c => cn2str cn agr.n Indef Nom ; obj = emptyObj ; isNP = False} ; - CompNP np = {s = \\_,_ => [] ; - obj = {s = np.s ! Nom ; a = agrLite np.a} ; + CompNP np = {s = \\_,_ => [] ; + obj = {s = np.s ! Nom ; a = agrLite np.a} ; isNP = True} ; -- --