From 161e981a29139b0148108407ec38bf1eacfca449 Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 8 Nov 2017 08:42:54 +0100 Subject: [PATCH] ExistCN with a/no variation in Extend --- src/abstract/Extend.gf | 6 ++++++ src/common/ExtendFunctor.gf | 5 ++++- src/english/ExtendEng.gf | 19 ++++++++++++++++++- src/english/ResEng.gf | 8 ++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/abstract/Extend.gf b/src/abstract/Extend.gf index 8298ee001..4e641d7df 100644 --- a/src/abstract/Extend.gf +++ b/src/abstract/Extend.gf @@ -109,6 +109,12 @@ abstract Extend = Cat ** { ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers +-- existentials with a/no variation + + ExistCN : CN -> Cl ; -- there is a car / there is no car + ExistMassCN : CN -> Cl ; -- there is beer / there is no beer + ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees + -- infinitive for purpose AR 21/8/2013 PurposeVP : VP -> Adv ; -- to become happy diff --git a/src/common/ExtendFunctor.gf b/src/common/ExtendFunctor.gf index 4fa91f8a2..cabc9730f 100644 --- a/src/common/ExtendFunctor.gf +++ b/src/common/ExtendFunctor.gf @@ -51,7 +51,10 @@ lin PastPartAP = variants {} ; -- VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space PastPartAgentAP = variants {} ; -- VPSlash -> NP -> AP ; -- (opportunity) lost by the company NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ; - ExistsNP = variants {} ; -- NP -> Cl ; -- there exists a number / there exist numbers + ExistsNP = ExistNP ; -- NP -> Cl ; -- there exists a number / there exist numbers + ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; + ExistMassCN cn = ExistNP (MassNP cn) ; + ExistPluralCN cn = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ; 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/english/ExtendEng.gf b/src/english/ExtendEng.gf index d44ae4dfc..e9d9fbd92 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -11,7 +11,8 @@ concrete ExtendEng of Extend = Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN, CompIQuant, CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP, CompoundN, ConjRNP, ConjVPS, ConsVPS, Cons_nr_RNP, Cons_rr_RNP, DetNPFem, EmbedPresPart, EmptyRelSlash, - ExistsNP, FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP, + ExistsNP, ExistCN, ExistMassCN, ExistPluralCN, + FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP, GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP, PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, @@ -220,6 +221,22 @@ concrete ExtendEng of Extend = mkClause "there" (agrP3 (fromAgr np.a).n) (insertObj (\\_ => np.s ! NPAcc) (predV (regV "exist"))) ; + ExistCN cn = + let + pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; + neg = ExistNP (DetCN (DetQuant no_Quant NumSg) cn) ; + in posNegClause pos neg ; + ExistMassCN cn = + let + pos = ExistNP (MassNP cn) ; + neg = ExistNP (DetCN (DetQuant no_Quant NumSg) cn) ; + in posNegClause pos neg ; + ExistPluralCN cn = + let + pos = ExistNP (DetCN (DetQuant IndefArt NumPl) cn) ; + neg = ExistNP (DetCN (DetQuant no_Quant NumPl) cn) ; + in posNegClause pos neg ; + ComplBareVS v s = insertExtra s.s (predV v) ; SlashBareV2S v s = insertExtrac s.s (predVc v) ; diff --git a/src/english/ResEng.gf b/src/english/ResEng.gf index 88fc774d0..3409a9af0 100644 --- a/src/english/ResEng.gf +++ b/src/english/ResEng.gf @@ -556,6 +556,14 @@ param } } ; +-- for pos/neg variation other than negation word, e.g. "there is a car"/"there is no car" + posNegClause : Clause -> Clause -> Clause = \pos,neg -> { + s = \\t,a,b,o => case b of { + CPos => pos.s ! t ! a ! b ! o ; + _ => neg.s ! t ! a ! CPos ! o + } + } ; + -- For $Numeral$.