mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Add constructions for N2 and A2 to VPSlash
To generalise transitive predicates, along with V2 -> VPSlash.
This commit is contained in:
@@ -124,6 +124,11 @@ abstract Extend = Cat ** {
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
AdvIsNPAP : Adv -> NP -> AP -> Cl ; -- here are the instructions documented
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ lin
|
||||
PastPartAgentAP = variants {} ; -- VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||
NominalizeVPSlashNP = variants {} ; -- VPSlash -> NP -> NP ;
|
||||
ProgrVPSlash = variants {} ; -- VPSlash -> VPSlash ;
|
||||
A2VPSlash = variants {} ; -- A2 -> VPSlash ;
|
||||
N2VPSlash = variants {} ; -- N2 -> VPSlash ;
|
||||
ExistsNP = ExistNP ; -- NP -> Cl ; -- there exists a number / there exist numbers
|
||||
ExistCN cn = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
||||
ExistMassCN cn = ExistNP (MassNP cn) ;
|
||||
|
||||
@@ -16,7 +16,7 @@ concrete ExtendEng of Extend =
|
||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
||||
PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
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
|
||||
(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)
|
||||
(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
|
||||
ComplSlashPartLast vps np = case vps.gapInMiddle of {
|
||||
_ => insertObjPartLast (\\_ => vps.c2 ++ np.s ! NPAcc) vps ---
|
||||
|
||||
@@ -14,7 +14,8 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
|
||||
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, ReflPossPron,
|
||||
CompoundN, CompoundAP, AdvIsNP,
|
||||
UttAccNP
|
||||
UttAccNP,
|
||||
A2VPSlash, N2VPSlash
|
||||
]
|
||||
with (Grammar = GrammarSwe)
|
||||
**
|
||||
@@ -75,6 +76,23 @@ in {
|
||||
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)} ;
|
||||
|
||||
lincat
|
||||
@@ -152,11 +170,11 @@ in {
|
||||
} ;
|
||||
c2 = vp.c2
|
||||
} ;
|
||||
|
||||
|
||||
ComplVPS2 vps2 np = {
|
||||
s = \\o,a => vps2.s !o ! a ++ vps2.c2.s ++ np.s ! NPAcc
|
||||
} ;
|
||||
|
||||
|
||||
ConjVPS2 c xs = conjunctDistrTable2 Order Agr c xs ** {c2 = xs.c2} ;
|
||||
|
||||
lincat
|
||||
@@ -248,7 +266,7 @@ lin BaseImp = twoTable2 Polarity Number ;
|
||||
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
|
||||
|
||||
ReflPossPron = M.mkQuant "sin" "sitt" "sina" ;
|
||||
|
||||
|
||||
lin
|
||||
ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user