forked from GitHub/gf-rgl
VPSlash conjunctions in Extend; AllEng now inherits ExtendEng rather than ExtraEng
This commit is contained in:
@@ -27,27 +27,45 @@ abstract Extend = Cat ** {
|
||||
|
||||
CompBareCN : CN -> Comp ; -- (est) professeur
|
||||
|
||||
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : ClSlash -> RCl ; -- he lives in
|
||||
StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with
|
||||
StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in
|
||||
EmptyRelSlash : ClSlash -> RCl ; -- he lives in
|
||||
|
||||
|
||||
-- $VP$ conjunction, covering both finite and infinitive forms (formerly VPI and VPS).
|
||||
-- $VP$ conjunction, separate categories for finite and infinitive forms (VPS and VPI, respectively)
|
||||
-- covering both in the same category leads to spurious VPI parses because VPS depends on many more tenses
|
||||
|
||||
cat
|
||||
VPS ;
|
||||
VPS ; -- finite VP's with tense and polarity
|
||||
[VPS] {2} ;
|
||||
VPI ;
|
||||
[VPI] {2} ; -- infinitive VP's (TODO: with anteriority and polarity)
|
||||
|
||||
fun
|
||||
MkVPS : Temp -> Pol -> VP -> VPS ; -- to sleep / hasn't slept
|
||||
MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||
ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||
PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||
ComplVPSVV : VV -> VPS -> VP ; -- want to sleep and to walk
|
||||
|
||||
MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
|
||||
ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
|
||||
ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
|
||||
|
||||
-- in case ComplVPSVV is not available:
|
||||
-- the same for VPSlash, taking a complement with shared V2 verbs
|
||||
|
||||
PredVPSVV : NP -> VV -> VPS -> VP ; -- she wants to sleep and to walk
|
||||
cat
|
||||
VPS2 ; -- have loved (binary version of VPS)
|
||||
[VPS2] {2} ; -- has loved, hates"
|
||||
VPI2 ; -- to love (binary version of VPI)
|
||||
[VPI2] {2} ; -- to love, to hate
|
||||
|
||||
fun
|
||||
MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||
ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||
ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
|
||||
|
||||
MkVPI2 : VPSlash -> VPI2 ; -- to love
|
||||
ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
|
||||
ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||
|
||||
fun
|
||||
ProDrop : Pron -> Pron ; -- unstressed subject pronoun becomes []: "(io) sono stanco"
|
||||
@@ -141,7 +159,7 @@ abstract Extend = Cat ** {
|
||||
--- from Extensions
|
||||
|
||||
ComplGenVV : VV -> Ant -> Pol -> VP -> VP ; -- want not to have slept
|
||||
SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
|
||||
---- SlashV2V : V2V -> Ant -> Pol -> VPS -> VPSlash ; -- force (her) not to have slept
|
||||
|
||||
CompoundN : N -> N -> N ; -- control system / controls system / control-system
|
||||
CompoundAP : N -> A -> AP ; -- language independent / language-independent
|
||||
@@ -187,4 +205,5 @@ abstract Extend = Cat ** {
|
||||
UttAccIP : NP -> Utt ; -- whom (accusative)
|
||||
UttDatIP : NP -> Utt ; -- whom (dative)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,9 +7,13 @@ lincat
|
||||
lin
|
||||
BaseVPS = variants {} ;
|
||||
ConsVPS = variants {} ;
|
||||
|
||||
BaseVPI = variants {} ;
|
||||
ConsVPI = variants {} ;
|
||||
BaseVPS2 = variants {} ;
|
||||
ConsVPS2 = variants {} ;
|
||||
BaseVPI2 = variants {} ;
|
||||
ConsVPI2 = variants {} ;
|
||||
|
||||
lin
|
||||
GenNP = variants {} ; -- NP -> Quant ; -- this man's
|
||||
GenIP = variants {} ; -- IP -> IQuant ; -- whose
|
||||
GenRP = variants {} ; -- Num -> CN -> RP ; -- whose car
|
||||
@@ -19,11 +23,18 @@ lin
|
||||
StrandQuestSlash = QuestSlash ; -- whom does John live with ; DEFAULT with whom does John live
|
||||
StrandRelSlash = RelSlash ; -- that he lives in ; DEFAULT in which he lives
|
||||
EmptyRelSlash = RelSlash IdRP ; -- he lives in ; DEFAULT in which he lives
|
||||
MkVPS vp = variants {} ; -- Temp -> Pol -> VP -> VPS ; -- to sleep / hasn't slept
|
||||
MkVPS vp = variants {} ; -- Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||
ConjVPS = variants {} ; -- Conj -> [VPS] -> VPS ; -- has walked and won't sleep
|
||||
PredVPS = variants {} ; -- NP -> VPS -> S ; -- she [has walked and won't sleep]
|
||||
ComplVPSVV = variants {} ; -- VV -> VPS -> VP ; -- want to sleep and to walk
|
||||
PredVPSVV = variants {} ; -- NP -> VV -> VPS -> VP ; -- she wants to sleep and to walk
|
||||
PredVPS = variants {} ; -- NP -> VPS -> S ; -- has walked and won't sleep
|
||||
MkVPI vp = variants {} ; -- Temp -> Pol -> VP -> VPI ; -- to sleep / hasn't slept
|
||||
ConjVPI = variants {} ; -- Conj -> [VPI] -> VPI ; -- has walked and won't sleep
|
||||
ComplVPIVV = variants {} ; -- VV -> VPI -> VP ; -- want to sleep and to walk
|
||||
MkVPS2 = variants {} ; -- : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
|
||||
ConjVPS2 = variants {} ; -- : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
|
||||
ComplVPS2 = variants {} ; -- : VPS2 -> NP -> VPS ; -- has loved and now hates that person
|
||||
MkVPI2 = variants {} ; -- : Ant -> Pol -> VPSlash -> VPI2 ; -- to have loved
|
||||
ConjVPI2 = variants {} ; -- : Conj -> [VPI2] -> VPI2 ; -- to love and have hated
|
||||
ComplVPI2 = variants {} ; -- : VPI2 -> NP -> VPI ; -- to love and hate that person
|
||||
ProDrop pro = pro ; -- am tired ; DEFAULT I am tired
|
||||
ICompAP = variants {} ; -- AP -> IComp ; -- "how old"
|
||||
IAdvAdv = variants {} ; -- Adv -> IAdv ; -- "how often"
|
||||
|
||||
@@ -5,5 +5,5 @@ concrete AllEng of AllEngAbs =
|
||||
IrregEng-[
|
||||
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
|
||||
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
|
||||
ExtraEng
|
||||
ExtendEng ---- ExtraEng
|
||||
** {} ;
|
||||
|
||||
@@ -5,5 +5,5 @@ abstract AllEngAbs =
|
||||
IrregEngAbs-[
|
||||
blow_V,burn_V,come_V,dig_V,fall_V,fly_V,freeze_V,go_V,lie_V,run_V,
|
||||
sew_V,sing_V,sit_V,sleep_V,spit_V,stand_V,swell_V,swim_V,think_V],
|
||||
ExtraEngAbs
|
||||
Extend ---- ExtraEngAbs
|
||||
** {} ;
|
||||
|
||||
@@ -3,15 +3,19 @@
|
||||
concrete ExtendEng of Extend =
|
||||
CatEng ** ExtendFunctor -
|
||||
[
|
||||
VPS, ListVPS, RNP, RNPList,
|
||||
AdAdV, AdjAsCN, AdjAsNP, ApposNP, BaseVPS, Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN,
|
||||
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
|
||||
AdAdV, AdjAsCN, AdjAsNP, ApposNP,
|
||||
BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
|
||||
MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
|
||||
MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
||||
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, FrontExtPredVP, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, InvFrontExtPredVP, MkVPS, NominalizeVPSlashNP,
|
||||
PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP
|
||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||
]
|
||||
with
|
||||
(Grammar = GrammarEng) **
|
||||
@@ -53,60 +57,80 @@ concrete ExtendEng of Extend =
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
{- -----
|
||||
|
||||
lincat
|
||||
VPS = {s : Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Agr => Str} ;
|
||||
VPI = {s : VVType => Agr => Str} ;
|
||||
[VPI] = {s1,s2 : VVType => Agr => Str} ;
|
||||
|
||||
lin
|
||||
BaseVPS = twoTable Agr ;
|
||||
ConsVPS = consrTable Agr comma ;
|
||||
|
||||
BaseVPI = twoTable2 VVType Agr ;
|
||||
ConsVPI = consrTable2 VVType Agr comma ;
|
||||
|
||||
MkVPI vp = {
|
||||
s = table {
|
||||
VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a;
|
||||
VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a;
|
||||
VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a
|
||||
}
|
||||
} ;
|
||||
ConjVPI = conjunctDistrTable2 VVType Agr ;
|
||||
ComplVPIVV vv vpi =
|
||||
insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ;
|
||||
----}
|
||||
MkVPS t p vp = mkVPS (lin Temp t) (lin Pol p) (lin VP vp) ;
|
||||
ConjVPS c xs = conjunctDistrTable Agr c xs ;
|
||||
PredVPS np vps = {s = np.s ! npNom ++ vps.s ! np.a} ;
|
||||
|
||||
|
||||
MkVPI vp = mkVPI (lin VP vp) ;
|
||||
ConjVPI c xs = conjunctDistrTable2 VVType Agr c xs ;
|
||||
ComplVPIVV vv vpi = insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ;
|
||||
|
||||
|
||||
-------- two-place verb conjunction
|
||||
|
||||
lincat
|
||||
VPS = {s : {s : Agr => Str} ; i : {s : VVType => Agr => Str}} ; --- finite and infinite forms separately
|
||||
[VPS] = {s : {s1,s2 : Agr => Str} ; i : {s1,s2 : VVType => Agr => Str}} ;
|
||||
VPS2 = {s : Agr => Str ; c2 : Str} ;
|
||||
[VPS2] = {s1,s2 : Agr => Str ; c2 : Str} ;
|
||||
VPI2 = {s : VVType => Agr => Str ; c2 : Str} ;
|
||||
[VPI2] = {s1,s2 : VVType => Agr => Str ; c2 : Str} ;
|
||||
|
||||
lin
|
||||
BaseVPS x y = {s = twoTable Agr x.s y.s ; i = twoTable2 VVType Agr x.i y.i} ;
|
||||
ConsVPS x xs = {s = consrTable Agr comma x.s xs.s ; i = consrTable2 VVType Agr comma x.i xs.i} ;
|
||||
MkVPS2 t p vpsl = mkVPS (lin Temp t) (lin Pol p) (lin VP vpsl) ** {c2 = vpsl.c2} ;
|
||||
MkVPI2 vpsl = mkVPI (lin VP vpsl) ** {c2 = vpsl.c2} ;
|
||||
|
||||
PredVPS np vps = {s = np.s ! npNom ++ vps.s.s ! np.a} ;
|
||||
BaseVPS2 x y = twoTable Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb
|
||||
ConsVPS2 x xs = consrTable Agr comma x xs ** {c2 = xs.c2} ;
|
||||
|
||||
BaseVPI2 x y = twoTable2 VVType Agr x y ** {c2 = y.c2} ; ---- just remembering the prep of the latter verb
|
||||
ConsVPI2 x xs = consrTable2 VVType Agr comma x xs ** {c2 = xs.c2} ;
|
||||
|
||||
MkVPS t p vp = {
|
||||
s = {s = \\a =>
|
||||
|
||||
ConjVPS2 c xs = conjunctDistrTable Agr c xs ** {c2 = xs.c2} ;
|
||||
ConjVPI2 c xs = conjunctDistrTable2 VVType Agr c xs ** {c2 = xs.c2} ;
|
||||
|
||||
|
||||
ComplVPS2 vps2 np = {
|
||||
s = \\a => vps2.s ! a ++ vps2.c2 ++ np.s ! NPAcc
|
||||
} ;
|
||||
ComplVPI2 vpi2 np = {
|
||||
s = \\t,a => vpi2.s ! t ! a ++ vpi2.c2 ++ np.s ! NPAcc
|
||||
} ;
|
||||
|
||||
oper
|
||||
mkVPS : Temp -> Pol -> VP -> VPS = \t,p,vp -> lin VPS {
|
||||
s = \\a =>
|
||||
let
|
||||
verb = vp.s ! t.t ! t.a ! p.p ! oDir ! a ;
|
||||
verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ;
|
||||
in t.s ++ p.s ++ vp.ad ! a ++ verbf ++ vp.p ++ vp.s2 ! a ++ vp.ext
|
||||
} ;
|
||||
i = {s = table {
|
||||
VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a;
|
||||
VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a;
|
||||
VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
ConjVPS c xs = {s = conjunctDistrTable Agr c xs.s ; i = conjunctDistrTable2 VVType Agr c xs.i} ;
|
||||
|
||||
ComplVPIVV vv vpi =
|
||||
insertObj (\\a => vpi.i.s ! vv.typ ! a) (predVV vv) ;
|
||||
|
||||
mkVPI : VP -> VPI = \vp -> lin VPI {
|
||||
s = table {
|
||||
VVAux => \\a => vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ;
|
||||
VVInf => \\a => "to" ++ vp.ad ! a ++ vp.inf ++ vp.p ++ vp.s2 ! a ;
|
||||
VVPresPart => \\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a
|
||||
}
|
||||
} ;
|
||||
|
||||
-----
|
||||
|
||||
lin
|
||||
ICompAP ap = {s = "how" ++ ap.s ! agrP3 Sg} ; ---- IComp should have agr!
|
||||
|
||||
IAdvAdv adv = {s = "how" ++ adv.s} ;
|
||||
@@ -285,4 +309,8 @@ concrete ExtendEng of Extend =
|
||||
|
||||
UncontractedNeg = {s = [] ; p = CNeg False} ;
|
||||
UttVPShort vp = {s = infVP VVAux vp Simul CPos (agrP3 Sg)} ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user