1
0
forked from GitHub/gf-rgl

Add constructions for N2 and A2 to VPSlash

To generalise transitive predicates, along with V2 -> VPSlash.
This commit is contained in:
Inari Listenmaa
2021-03-03 14:16:38 +08:00
parent 1131058b68
commit 868ea0fc0c
4 changed files with 44 additions and 6 deletions

View File

@@ -124,6 +124,11 @@ abstract Extend = Cat ** {
ProgrVPSlash : VPSlash -> VPSlash; ProgrVPSlash : VPSlash -> VPSlash;
-- construct VPSlash from A2 and N2
A2VPSlash : A2 -> VPSlash ; -- is married to (that person)
N2VPSlash : N2 -> VPSlash ; -- is a mother of (that person)
-- existential for mathematics -- existential for mathematics
ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers ExistsNP : NP -> Cl ; -- there exists a number / there exist numbers
@@ -134,7 +139,7 @@ abstract Extend = Cat ** {
ExistMassCN : CN -> Cl ; -- there is beer / there is no beer ExistMassCN : CN -> Cl ; -- there is beer / there is no beer
ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees ExistPluralCN : CN -> Cl ; -- there are trees / there are no trees
-- generalisation of existential, with adverb as a parameter -- generalisation of existential, with adverb as an argument
AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees AdvIsNP : Adv -> NP -> Cl ; -- here is the tree / here are the trees
AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented

View File

@@ -51,6 +51,8 @@ lin
PastPartAgentAP = variants {} ; -- VPSlash -> NP -> AP ; -- (opportunity) lost by the company PastPartAgentAP = variants {} ; -- VPSlash -> NP -> AP ; -- (opportunity) lost by the company
NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ; NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ;
ProgrVPSlash = variants {} ; -- VPSlash -> VPSlash ; ProgrVPSlash = variants {} ; -- VPSlash -> VPSlash ;
A2VPSlash = variants {} ; -- A2 -> VPSlash ;
N2VPSlash = variants {} ; -- N2 -> VPSlash ;
ExistsNP = ExistNP ; -- 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) ; ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
ExistMassCN cn = ExistNP (MassNP cn) ; ExistMassCN cn = ExistNP (MassNP cn) ;

View File

@@ -16,7 +16,7 @@ concrete ExtendEng of Extend =
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP, GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN, PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
EmbedSSlash, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash, EmbedSSlash, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2 UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2, A2VPSlash, N2VPSlash
] ]
with with
(Grammar = GrammarEng) ** (Grammar = GrammarEng) **
@@ -239,6 +239,19 @@ lin BaseImp = twoTable2 CPolarity ImpForm ;
ProgrVPSlash vp = insertObjc (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) ProgrVPSlash vp = insertObjc (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a)
(predAux auxBe ** {c2 = vp.c2; gapInMiddle = vp.gapInMiddle; missingAdv = vp.missingAdv}); (predAux auxBe ** {c2 = vp.c2; gapInMiddle = vp.gapInMiddle; missingAdv = vp.missingAdv});
N2VPSlash n2 =
let prep : Prep = mkPrep n2.c2 ;
dummyVPS : VPSlash = SlashV2a (mkV2 (mkV "dummy") prep);
in dummyVPS ** -- has necessary fields for VPSlash, and c2 from the N2
UseComp (CompCN (UseN2 n2)) ; -- has all the right fields except for c2
A2VPSlash a2 =
let prep : Prep = mkPrep a2.c2 ;
dummyVPS : VPSlash = SlashV2a (mkV2 (mkV "dummy") prep) ;
in dummyVPS ** -- has necessary fields for VPSlash, and c2 from the A2
UseComp (CompAP (UseA2 a2)) ; -- has all the right fields except for c2
--- AR 7/3/2013 --- AR 7/3/2013
ComplSlashPartLast vps np = case vps.gapInMiddle of { ComplSlashPartLast vps np = case vps.gapInMiddle of {
_ => insertObjPartLast (\\_ => vps.c2 ++ np.s ! NPAcc) vps --- _ => insertObjPartLast (\\_ => vps.c2 ++ np.s ! NPAcc) vps ---

View File

@@ -14,7 +14,8 @@ concrete ExtendSwe of Extend = CatSwe **
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP, RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron, Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron,
CompoundN, CompoundAP, AdvIsNP, CompoundN, CompoundAP, AdvIsNP,
UttAccNP UttAccNP,
A2VPSlash, N2VPSlash
] ]
with (Grammar = GrammarSwe) with (Grammar = GrammarSwe)
** **
@@ -75,6 +76,23 @@ in {
c2 = vp.c2 c2 = vp.c2
} ; } ;
N2VPSlash n2 =
let vp : CatSwe.VP = UseComp (CompCN (UseN2 n2)) ;
dummyVPS : VPSlash = SlashV2a (P.mkV2 "dummy") ;
in dummyVPS ** -- has necessary fields for VPSlash
vp ** -- has all the right fields except for c2
{c2 = n2.c2} ; -- has the right c2
A2VPSlash a2 =
let vp : CatSwe.VP = UseComp (CompAP (UseA2 a2)) ;
dummyVPS : VPSlash = SlashV2a (P.mkV2 "dummy") ;
in dummyVPS ** -- has necessary fields for VPSlash
vp ** -- has all the right fields except for c2
{c2 = a2.c2} ; -- has the right c2
lin UttVPShort vp = {s = infVP vp (agrP3 Utr Sg)} ; lin UttVPShort vp = {s = infVP vp (agrP3 Utr Sg)} ;
lincat lincat
@@ -152,11 +170,11 @@ in {
} ; } ;
c2 = vp.c2 c2 = vp.c2
} ; } ;
ComplVPS2 vps2 np = { ComplVPS2 vps2 np = {
s = \\o,a => vps2.s !o ! a ++ vps2.c2.s ++ np.s ! NPAcc s = \\o,a => vps2.s !o ! a ++ vps2.c2.s ++ np.s ! NPAcc
} ; } ;
ConjVPS2 c xs = conjunctDistrTable2 Order Agr c xs ** {c2 = xs.c2} ; ConjVPS2 c xs = conjunctDistrTable2 Order Agr c xs ** {c2 = xs.c2} ;
lincat lincat
@@ -248,7 +266,7 @@ lin BaseImp = twoTable2 Polarity Number ;
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
ReflPossPron = M.mkQuant "sin" "sitt" "sina" ; ReflPossPron = M.mkQuant "sin" "sitt" "sina" ;
lin lin
ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ; ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;