put RelVPS into RomanceFunctor and also inherited other VPS functions from there

This commit is contained in:
Aarne Ranta
2024-07-26 17:22:17 +02:00
parent 78fc625174
commit 7d631fafa2
6 changed files with 32 additions and 91 deletions

View File

@@ -1,10 +1,9 @@
--# -path=alltenses:../common:../abstract:../romance
concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
[
-- [
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS
]
-- ]
-- don't forget to put the names of your own
-- definitions here
with
@@ -19,31 +18,5 @@ concrete ExtendCat of Extend = CatCat ** ExtendRomanceFunctor-- -
-- put your own definitions here
lincat
VPS = {s : Mood => Agr => Bool => Str} ;
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
lin
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
ConsVPS = consrTable3 Mood Agr Bool comma ;
lin
PredVPS np vpi = {
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
} ;
MkVPS tm p vp = {
s = \\m,agr,isNeg =>
tm.s ++ p.s ++
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
! DDir ! tm.t ! tm.a ! p.p ! m
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
} ;

View File

@@ -7,7 +7,7 @@ concrete ExtendFre of Extend =
GenRP,
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
PassVPSlash, PassAgentVPSlash, PastPartAP, PastPartAgentAP, ApposNP, CompoundN,
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS, ExistsNP
] -- put the names of your own definitions here
with
(Grammar = GrammarFre) **
@@ -160,4 +160,9 @@ lin UseDAP = \dap ->
c = Nom
} ;
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV (mkV "exister"))) ;
}

View File

@@ -3,7 +3,7 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
[
GenRP,
PassVPSlash, PassAgentVPSlash,
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS
ExistsNP
]
-- don't forget to put the names of your own
@@ -16,7 +16,8 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
MorphoIta,
Coordination,
Prelude,
ParadigmsIta in {
ParadigmsIta,
IrregIta in {
-- put your own definitions here
lin
@@ -47,30 +48,13 @@ oper
comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ;
} ;
lincat
VPS = {s : Mood => Agr => Bool => Str} ;
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
lin
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
ConsVPS = consrTable3 Mood Agr Bool comma ;
lin
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV esistere_V)) ;
lin
PredVPS np vpi = {
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
} ;
MkVPS tm p vp = {
s = \\m,agr,isNeg =>
tm.s ++ p.s ++
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
! DDir ! tm.t ! tm.a ! p.p ! m
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
}

View File

@@ -17,8 +17,7 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
youPlFem_Pron,
youPolFem_Pron,
youPolPlFem_Pron,
youPolPl_Pron,
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS
youPolPl_Pron
] -- don't forget to put the names of your own
-- definitions here
with
@@ -121,31 +120,4 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ;
lincat
VPS = {s : Mood => Agr => Bool => Str} ;
[VPS] = {s1,s2 : Mood => Agr => Bool => Str} ;
lin
BaseVPS x y = twoTable3 Mood Agr Bool x y ;
ConsVPS = consrTable3 Mood Agr Bool comma ;
lin
PredVPS np vpi = {
s = \\m => (np.s ! Nom).comp ++ vpi.s ! m ! np.a ! np.isNeg
} ;
MkVPS tm p vp = {
s = \\m,agr,isNeg =>
tm.s ++ p.s ++
(mkClausePol (orB isNeg vp.isNeg) [] False False agr vp).s
! DDir ! tm.t ! tm.a ! p.p ! m
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
} ;

View File

@@ -68,6 +68,13 @@ incomplete concrete ExtendRomanceFunctor of Extend =
} ;
ConjVPS = conjunctDistrTable3 Mood Agr Bool ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
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

View File

@@ -21,7 +21,7 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
youPolPl_Pron,
PassVPSlash, PassAgentVPSlash,
UseComp_estar, UseComp_ser,
BaseVPS, ConsVPS, PredVPS, MkVPS, ConjVPS, RelVPS
ExistNP
] -- don't forget to put the names of your own
-- definitions here
@@ -127,10 +127,10 @@ oper
lin AnaphPron np = agr2pron ! np.a ;
RelVPS rp vpi = {
s = \\m, agr => rp.s ! False ! complAgr agr ! Nom ++ vpi
.s ! m ! (Ag rp.a.g rp.a.n P3) ! False ;
c = Nom
} ;
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV (mkV "existir"))) ;
} ;