diff --git a/src/dutch/CatDut.gf b/src/dutch/CatDut.gf index b72a8bfb..6f606cdb 100644 --- a/src/dutch/CatDut.gf +++ b/src/dutch/CatDut.gf @@ -53,6 +53,7 @@ concrete CatDut of Cat = Predet = {s : Number => Gender => Str} ; Num = {s : Str ; n : Number ; isNum : Bool} ; Card = {s : Gender => Case => Str ; n : Number} ; + ACard = {s : Str} ; Ord = {s : AForm => Str} ; -- Numeral diff --git a/src/dutch/ConstructionDut.gf b/src/dutch/ConstructionDut.gf index 6d629bb6..2047a19a 100644 --- a/src/dutch/ConstructionDut.gf +++ b/src/dutch/ConstructionDut.gf @@ -31,6 +31,10 @@ lin is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsDut.mkN "ongelijk")) ; n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP (lin CN cn)))) (lin A a) ; + + n_units_of_NP card cn np = + G.AdvNP (G.DetCN (G.DetQuant G.IndefArt (G.NumCard card)) cn) + (G.PrepNP (mkPrep "van") np) ; bottle_of_CN np = N.ApposCN (mkCN (mkN "vles")) np ; --- vlesje for beer cup_of_CN np = N.ApposCN (mkCN (mkN "kopje")) np ; diff --git a/src/dutch/ExtendDut.gf b/src/dutch/ExtendDut.gf index 3e0c134a..c53dd62e 100644 --- a/src/dutch/ExtendDut.gf +++ b/src/dutch/ExtendDut.gf @@ -2,12 +2,18 @@ concrete ExtendDut of Extend = CatDut ** ExtendFunctor - - [PastPartAP,ICompAP,IAdvAdv, + - [PastPartAP,PastPartAgentAP,PresPartAP,ProgrVPSlash,ICompAP,IAdvAdv, VPS, BaseVPS, ConsVPS, MkVPS, ConjVPS, PredVPS, + VPI,BaseVPI,ConsVPI,MkVPI,ConjVPI,ComplVPIVV, PassVPSlash, PassAgentVPSlash, - CompoundN + RNP,RNPList,ReflRNP,ReflPron,ReflPoss,PredetRNP, + AdvRNP,AdvRVP,AdvRAP,ReflA2RNP,PossPronRNP, + ConjRNP,Base_rr_RNP,Base_nr_RNP,Base_rn_RNP,Cons_rr_RNP,Cons_nr_RNP, + CompoundN,CompoundAP,GerundCN,GerundNP,GerundAdv,ByVP,InOrderToVP, + ApposNP,PositAdVAdj, + BaseComp,ConsComp,ConjComp,BaseImp,ConsImp,ConjImp ] with (Grammar = GrammarDut) ** @@ -27,9 +33,31 @@ lin --# notpresent isPre = notB vp.isHeavy ; --# notpresent } ; --# notpresent +lin + PresPartAP vp = { + s = \\agr,af => + (infClause [] agr vp (case vp.isHeavy of {True => APred ; False => af})).s ! + Pres ! Simul ! Pos ! Sub ; + isPre = notB vp.isHeavy + } ; + + PastPartAgentAP vp np = { + s = \\agr,af => + (infClause [] agr vp APred).s ! Past ! Anter ! Pos ! Sub ++ + "door" ++ np.s ! NPAcc ; + isPre = False + } ; + + ProgrVPSlash vp = + let vpi = infVP True vp in + insertAdv ("aan het" ++ vpi.inf ++ vpi.ext) + (insertObj vpi.obj (compV zijn_V)) ** {c2 = vp.c2} ; + lincat VPS = {s : Order => Agr => Str} ; [VPS] = {s1,s2 : Order => Agr => Str} ; + VPI = {s : Bool => Agr => Str} ; + [VPI] = {s1,s2 : Bool => Agr => Str} ; lin BaseVPS = twoTable2 Order Agr ; @@ -100,6 +128,14 @@ lin lin ConjVPS = conjunctDistrTable2 Order Agr ; + BaseVPI = twoTable2 Bool Agr ; + ConsVPI = consrTable2 Bool Agr comma ; + MkVPI vp = {s = \\bare => useInfVP bare vp} ; + ConjVPI = conjunctDistrTable2 Bool Agr ; + ComplVPIVV vv vpi = + insertObj (\\agr => vpi.s ! vv.isAux ! agr) + (predVGen vv.isAux AfterObjs vv) ; + ICompAP ap = {s = \\agr => "hoe" ++ ap.s ! agr ! APred} ; IAdvAdv adv = {s = "hoe" ++ adv.s} ; @@ -127,4 +163,114 @@ lin CompoundN n1 n2 = { g = n2.g } ; +lin CompoundAP noun adj = { + s = \\agr,af => noun.s ! NF Sg Nom ++ BIND ++ adj.s ! Posit ! af ; + isPre = True + } ; + +lincat + RNP = {s : Agr => Str ; isPron : Bool} ; + RNPList = {s1,s2 : Agr => Str} ; + +lin + ReflRNP vps rnp = + insertObjNP (andB rnp.isPron (notB vps.c2.p2)) vps.negPos + (\\agr => appPrep vps.c2.p1 (npLite (\\_ => rnp.s ! agr))) vps ; + + ReflPron = {s = reflPron ; isPron = True} ; + + ReflPoss num cn = { + s = \\agr => reflPossDet agr num.n cn.g ++ num.s ++ + cn.s ! Strong ! NF num.n Nom ; + isPron = False + } ; + + PredetRNP pred rnp = { + s = \\agr => pred.s ! agr.n ! agr.g ++ rnp.s ! agr ; + isPron = False + } ; + + AdvRNP np prep rnp = { + s = \\agr => np.s ! NPAcc ++ + appPrep prep (npLite (\\_ => rnp.s ! agr)) ; + isPron = False + } ; + + AdvRVP vp prep rnp = + insertObj (\\agr => appPrep prep (npLite (\\_ => rnp.s ! agr))) vp ; + + AdvRAP ap prep rnp = { + s = \\agr,af => ap.s ! agr ! af ++ + appPrep prep (npLite (\\_ => rnp.s ! agr)) ; + isPre = False + } ; + + ReflA2RNP adj rnp = { + s = \\agr,af => adj.s ! Posit ! af ++ + appPrep adj.c2 (npLite (\\_ => rnp.s ! agr)) ; + isPre = False + } ; + + PossPronRNP pron num cn rnp = heavyNP { + s = \\_ => pron.stressed.poss ++ num.s ++ + cn.s ! Strong ! NF num.n Nom ++ "van" ++ rnp.s ! pron.a ; + a = agrP3 num.n + } ; + + ConjRNP conj rnps = conjunctDistrTable Agr conj rnps ** {isPron = False} ; + Base_rr_RNP = twoTable Agr ; + Base_nr_RNP np rnp = twoTable Agr {s = \\_ => np.s ! NPAcc} rnp ; + Base_rn_RNP rnp np = twoTable Agr rnp {s = \\_ => np.s ! NPAcc} ; + Cons_rr_RNP = consrTable Agr comma ; + Cons_nr_RNP np rnps = consrTable Agr comma {s = \\_ => np.s ! NPAcc} rnps ; + +lin + GerundCN vp = { + s = \\_,_ => useInfVP True vp ! agrP3 Sg ; + g = Neutr + } ; + + GerundNP vp = heavyNP { + s = \\_ => useInfVP True vp ! agrP3 Sg ; + a = agrP3 Sg + } ; + + GerundAdv vp = { + s = (infClause [] (agrP3 Sg) vp APred).s ! Pres ! Simul ! Pos ! Sub + } ; + + ByVP vp = {s = "door" ++ useInfVP True vp ! agrP3 Sg} ; + InOrderToVP vp = {s = "om" ++ useInfVP False vp ! agrP3 Sg} ; + + ApposNP np1 np2 = heavyNP { + s = \\c => np1.s ! c ++ bindComma ++ np2.s ! c ; + a = np1.a + } ; + + PositAdVAdj adj = {s = adj.s ! Posit ! APred} ; + +lincat + [Comp] = {s1,s2 : Agr => Str} ; + [Imp] = {s1,s2 : Polarity => ImpForm => Str} ; + +lin + BaseComp = twoTable Agr ; + ConsComp = consrTable Agr comma ; + ConjComp = conjunctDistrTable Agr ; + BaseImp = twoTable2 Polarity ImpForm ; + ConsImp = consrTable2 Polarity ImpForm comma ; + ConjImp = conjunctDistrTable2 Polarity ImpForm ; + +oper + reflPossDet : Agr -> Number -> Gender -> Str = \agr,n,g -> + case of { + => "mijn" ; + => "jouw" ; + => "zijn" ; + => "ons" ; + => "onze" ; + => "jullie" ; + => "hun" + } ; + } diff --git a/src/dutch/IdiomDut.gf b/src/dutch/IdiomDut.gf index ea9524fe..2d002f34 100644 --- a/src/dutch/IdiomDut.gf +++ b/src/dutch/IdiomDut.gf @@ -32,6 +32,11 @@ concrete IdiomDut of Idiom = CatDut ** } } ; + ExistNPAdv np adv = + mkClause "er" (agrP3 np.a.n) + (insertAdv adv.s + (insertObj (\\_ => np.s ! NPNom) (predV zijn_V))) ; + ProgrVP vp = let vpi = infVP True vp in insertAdv ("aan het" ++ vpi.inf ++ vpi.ext) (insertObj vpi.obj (compV zijn_V)) ; diff --git a/src/dutch/NounDut.gf b/src/dutch/NounDut.gf index 84972558..af01829b 100644 --- a/src/dutch/NounDut.gf +++ b/src/dutch/NounDut.gf @@ -199,8 +199,25 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in { g = cn.g } ; + PartNP cn np = { + s = \\a,nc => cn.s ! a ! nc ++ "van" ++ np.s ! NPAcc ; + g = cn.g + } ; + + CountNP det np = heavyNP { + s = \\c => det.s ! Neutr ++ "van" ++ np.s ! c ; + a = agrP3 det.n + } ; + DetDAP det = det ; + AdjDAP dap ap = dap ** { + s = \\g => dap.s ! g ++ + ap.s ! agrgP3 g dap.n ! agrAdj g dap.a (NF dap.n Nom) ; + sp = \\g => dap.sp ! g ++ + ap.s ! agrgP3 g dap.n ! agrAdj g dap.a (NF dap.n Nom) + } ; + QuantityNP n m = noMerge ** { s = \\c => preOrPost m.isPre m.s (n.s ! NCard Utr Nom) ; a = agrP3 n.n ; diff --git a/src/dutch/NumeralDut.gf b/src/dutch/NumeralDut.gf index f13fdfb8..d4f26a4e 100644 --- a/src/dutch/NumeralDut.gf +++ b/src/dutch/NumeralDut.gf @@ -39,18 +39,50 @@ lin pot1plus d e = addAttr {s = \\g => e.s ! DUnit ! invNum ++ BIND ++ e.en ++ BIND ++ d.s ! DTen ! g ; n = Pl} ; pot1as2 n = n ; + pot21 = addAttr {s = cardOrd "honderd" "honderdste" ; n = Pl} ; pot2 d = addAttr {s = \\g => d.attr ++ cardOrd "honderd" "honderdste" ! g ; n = Pl} ; pot2plus d e = addAttr {s = \\g => d.attr ++ "honderd" ++ BIND ++ e.s ! g ; n = Pl} ; pot2as3 n = n ; + pot31 = addAttr {s = cardOrd "duizend" "duizendste" ; n = Pl} ; pot3 n = addAttr {s = \\g => n.attr ++ cardOrd "duizend" "duizendste" ! g ; n = Pl} ; pot3plus n m = addAttr {s = \\g => n.attr ++ "duizend" ++ m.s ! g ; n = Pl} ; pot3as4 n = n ; + + pot3decimal d = addAttr {s = d.s ; n = d.n} ; + + pot41 = addAttr {s = cardOrd "een miljoen" "miljoenste" ; n = Pl} ; + pot4 n = addAttr { + s = \\g => n.s ! invNum ++ cardOrd "miljoen" "miljoenste" ! g ; + n = Pl + } ; + pot4plus n m = addAttr { + s = \\g => n.s ! invNum ++ "miljoen" ++ m.s ! g ; + n = Pl + } ; pot4as5 n = n ; + pot4decimal d = addAttr { + s = \\g => d.s ! invNum ++ cardOrd "miljoen" "miljoenste" ! g ; + n = Pl + } ; + + pot51 = addAttr {s = cardOrd "een miljard" "miljardste" ; n = Pl} ; + pot5 n = addAttr { + s = \\g => n.s ! invNum ++ cardOrd "miljard" "miljardste" ! g ; + n = Pl + } ; + pot5plus n m = addAttr { + s = \\g => n.s ! invNum ++ "miljard" ++ m.s ! g ; + n = Pl + } ; + pot5decimal d = addAttr { + s = \\g => d.s ! invNum ++ cardOrd "miljard" "miljardste" ! g ; + n = Pl + } ; lincat Dig = TDigit ; diff --git a/src/dutch/SentenceDut.gf b/src/dutch/SentenceDut.gf index 3efc1ca1..2c37e423 100644 --- a/src/dutch/SentenceDut.gf +++ b/src/dutch/SentenceDut.gf @@ -56,6 +56,10 @@ concrete SentenceDut of Sentence = CatDut ** open ResDut, Prelude in { UseCl t p cl = { s = \\o => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! o } ; + + AdvImp adv imp = { + s = \\pol,form => adv.s ++ imp.s ! pol ! form + } ; UseQCl t p cl = { s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! q } ;