diff --git a/src/dutch/AdjectiveDut.gf b/src/dutch/AdjectiveDut.gf index 64865f064..12b22ff29 100644 --- a/src/dutch/AdjectiveDut.gf +++ b/src/dutch/AdjectiveDut.gf @@ -7,50 +7,52 @@ concrete AdjectiveDut of Adjective = CatDut ** open ResDut, Prelude in lin PositA a = { - s = a.s ! Posit ; + s = \\agr => a.s ! Posit ; isPre = True } ; ComparA a np = { - s = \\af => a.s ! Compar ! af ++ "dan" ++ np.s ! NPNom ; + s = \\agr,af => a.s ! Compar ! af ++ "dan" ++ np.s ! NPNom ; isPre = True } ; CAdvAP ad ap np = { - s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ np.s ! NPNom ; + s = \\agr,af => ad.s ++ ap.s ! agr ! af ++ ad.p ++ np.s ! NPNom ; isPre = False } ; UseComparA a = { - s = \\af => a.s ! Compar ! af ; + s = \\agr => a.s ! Compar ; isPre = True } ; AdjOrd a = { - s = a.s ; + s = \\agr => a.s ; isPre = True } ; -- $SuperlA$ belongs to determiner syntax in $Noun$. ComplA2 a np = { - s = \\af => a.s ! Posit ! af ++ appPrep a.c2 np ; + s = \\agr,af => a.s ! Posit ! af ++ appPrep a.c2 np ; isPre = True } ; ReflA2 a = { - s = \\af => a.s ! Posit ! APred ++ appPrep a.c2 (npLite (\\_ => reflPron ! agrP3 Sg)) ; --- agr + s = \\agr,af => a.s ! Posit ! APred ++ + appPrep a.c2 (npLite (\\_ => reflPron ! agr)) ; + isPre = True } ; SentAP ap sc = { - s = \\a => ap.s ! a ++ sc.s ; + s = \\agr,af => ap.s ! agr ! af ++ sc.s ; isPre = False } ; AdAP ada ap = { - s = \\a => ada.s ++ ap.s ! a ; + s = \\agr,af => ada.s ++ ap.s ! agr ! af ; isPre = ap.isPre } ; UseA2 a = { - s = a.s ! Posit ; + s = \\agr => a.s ! Posit ; isPre = True } ; diff --git a/src/dutch/CatDut.gf b/src/dutch/CatDut.gf index b6d8bab62..9f070439c 100644 --- a/src/dutch/CatDut.gf +++ b/src/dutch/CatDut.gf @@ -39,7 +39,7 @@ concrete CatDut of Cat = -- Adjective - AP = {s : AForm => Str ; isPre : Bool} ; + AP = {s : Agr => AForm => Str ; isPre : Bool} ; -- Noun diff --git a/src/dutch/ConjunctionDut.gf b/src/dutch/ConjunctionDut.gf index 09df6bbe6..570cc7e85 100644 --- a/src/dutch/ConjunctionDut.gf +++ b/src/dutch/ConjunctionDut.gf @@ -13,7 +13,7 @@ concrete ConjunctionDut of Conjunction = a = {g = Utr ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} }) ; - ConjAP conj ss = conjunctDistrTable AForm conj ss ** { + ConjAP conj ss = conjunctDistrTable2 Agr AForm conj ss ** { isPre = ss.isPre } ; @@ -27,8 +27,8 @@ concrete ConjunctionDut of Conjunction = ConsAdv = consrSS comma ; BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a} ; ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a} ; - BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ; - ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ; + BaseAP x y = twoTable2 Agr AForm x y ** {isPre = andB x.isPre y.isPre} ; + ConsAP xs x = consrTable2 Agr AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ; BaseRS x y = twoTable2 Gender Number x y ** {c = y.c} ; ConsRS xs x = consrTable2 Gender Number comma xs x ; @@ -36,7 +36,7 @@ concrete ConjunctionDut of Conjunction = [S] = {s1,s2 : Order => Str} ; [Adv] = {s1,s2 : Str} ; [NP] = {s1,s2 : NPCase => Str ; a : Agr} ; - [AP] = {s1,s2 : AForm => Str ; isPre : Bool} ; + [AP] = {s1,s2 : Agr => AForm => Str ; isPre : Bool} ; [RS] = {s1,s2 : Gender => Number => Str} ; } diff --git a/src/dutch/ExtraDut.gf b/src/dutch/ExtraDut.gf index 95ff440a6..b467e086e 100644 --- a/src/dutch/ExtraDut.gf +++ b/src/dutch/ExtraDut.gf @@ -38,7 +38,7 @@ concrete ExtraDut of ExtraDutAbs = CatDut ** lin - ICompAP ap = {s = \\_ => "hoe" ++ ap.s ! APred} ; + ICompAP ap = {s = \\agr => "hoe" ++ ap.s ! agr ! APred} ; IAdvAdv adv = {s = "hoe" ++ adv.s} ; diff --git a/src/dutch/NounDut.gf b/src/dutch/NounDut.gf index 9d014af93..dcd3db2f0 100644 --- a/src/dutch/NounDut.gf +++ b/src/dutch/NounDut.gf @@ -35,7 +35,7 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in { PPartNP np v2 = np ** heavyNP { s = \\c => np.s ! c ++ v2.s ! VPerf ; -- invar part - a = np.a + a = np.a ; } ; AdvNP np adv = np ** heavyNP { @@ -163,7 +163,7 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in { in { s = \\a,n => preOrPost ap.isPre - (ap.s ! agrAdj g a n) + (ap.s ! agrP3 Sg ! agrAdj g a n) (cn.s ! a ! n) ; g = g } ; diff --git a/src/dutch/PhraseDut.gf b/src/dutch/PhraseDut.gf index ff442c7e4..a3555a6fd 100644 --- a/src/dutch/PhraseDut.gf +++ b/src/dutch/PhraseDut.gf @@ -20,7 +20,7 @@ concrete PhraseDut of Phrase = CatDut ** open Prelude, ResDut in UttAdv adv = adv ; UttCN n = {s = n.s ! Strong ! NF Sg Nom} ; UttCard n = {s = n.s ! Utr ! Nom} ; - UttAP ap = {s = ap.s ! APred} ; + UttAP ap = {s = ap.s ! agrP3 Sg ! APred} ; UttInterj i = i ; UttAdV a = a ; diff --git a/src/dutch/ResDut.gf b/src/dutch/ResDut.gf index 2867e079b..ceb3afb40 100644 --- a/src/dutch/ResDut.gf +++ b/src/dutch/ResDut.gf @@ -479,11 +479,16 @@ param --2 Transformations between parameter types - oper Agr : Type = {g : Gender ; n : Number ; p : Person} ; + -- IL2018-02: a whole lot of times we only need number and person, not gender + -- maybe switch to PersAgr at some point and halve the number of fields + oper PersAgr : Type = {n : Number ; p : Person} ; + oper Agr : Type = PersAgr ** {g : Gender} ; oper - agrP3 : Number -> Agr = agrgP3 Neutr ; + pagr : Agr -> PersAgr = \agr -> { p = agr.p ; n = agr.n } ; + pagrP3 : Number -> PersAgr = \num -> {p = P3; n = num } ; + agrP3 : Number -> Agr = agrgP3 Neutr ; agrgP3 : Gender -> Number -> Agr = \g,n -> {g = g ; n = n ; p = P3} ; @@ -677,12 +682,12 @@ param vpi.p1 ! agrP3 Sg ++ vpi.p2 ++ vpi.p3 ; -- TODO reflPron : Agr => Str = table { - {n = Sg ; p = P1} => "me" ; - {n = Sg ; p = P2} => "je" ; - {n = Sg ; p = P3} => "zich" ; - {n = Pl ; p = P1} => "ons" ; - {n = Pl ; p = P2} => "je" ; - {n = Pl ; p = P3} => "zich" + {n = Sg ; p = P1} => "mijzelf" ; + {n = Sg ; p = P2} => "jezelf" ; + {n = Sg ; p = P3} => "zichzelf" ; + {n = Pl ; p = P1} => "onszelf" ; + {n = Pl ; p = P2} => "jezelf" ; + {n = Pl ; p = P3} => "zichzelf" } ; conjThat : Str = "dat" ; @@ -749,6 +754,6 @@ param heavyNP : {s : NPCase => Str ; a : Agr} -> {s : NPCase => Str ; a : Agr ; isPron : Bool} = \np -> - np ** {isPron = False} ; + np ** {isPron = False ; mergesWithPrep = False ; mergeForm = [] } ; } diff --git a/src/dutch/VerbDut.gf b/src/dutch/VerbDut.gf index 1805479c1..cfa52f64d 100644 --- a/src/dutch/VerbDut.gf +++ b/src/dutch/VerbDut.gf @@ -23,7 +23,8 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in { insertExtrapos (conjThat ++ s.s ! Sub) (predV v) ; ComplVQ v q = insertExtrapos (q.s ! QIndir) (predV v) ; - ComplVA v ap = insertObj (\\ _ => ap.s ! APred) (predVGen False BetweenObjs v) ; + ComplVA v ap = + insertObj (\\agr => ap.s ! agr ! APred) (predVGen False BetweenObjs v) ; SlashV2a v = predV (v2v v) ** {c2 = v.c2} ; @@ -43,13 +44,12 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in { insertExtrapos vpi.p3 ( insertInf vpi.p2 ( insertObj vpi.p1 ((predVGen v.isAux vp.negPos v)))) ** {c2 = v.c2} ; - SlashV2A v ap = - insertObj (\\_ => ap.s ! APred) (predVGen False BetweenObjs (v2v v)) ** {c2 = v.c2} ; + insertObj (\\agr => ap.s ! agr ! APred) + (predVGen False BetweenObjs (v2v v)) ** {c2 = v.c2} ; --vp.c2.p2: if the verb has a preposition or not ComplSlash vp np = insertObjNP np.isPron (case vp.c2.p2 of {True => BeforeObjs; False => vp.negPos}) (\\_ => appPrep vp.c2.p1 np) vp ; - SlashVV v vp = let vpi = infVP v.isAux vp @@ -78,7 +78,7 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in { CompCN cn = {s = \\a => case a.n of { Sg => "een" ++ cn.s ! Strong ! NF Sg Nom ; Pl => cn.s ! Strong ! NF Pl Nom }} ; - CompAP ap = {s = \\_ => ap.s ! APred} ; + CompAP ap = {s = \\agr => ap.s ! agr ! APred} ; -- agr needed for reflexives: "married to my/your/...self" CompNP np = {s = \\_ => np.s ! NPNom} ; CompAdv a = {s = \\_ => a.s} ; @@ -95,10 +95,10 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in { VPSlashPrep vp prep = vp ** {c2 = } ; + ---- workaround for a subtyping bug oper v2v : VVerb -> VVerb = \v -> {s = v.s ; aux = v.aux ; prefix = v.prefix ; particle = v.particle ; vtype = v.vtype} ; predVv : VVerb -> ResDut.VP = \v -> predV (v2v v) ; - }