From 00f9a1be49b1232fa853b3b4d616c203cca06195 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 20 Nov 2018 09:34:30 +0100 Subject: [PATCH 1/5] (Ara) Fix formatting in documentation --- src/arabic/ParadigmsAra.gf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index d3edb2b36..c029fba27 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -114,7 +114,7 @@ resource ParadigmsAra = open mkN2 : overload { mkN2 : N -> Preposition -> N2 ; -- ready-made preposition - mkN2 : (mother : N) -> (of_ : Str) -> N2 ; -- preposition given as a string + mkN2 : N -> Str -> N2 ; -- preposition given as a string mkN2 : N -> N2 ; -- no preposition mkN2 : Str -> N2 ; -- no preposition, predictable inflection } ; @@ -195,21 +195,21 @@ resource ParadigmsAra = open reflV : V -> V ; -- نَفْس in the proper case and with possessive suffix, e.g. نَفْسَكِ - v1 : Str -> Vowel -> Vowel -> V ; --Verb Form I : fa`ala, fa`ila, fa`ula + v1 : Str -> Vowel -> Vowel -> V ; -- Verb Form I : fa`ala, fa`ila, fa`ula - v2 : Str -> V ; --Verb Form II : fa``ala + v2 : Str -> V ; -- Verb Form II : fa``ala - v3 : Str -> V ; --Verb Form III : faa`ala + v3 : Str -> V ; -- Verb Form III : faa`ala - v4 : Str -> V ; --Verb Form IV : 'af`ala + v4 : Str -> V ; -- Verb Form IV : 'af`ala - v5 : Str -> V ; --Verb Form V : tafa``ala + v5 : Str -> V ; -- Verb Form V : tafa``ala - v6 : Str -> V ; --Verb Form VI : tafaa`ala + v6 : Str -> V ; -- Verb Form VI : tafaa`ala - v7 : Str -> V ; --Verb Form VII : infa`ala + v7 : Str -> V ; -- Verb Form VII : infa`ala - v8 : Str -> V ; --Verb Form VIII ifta`ala + v8 : Str -> V ; -- Verb Form VIII ifta`ala v10 : Str -> V ; -- Verb Form X 'istaf`ala From 47bcbe73f621b6d3e2146a4184fcf9fc6b544ce2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 20 Nov 2018 14:09:15 +0100 Subject: [PATCH 2/5] (Ara) Add two new verb paradigms --- src/arabic/ParadigmsAra.gf | 8 ++++--- src/arabic/PatternsAra.gf | 12 +++++++++- src/arabic/ResAra.gf | 45 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index c029fba27..d7868cb92 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -419,6 +419,7 @@ resource ParadigmsAra = open let root : Root3 = mkRoot3 rootStr ; verb : Verb = case rootStr of { ? + #hamza + #weak => v4doubleweak root ; + ? + #weak + ? => v4hollow root ; _ + #weak => v4defective root ; _ => v4sound root } ; in lin V verb ; @@ -475,9 +476,10 @@ resource ParadigmsAra = open \rootStr -> let { rbT = mkRoot3 rootStr ; - v10fun = case rbT.c of { - ("و"|"ي") => v10hollow ; - _ => v10sound } + v10fun : Root3 -> Verb = case rootStr of { + ? + #weak + ? => v10hollow ; + ? + ? + #weak => v10defective ; + _ => v10sound } } in lin V (v10fun rbT) ; reflV v = lin V (ResAra.reflV v) ; diff --git a/src/arabic/PatternsAra.gf b/src/arabic/PatternsAra.gf index 23175098b..8fa311af8 100644 --- a/src/arabic/PatternsAra.gf +++ b/src/arabic/PatternsAra.gf @@ -35,9 +35,13 @@ flags coding=utf8 ; fuci = { h = "" ; m1 = "ُ" ; m2 = ""; t = "ِ" } ; fucu = { h = "" ; m1 = "ُ" ; m2 = ""; t = "ُ" } ; fUc = { h = "" ; m1 = "ُو"; m2 = ""; t = "" } ; - ufAc = { h = "ُ" ; m1 = "َا"; m2 = ""; t = "" } ; ufca = { h = "ُ" ; m1 = "ْ" ; m2 = ""; t = "َ" } ; + eafAc = fAc ** { h = "أَ" } ; + eafac = fac ** { h = "أَ" } ; + eafIc = fIc ** { h = "أَ" } ; + eafic = fic ** { h = "أَ" } ; + eafAcil = { h = "أَ"; m1 = "َا" ; m2 = "ِ" ; t = "" } ; eafAcIl = { h = "أَ"; m1 = "َا" ; m2 = "ِي" ; t = "" } ; eafcilp = { h = "أَ"; m1 = "ْ" ; m2 = "ِ" ; t = "َة" } ; @@ -47,6 +51,12 @@ flags coding=utf8 ; eafcul = { h = "أَ"; m1 = "ْ" ; m2 = "ُ" ; t = "" } ; eiftacal = { h = "إِ"; m1 = "ْتَ" ; m2 = "َ" ; t = "" } ; eufcil = { h = "أُ"; m1 = "ْ" ; m2 = "ِ" ; t = "" } ; + eufic = fic ** { h = "أُ" } ; + eufIc = fIc ** { h = "أُ" } ; + ufic = fic ** { h = "ُ" } ; + ufIc = fIc ** { h = "ُ" } ; + ufac = fac ** { h = "ُ" } ; + ufAc = fAc ** { h = "ُ" } ; euftucil = { h = "أُ"; m1 = "ْتُ" ; m2 = "ِ" ; t = "" } ; euttucil = euftucil ** { h = "اُتُّ" ; m1 = "ِ" } ; ---- IL assimilated VIII afcul = { h = "َ" ; m1 = "ْ" ; m2 = "ُ" ; t = "" } ; diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index dfdd97f5e..01f764c87 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -649,6 +649,28 @@ v4sound : Root3 -> Verb = } in verb eaqnac euqnic uqnic uqnac eaqnic muqnac; +v4hollow : Root3 -> Verb = + \rwd -> + let { + earad = mkHollow eafac rwd ; -- VPerf Act (Per3 Fem Pl) etc. + earAd = mkHollow eafAc rwd ; -- VPerf Act + eurid = mkHollow eufic rwd ; -- VPerf Pas (Per3 Fem Pl) etc. + eurId = mkHollow eufIc rwd ; -- VPerf Pas + + urid = mkHollow ufic rwd ; -- VImpf Act (Per2/Per3 Fem Pl) + urId = mkHollow ufIc rwd ; -- VImpf Act + urad = mkHollow ufac rwd ; -- VImpf Pas (Per2/Per3 Fem Pl) + urAd = mkHollow ufAc rwd ; -- VImpf Pas + + earid = mkHollow eafic rwd ; -- VImp (Sg Masc / Pl Fem) + earId = mkHollow eafIc rwd ; -- VImp (Pl Masc / Sg Fem) + + ppart = "م" + urAd ; + + } in verbHollow (toDefForms + earAd earad eurId eurid + urId urid urAd urad + earId earid ppart) ; v4DefForms : Root3 -> DefForms = \cTy -> let { @@ -808,6 +830,29 @@ v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked istaxAf istaxaf ustuxIf ustuxif astaxIf astaxif ustaxAf ustaxaf istaxif istaxIf ppart) ; +v10defective : Root3 -> Verb = -- IL + \lqy -> + let { + _stalqa = "سْتَ" + mkDefective fca lqy ; + _stalqu = "سْتَ" + mkDefective fcu lqy ; + _stalqi = "سْتَ" + mkDefective fci lqy ; + _stulqi = "سْتُ" + mkDefective fci lqy ; + + istalqa = "اِ" + _stalqa ; -- VPerf Act (Per3 Masc Sg) + istalqay = "اِسْتَ" + mkStrong fcal lqy ; -- VPerf Act (Per3 Fem Pl) + ustulqi = "اُ" + _stulqi; -- VPerf Pas (Per3 _ _) + + astalqu = "َ" + _stalqu ; -- VImpf Act (Per2/3 Masc Pl) + astalqi = "َ" + _stalqi ; -- VImpf Act _ + ustalqa = "ُ" + _stalqa ; -- VImpf Pas _ + istalqi = "اِ" + _stalqi; -- VImp (Masc Sg / Fem _) + istalqu = "اِ" + _stalqu; -- VImp Masc Pl + mustalqin = "مُ" + _stalqi + "ت" ; + + } in verbDef (toDefForms + istalqa istalqay ustulqi ustulqi ustulqi + astalqi astalqu ustalqa istalqi istalqu mustalqin) i ; + patV1Perf : Vowel => Pattern = table { a => facal ; --katab From b174bba3a9ee5113488b6d51a06eac33bed3bf81 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 20 Nov 2018 14:10:49 +0100 Subject: [PATCH 3/5] (Ara) V2V and related functions --- src/arabic/CatAra.gf | 5 +++-- src/arabic/MissingAra.gf | 2 -- src/arabic/ParadigmsAra.gf | 4 ++-- src/arabic/ResAra.gf | 9 ++++++--- src/arabic/VerbAra.gf | 27 +++++++++++++++++++++++---- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 95a53b920..1902bfac7 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -79,9 +79,10 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in { V, VS, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ; V2, V2A = ResAra.Verb2 ; - VV = ResAra.Verb2 ** {sc : Preposition} ; + VV = ResAra.Verb2 ** {sc : Preposition} ; -- c2 is for verb V2S, V2Q = ResAra.Verb2 ; - V2V, V3 = ResAra.Verb3 ; + V3 = ResAra.Verb3 ; + V2V = ResAra.Verb3 ** {sc : Preposition} ; -- c3 is for verb, c2 is for dir.obj A = ResAra.Adj ; A2 = ResAra.Adj2 ; diff --git a/src/arabic/MissingAra.gf b/src/arabic/MissingAra.gf index 9bfd3c3ec..d95c86912 100644 --- a/src/arabic/MissingAra.gf +++ b/src/arabic/MissingAra.gf @@ -36,8 +36,6 @@ oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ; oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ; oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ; 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 SubjS : Subj -> S -> Adv = notYet "SubjS" ; oper VocNP : NP -> Voc = notYet "VocNP" ; diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index d7868cb92..5315286f2 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -688,9 +688,9 @@ resource ParadigmsAra = open mkV2S v p = lin V2S (prepV2 v (mkPreposition p)) ; mkV2V = overload { mkV2V : V -> Str -> Str -> V2V = \v,p,q -> - lin V2V (prepV3 v (mkPreposition p) (mkPreposition q)) ; + lin V2V (prepV3 v (mkPreposition p) (mkPreposition q) ** {sc = noPrep}) ; mkV2V : V -> Preposition -> Preposition -> V2V = \v,p,q -> - lin V2V (prepV3 v p q) ; + lin V2V (prepV3 v p q ** {sc = noPrep}) ; mkV2V : VV -> Preposition -> V2V = \vv,p -> lin V2V (vv ** {c2 = p ; c3 = vv.c2}) ; } ; diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index 01f764c87..b0512f9f0 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -1583,7 +1583,10 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> emptyObj : Obj = emptyNP ** {s=[]} ; insertObj : NP -> VPSlash -> VP = \np,vp -> vp ** - { obj = {s = vp.obj.s ++ vp.c2.s ++ np.s ! vp.c2.c ; a = np.a} }; + { obj = {s = vp.obj.s -- old object, if there was one + ++ vp.c2.s ++ np.s ! vp.c2.c -- new object + ++ vp.agrObj ! np.a.pgn ; -- only used for SlashV2V + a = np.a} }; insertPred : Comp -> VP -> VP = \p,vp -> vp ** { pred = p; @@ -1601,11 +1604,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> ----------------------------------------------------------------------------- -- Slash categories - VPSlash : Type = VP ** {c2 : Preposition} ; + VPSlash : Type = VP ** {c2 : Preposition ; agrObj : PerGenNum => Str} ; ClSlash : Type = VPSlash ** {subj : NP} ; slashV2 : Verb2 -> VPSlash = \v -> - predV v ** {c2 = v.c2} ; + predV v ** {c2 = v.c2 ; agrObj = \\_ => []} ; -- Add subject string, fix agreement to the subject, -- but keep the structure as VP, because later on diff --git a/src/arabic/VerbAra.gf b/src/arabic/VerbAra.gf index 83323dc6d..aa68506ab 100644 --- a/src/arabic/VerbAra.gf +++ b/src/arabic/VerbAra.gf @@ -7,12 +7,31 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { SlashVV vv vps = vps ** predV vv ; ----IL - -- TODO: --c3 is for verb, c2 is for dir.obj - --SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go - --SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy + -- : V2V -> VP -> VPSlash ; -- beg (her) to go + SlashV2V v2v vp = let v2vVP = predV v2v in -- IL + vp ** { + s = v2vVP.s ; + agrObj = \\pgn => v2v.c3.s -- أَنْ + ++ vp.s ! pgn ! VPImpf Cnj ; + isPred = False ; + c2 = v2v.c2 ; -- for the direct object + sc = v2v.sc + } ; + + -- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy + SlashV2VNP v2v np vps = let v2vVP = predV v2v in -- IL + vps ** { + s = \\pgn,vpf => v2vVP.s ! pgn ! vpf + ++ v2v.c2.s ++ np.s ! v2v.c2.c + ++ v2v.c3.s -- أَنْ + ++ vps.s ! pgn ! VPImpf Cnj ; + isPred = False ; + -- preposition for the direct object comes from VP + sc = v2v.sc + } ; SlashV2a = slashV2 ; - Slash3V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3}; + Slash3V3 v np = insertObj np (slashV2 v) ** {c2 = v.c3 ; agrObj = \\_ => []}; ComplSlash vp np = insertObj np vp ; From b63da6573e6edb1e1b63257d2ad25de31244538a Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 20 Nov 2018 14:11:15 +0100 Subject: [PATCH 4/5] (Ara) Formatting + small typofixes --- src/arabic/ResAra.gf | 91 +++++++++++++++++++------------------ src/arabic/StructuralAra.gf | 2 +- 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/src/arabic/ResAra.gf b/src/arabic/ResAra.gf index b0512f9f0..8fb6ff660 100644 --- a/src/arabic/ResAra.gf +++ b/src/arabic/ResAra.gf @@ -112,10 +112,10 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in { emptyNTable : NTable = \\n,s,c => [] ; Preposition : Type = {s : Str ; c : Case} ; - Noun : Type = { - s,s2 : NTable ; - g : Gender ; - h : Species ; + Noun : Type = { + s,s2 : NTable ; + g : Gender ; + h : Species ; isDual : Bool -- whether it takes dual instead of plural: eyes, twins, ... } ; Noun2 : Type = Noun ** {c2 : Preposition} ; @@ -771,7 +771,7 @@ v8assimilated : Root3 -> Verb = --- IL 8a1 muttafaq = "م" + uttafaq } in verb eittafaq euttufiq attafiq uttafaq eittafiq muttafaq; -v8hollow : Root3 -> Verb = -- IL +v8hollow : Root3 -> Verb = -- IL \Hwj -> let { _Htaj = mkHollow ftacal Hwj ; @@ -793,7 +793,7 @@ v8hollow : Root3 -> Verb = -- IL } in verbHollow (toDefForms iHtAj iHtaj uHtIj uHtij aHtAj aHtaj uHtAj uHtaj iHtAj iHtaj ppart) ; -v10sound : Root3 -> Verb = ---- IL 10s -- to be checked +v10sound : Root3 -> Verb = -- IL 10s -- to be checked \qtl -> let { _staqtal = "ستَ" + mkStrong fcal qtl ; @@ -807,7 +807,7 @@ v10sound : Root3 -> Verb = ---- IL 10s -- to be checked } in verb istaqtal ustuqtil astaqtil astaqtal istaqtil mustaqtal ; -v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked +v10hollow : Root3 -> Verb = -- IL 10h -- to be checked \xwf -> let { _staxaf = "سْتَ" + mkHollow fac xwf ; @@ -826,7 +826,7 @@ v10hollow : Root3 -> Verb = ---- IL 10h -- to be checked ustaxAf = "ُ" + _staxAf ; -- VImpf Pas _ ppart = "مُ" + _staxIf -- PPart ("weird anomalies" here too?) - } in verbHollow (toDefForms + } in verbHollow (toDefForms istaxAf istaxaf ustuxIf ustuxif astaxIf astaxif ustaxAf ustaxaf istaxif istaxIf ppart) ; @@ -1079,7 +1079,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> }; - -- if a word ends in ء or ة, don't add alif for indef acc. + -- if a word ends in ء or ة, don't add alif for indef acc. dec1sgNoDoubleAlif : State => Case => Str = \\s,c => case of { => "ً" ; @@ -1274,7 +1274,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> } }; - gn2pgn : {g : Gender; n : Number} -> PerGenNum = \gn -> + gn2pgn : {g : Gender; n : Number} -> PerGenNum = \gn -> case gn of { {g = gn; n = nm} => Per3 gn nm } ; -- these are chosen in many places, trying to be consistent @@ -1349,33 +1349,36 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> empty = [] }; - proDrop : NP -> NP = \np -> + proDrop : NP -> NP = \np -> case np.a.isPron of { - True => np ** {s = table {Nom => [] ; x => np.s ! x}}; + True => np ** {s = table {Nom => [] ; x => np.s ! x}}; _ => np } ; - + emptyNP : NP = { - s = \\_ => [] ; + s = \\_ => [] ; a = {pgn = Per3 Masc Sg ; isPron = False} ; empty = [] } ; agrNP : Agr -> NP = \agr -> emptyNP ** {a = agr} ; - i_Pron : NP = mkPron "أَنَا" "نِي" "ي" (Per1 Sing) ; - youSgMasc_Pron : NP = mkPron "أَنتَ" "كَ" "كَ" (Per2 Masc Sg) ; - youSgFem_Pron : NP = mkPron "أَنتِ" "كِ" "كِ" (Per2 Fem Sg) ; - youDlMasc_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Masc Dl) ; - youDlFem_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Fem Dl) ; - he_Pron : NP = mkPron "هُوَ" "هُ" "هُ" (Per3 Masc Sg) ; - she_Pron : NP = mkPron "هِيَ" "ها" "ها" (Per3 Fem Sg) ; + i_Pron : NP = mkPron "أَنَا" "نِي" "ي" (Per1 Sing) ; we_Pron : NP = mkPron "نَحنُ" "نا" "نا" (Per1 Plur) ; - youPlMasc_Pron : NP = mkPron "أَنتُمْ" "كُمْ" "كُمْ" (Per2 Masc Sg) ; - youPlFem_Pron : NP = mkPron "أَنتُنَّ" "كُنَّ" "كُنَّ" (Per2 Fem Sg) ; - theyMasc_Pron : NP = mkPron "هُمْ" "هُمْ" "هُمْ" (Per3 Masc Pl) ; - theyFem_Pron : NP = mkPron "هُنَّ" "هُنَّ" "هُنَّ" (Per3 Fem Pl) ; + + youSgMasc_Pron : NP = mkPron "أَنتَ" "كَ" "كَ" (Per2 Masc Sg) ; + youSgFem_Pron : NP = mkPron "أَنتِ" "كِ" "كِ" (Per2 Fem Sg) ; + youDlMasc_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Masc Dl) ; + youDlFem_Pron : NP = mkPron "أَنتُمَا" "كُمَا" "كُمَا" (Per2 Fem Dl) ; + youPlMasc_Pron : NP = mkPron "أَنتُمْ" "كُمْ" "كُمْ" (Per2 Masc Pl) ; + youPlFem_Pron : NP = mkPron "أَنتُنَّ" "كُنَّ" "كُنَّ" (Per2 Fem Pl) ; + + he_Pron : NP = mkPron "هُوَ" "هُ" "هُ" (Per3 Masc Sg) ; + she_Pron : NP = mkPron "هِيَ" "ها" "ها" (Per3 Fem Sg) ; theyDlMasc_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Masc Dl) ; - theyDlFem_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Fem Dl) ; + theyDlFem_Pron : NP = mkPron "هُمَا" "هُمَا" "هُمَا" (Per3 Fem Dl) ; + theyMasc_Pron : NP = mkPron "هُمْ" "هُمْ" "هُمْ" (Per3 Masc Pl) ; + theyFem_Pron : NP = mkPron "هُنَّ" "هُنَّ" "هُنَّ" (Per3 Fem Pl) ; + -- Used e.g. to encode the subject as an object clitic -- or to find a possessive suffix corresponding to the NP. @@ -1385,7 +1388,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> False => pgn2pron np.a.pgn } ; - pgn2pron : PerGenNum -> NP = \pgn -> + pgn2pron : PerGenNum -> NP = \pgn -> case pgn of { Per1 Sing => i_Pron ; Per1 Plur => we_Pron ; @@ -1400,7 +1403,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> Per3 Fem Dl => theyDlFem_Pron ; Per3 Masc Dl => theyDlMasc_Pron ; Per3 Fem Pl => theyFem_Pron ; - Per3 Masc Pl => theyMasc_Pron + Per3 Masc Pl => theyMasc_Pron } ; pron2np : NP -> NP = \np -> np ** { @@ -1430,25 +1433,25 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> a : Agr -- can be both subject and object of a QCl, needs full agr. info (stupid given that s depends on gender but meh) } ; - mkIP = overload { + mkIP = overload { mkIP : Str -> Number -> IP = \maa,n -> { - s = \\_p,_g,_s,_c => maa ; + s = \\_p,_g,_s,_c => maa ; a = { pgn = agrP3 NoHum Masc n ; isPron = False } } ; mkIP : (_,_ : Str) -> Number -> IP = \maa,maadhaa,n -> { - s = table { True => \\_g,_s,_c => maa ; - False => \\_g,_s,_c => maadhaa } ; + s = table { True => \\_g,_s,_c => maa ; + False => \\_g,_s,_c => maadhaa } ; a = { pgn = agrP3 NoHum Masc n ; isPron = False } - } + } } ; ip2np : IP -> Bool -> NP = \ip,isPred -> ip ** { s = ip.s ! isPred ! Masc ! Def ; empty = [] } ; np2ip : NP -> IP = \np -> np ** {s = \\_,_,_ => np.s} ; - + IDet : Type = { s : Gender -- IdetCN needs to choose the gender of the CN => State -- Needs to be retained variable for IP; PrepIP chooses the state of IP - => Case => Str ; + => Case => Str ; n : Number ; d : State -- in IdetCN, chooses the state of the CN } ; @@ -1483,7 +1486,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> }; uttVP : VP -> (Gender=>Str) = \vp -> - \\g => vp.s ! Per3 g Sg ! VPPerf + \\g => vp.s ! Per3 g Sg ! VPPerf ++ vp.obj.s ++ vp.pred.s ! {n = Sg ; g = g} ! Nom ++ vp.s2 ; @@ -1503,7 +1506,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> }; passPredV : Verb -> VP = \v -> - let actVP = predV v in actVP ** { + let actVP = predV v in actVP ** { s = \\pgn,vf => case vf of { VPPerf => v.s ! (VPerf Pas pgn) ; @@ -1543,7 +1546,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> _ => vp.pred.s ! gn ! Acc --xabar kaana wa laysa manSoob }; sc : Preposition = case o of {Subord => {s=[]; c=Acc} ; Dir => vp.sc} ; - subj = np.empty ++ sc.s + subj = np.empty ++ sc.s ++ case vp.isPred of { False => (proDrop np).s ! sc.c ; -- prodrop if it's not predicative True => np.s ! sc.c @@ -1552,11 +1555,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> } in case o of { Verbal => vStr t p ++ case vp.obj.a.isPron of { - True => vp.obj.s ++ subj ; -- obj. clitic attaches directly to the verb + True => vp.obj.s ++ subj ; -- obj. clitic attaches directly to the verb False => subj ++ vp.obj.s } ++ vp.s2 ++ pred t p ; VOS => vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p ++ subj ; - Nominal|Subord => subj ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p + Nominal|Subord => subj ++ vStr t p ++ vp.obj.s ++ vp.s2 ++ pred t p } } ; @@ -1616,11 +1619,11 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> predVPSlash : NP -> VPSlash -> ClSlash = \np,v -> v ** { subj = np } ; - + complClSlash = overload { complClSlash : NP -> ClSlash -> Cl = \obj,cls -> predVP cls.subj (insertObj obj cls) ; - complClSlash : ClSlash -> Cl = \cls -> + complClSlash : ClSlash -> Cl = \cls -> predVP cls.subj (insertObj emptyNP cls) -- Empty subject and object } ; @@ -1630,7 +1633,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> ----------------------------------------------------------------------------- -- Relative - param + param RAgr = RSg Gender | RPl Gender | RDl Gender Case ; oper @@ -1675,7 +1678,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf -> \wAhid,awwal,Ula -> let wAhida : Str = case wAhid of { x + "ة" => mkAt wAhid ; - _ => wAhid + "َة" } + _ => wAhid + "َة" } in { s= table { unit => table { diff --git a/src/arabic/StructuralAra.gf b/src/arabic/StructuralAra.gf index 1015dae3c..4502cba1f 100644 --- a/src/arabic/StructuralAra.gf +++ b/src/arabic/StructuralAra.gf @@ -120,7 +120,7 @@ concrete StructuralAra of Structural = CatAra ** yes_Utt = {s = \\_ => "نَعَم"} ; youSg_Pron = youSgMasc_Pron ; youPl_Pron = youPlMasc_Pron ; - youPol_Pron = youSgFem_Pron ; -- arbitrary? + youPol_Pron = youPlFem_Pron ; -- arbitrary? have_V2 = dirV2 (regV "يَملِك") ; From d6310e2a8b9c62a0b495468347368252c663888d Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 20 Nov 2018 15:47:47 +0100 Subject: [PATCH 5/5] (Ara) Add AdjOrd + AdvS --- src/arabic/AdjectiveAra.gf | 2 ++ src/arabic/MissingAra.gf | 3 --- src/arabic/SentenceAra.gf | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/arabic/AdjectiveAra.gf b/src/arabic/AdjectiveAra.gf index 20988aeaa..93c64a428 100644 --- a/src/arabic/AdjectiveAra.gf +++ b/src/arabic/AdjectiveAra.gf @@ -44,4 +44,6 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in { s = \\h,g,n,d,c => a.s ! AComp d c }; + -- : Ord -> AP ; -- warmest + AdjOrd ord = {s = \\h,g,n,s,c => ord.s ! g ! s ! c} ; } diff --git a/src/arabic/MissingAra.gf b/src/arabic/MissingAra.gf index d95c86912..e714eb0e5 100644 --- a/src/arabic/MissingAra.gf +++ b/src/arabic/MissingAra.gf @@ -3,11 +3,8 @@ resource MissingAra = open GrammarAra, Prelude in { -- temporary definitions to enable the compilation of RGL API oper AdAdv : AdA -> Adv -> Adv = notYet "AdAdv" ; oper AdVVP : AdV -> VP -> VP = notYet "AdVVP" ; -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 AdvS : Adv -> S -> S = notYet "AdvS" ; oper BaseRS : RS -> RS -> ListRS = notYet "BaseRS" ; oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ; oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ; diff --git a/src/arabic/SentenceAra.gf b/src/arabic/SentenceAra.gf index 34267a0f5..a46854c16 100644 --- a/src/arabic/SentenceAra.gf +++ b/src/arabic/SentenceAra.gf @@ -86,4 +86,6 @@ concrete SentenceAra of Sentence = CatAra ** open UseRCl t p cl = {s = \\agr,c => t.s ++ p.s ++ cl.s ! t.t ! p.p ! agr ! c} ; UseSlash t p cl = UseCl t p (complClSlash cl) ; + + AdvS adv s = s ** {s = \\o => adv.s ++ s.s ! o} ; }