From 7d631fafa2a03657b3a996a6fbd71da6a7187448 Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Fri, 26 Jul 2024 17:22:17 +0200 Subject: [PATCH] put RelVPS into RomanceFunctor and also inherited other VPS functions from there --- src/catalan/ExtendCat.gf | 31 ++------------------------ src/french/ExtendFre.gf | 7 +++++- src/italian/ExtendIta.gf | 34 ++++++++--------------------- src/portuguese/ExtendPor.gf | 30 +------------------------ src/romance/ExtendRomanceFunctor.gf | 7 ++++++ src/spanish/ExtendSpa.gf | 14 ++++++------ 6 files changed, 32 insertions(+), 91 deletions(-) diff --git a/src/catalan/ExtendCat.gf b/src/catalan/ExtendCat.gf index 2dc10164b..b84a53420 100644 --- a/src/catalan/ExtendCat.gf +++ b/src/catalan/ExtendCat.gf @@ -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 - } ; - } ; diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf index ce0937587..149e47ced 100644 --- a/src/french/ExtendFre.gf +++ b/src/french/ExtendFre.gf @@ -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"))) ; + } diff --git a/src/italian/ExtendIta.gf b/src/italian/ExtendIta.gf index bdc365140..2a7786940 100644 --- a/src/italian/ExtendIta.gf +++ b/src/italian/ExtendIta.gf @@ -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 - } ; } diff --git a/src/portuguese/ExtendPor.gf b/src/portuguese/ExtendPor.gf index c04bfef03..50a696e6c 100644 --- a/src/portuguese/ExtendPor.gf +++ b/src/portuguese/ExtendPor.gf @@ -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 - } ; - } ; diff --git a/src/romance/ExtendRomanceFunctor.gf b/src/romance/ExtendRomanceFunctor.gf index 8c4022b34..a6eee52cb 100644 --- a/src/romance/ExtendRomanceFunctor.gf +++ b/src/romance/ExtendRomanceFunctor.gf @@ -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 diff --git a/src/spanish/ExtendSpa.gf b/src/spanish/ExtendSpa.gf index ac27e32f0..12069287e 100644 --- a/src/spanish/ExtendSpa.gf +++ b/src/spanish/ExtendSpa.gf @@ -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"))) ; + + } ;