From ba911da6c396c685884f92cf5628b89f76c0d4e8 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 6 May 2019 16:04:46 +0200 Subject: [PATCH] (Extend,Romance) Add construction AdvIsNPAP (#235) e.g. "here are the instructions documented", default implementation in common/ExtendFunctor is "the instructions are documented here". --- src/abstract/Extend.gf | 1 + src/common/ExtendFunctor.gf | 3 ++- src/romance/ExtendRomanceFunctor.gf | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 5e5039d0..475c41ab 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -117,6 +117,7 @@ abstract Extend = Cat ** { -- generalisation of existential, with adverb as a parameter AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees + AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented -- infinitive for purpose AR 21/8/2013 diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index 311d712b..251b52a9 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -54,7 +54,8 @@ lin ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; ExistMassCN cn = ExistNP (MassNP cn) ; ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ; - AdvIsNP adv np = PredVP np (UseComp (CompAdv adv)) ; -- here is the tree / here are the trees + AdvIsNP adv np = PredVP np (UseComp (CompAdv adv)) ; -- here is the tree / here are the trees ; DEFAULT the tree is here + AdvIsNPAP adv np ap = PredVP np (AdvVP (UseComp (CompAP ap)) adv) ; -- here are the instructions documented ; DEFAULT the instructions are documented here PurposeVP = variants {} ; -- VP -> Adv ; -- to become happy ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs SlashBareV2S = SlashV2S ; -- V2S -> S -> VPSlash ; -- answer (to him) it is good ; DEFAULT answer that it is good diff --git a/src/romance/ExtendRomanceFunctor.gf b/src/romance/ExtendRomanceFunctor.gf index deb5d009..1fa53550 100644 --- a/src/romance/ExtendRomanceFunctor.gf +++ b/src/romance/ExtendRomanceFunctor.gf @@ -123,6 +123,12 @@ incomplete concrete ExtendRomanceFunctor of Extend = ExistMassCN cn = ExistNP (MassNP cn) ; ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ; AdvIsNP adv np = mkClause adv.s False False np.a (UseComp_estar (CompNP np)) ; + AdvIsNPAP adv np ap = -- está + let emptyN : N = lin N {s = \\_ => [] ; g = np.a.g} ; -- To match the gender of the N + indef : Quant = IndefArt ** {s = \\b,n,g,c => []} ; + det : Det = case np.a.n of {Sg => DetQuant indef NumSg ; Pl => DetQuant indef NumPl} ; + apAsNP : NP = DetCN det (AdjCN ap (UseN emptyN)) ; -- NP where the string comes only from AP + in AdvIsNP adv (ApposNP apAsNP np) ; lin ComplBareVS = ComplVS ; -- VS -> S -> VP ; -- say she runs ; DEFAULT say that she runs