From 1838781123cf81757b0d4ff29ee4253995b7a5b3 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 6 Jun 2012 09:48:05 +0000 Subject: [PATCH] nominalization in Extra Dut and Eng (from Ramona) --- lib/src/abstract/Extra.gf | 4 ++++ lib/src/dutch/ExtraDut.gf | 12 +++++++++++- lib/src/dutch/ExtraDutAbs.gf | 6 +++++- lib/src/dutch/ParadigmsDut.gf | 11 ++++++++++- lib/src/english/ExtraEng.gf | 18 ++++++++++++++++++ lib/src/english/ExtraEngAbs.gf | 3 +++ 6 files changed, 51 insertions(+), 3 deletions(-) diff --git a/lib/src/abstract/Extra.gf b/lib/src/abstract/Extra.gf index eda65e1e6..75a6b6f7b 100644 --- a/lib/src/abstract/Extra.gf +++ b/lib/src/abstract/Extra.gf @@ -74,4 +74,8 @@ abstract Extra = Cat ** { PassVPSlash : VPSlash -> VP ; -- be forced to sleep +-- publishing of the document + + NominalizeVPSlashNP : VPSlash -> NP -> NP ; + } diff --git a/lib/src/dutch/ExtraDut.gf b/lib/src/dutch/ExtraDut.gf index 579da2f47..ad7188ec3 100644 --- a/lib/src/dutch/ExtraDut.gf +++ b/lib/src/dutch/ExtraDut.gf @@ -1,5 +1,5 @@ concrete ExtraDut of ExtraDutAbs = CatDut ** - open ResDut, Coordination, Prelude, IrregDut in + open ResDut, MorphoDut, Coordination, Prelude, IrregDut in { --{ -- @@ -113,4 +113,14 @@ lin ConjVPS = conjunctDistrTable2 Order Agr ; +lin + NominalizeVPSlashNP vpslash np = + let vp : ResDut.VP = insertObjNP np.isPron (\\_ => appPrep vpslash.c2 np.s) vpslash ; + agrDef : Agr = agrP3 Sg ; + compl : Str = vp.n0 ! agrDef ++ vp.a1 ! Pos ++ vp.n2 ! agrDef ++ vp.s.prefix ; + inf : Str = vp.inf.p1 ; + extra : Str = vp.ext + in + lin NP (MorphoDut.mkNP (vp.s.s ! VInf ++ "van" ++ compl ++ inf ++ extra ) Utr Sg) ; + } diff --git a/lib/src/dutch/ExtraDutAbs.gf b/lib/src/dutch/ExtraDutAbs.gf index b7f94f673..f6b9297e1 100644 --- a/lib/src/dutch/ExtraDutAbs.gf +++ b/lib/src/dutch/ExtraDutAbs.gf @@ -2,8 +2,10 @@ abstract ExtraDutAbs = Extra [ VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI, VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS, Temp,Pol,S,NP, - VV,VP,Conj,IComp,ICompAP,IAdvAdv,Adv,AP,IAdv] ** + VV,VP,Conj,IComp,ICompAP,IAdvAdv,Adv,AP,IAdv, + VPSlash, NominalizeVPSlashNP] ** { + --{ -- -- fun @@ -14,4 +16,6 @@ abstract ExtraDutAbs = Extra [ -- --} + + } diff --git a/lib/src/dutch/ParadigmsDut.gf b/lib/src/dutch/ParadigmsDut.gf index dfa80b125..5a11e38f0 100644 --- a/lib/src/dutch/ParadigmsDut.gf +++ b/lib/src/dutch/ParadigmsDut.gf @@ -40,7 +40,8 @@ oper de : Gender ; -- non-neutrum het : Gender ; -- neutrum - + nominative : Case ; -- nominative of nouns + genitive : Case ; -- genitive of nouns --2 Nouns @@ -48,6 +49,8 @@ oper mkN : (muis : Str) -> N ; -- de muis-muisen, with some predictable exceptions mkN : (bit : Str) -> Gender -> N ; -- if gender is not predictable mkN : (gat,gaten : Str) -> Gender -> N ; -- worst-case for nouns + mkN : (huis, boot : N) -> N ; -- compound huisboot + mkN : (station, hal : N) -> Case -> N ; -- compound stationshal } ; -- Relational nouns need a preposition. The most common is "van". @@ -195,6 +198,10 @@ oper = \a,b -> lin N (regNounG a b) ; mkN : (gat,gaten : Str) -> Gender -> N = \a,b,c -> lin N (mkNoun a b c) ; + mkN : (huis,boot : N) -> N + = \huis,boot -> lin N {s = \\n => huis.s ! NF Sg Nom + boot.s ! n ; g = boot.g} ; + mkN : (huis,boot : N) -> Case -> N + = \huis,boot,c -> lin N {s = \\n => huis.s ! NF Sg c + boot.s ! n ; g = boot.g} ; } ; mkN2 = overload { @@ -213,6 +220,8 @@ oper feminine = Utr ; het,neuter = Neutr ; de,utrum = Utr ; + nominative = Nom ; + genitive = Gen ; mkA = overload { mkA : (vers : Str) -> A = \a -> lin A (regAdjective a) ; diff --git a/lib/src/english/ExtraEng.gf b/lib/src/english/ExtraEng.gf index 838d7ac38..d3765089b 100644 --- a/lib/src/english/ExtraEng.gf +++ b/lib/src/english/ExtraEng.gf @@ -112,6 +112,24 @@ concrete ExtraEng of ExtraEngAbs = CatEng ** typ = VVAux } ; + may_VV = lin VV { + s = table { + VVF VInf => ["be allowed to"] ; + VVF VPres => "may" ; + VVF VPPart => ["been allowed to"] ; + VVF VPresPart => ["being allowed to"] ; + VVF VPast => "might" ; + VVPastNeg => "mightn't" ; + VVPresNeg => "may not" + } ; + typ = VVAux + } ; + + + NominalizeVPSlashNP vpslash np = + let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash + in + lin NP {s=\\_=>vp.ad ++ vp.prp ++ vp.s2! (AgP3Sg Neutr); a=AgP3Sg Neutr } ; lin UncNeg = {s = [] ; p = CNeg False} ; diff --git a/lib/src/english/ExtraEngAbs.gf b/lib/src/english/ExtraEngAbs.gf index f2d6e9752..b5f733aef 100644 --- a/lib/src/english/ExtraEngAbs.gf +++ b/lib/src/english/ExtraEngAbs.gf @@ -21,7 +21,9 @@ abstract ExtraEngAbs = Extra - [ProDrop] ** { do_VV : VV ; + may_VV : VV ; +--------------------- --- these are obsolete: use UncNeg : Pol instead fun @@ -33,4 +35,5 @@ abstract ExtraEngAbs = Extra - [ProDrop] ** { UncNegImpPl : Pol -> Imp -> Utt; -- do not help yourselves + }