From bb5107fa995fd5f5d893cc058e4f6494f82713de Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 20 Mar 2024 16:34:30 +0100 Subject: [PATCH] added GenRP to Extend Fin,Fre,Ger,Ita,Swe --- src/finnish/ExtendFin.gf | 11 ++++++++++- src/french/ExtendFre.gf | 11 +++++++++++ src/german/ExtendGer.gf | 9 ++++++++- src/italian/ExtendIta.gf | 14 ++++++++++++++ src/spanish/ExtendSpa.gf | 1 - src/swedish/ExtendSwe.gf | 10 ++++++++-- 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/src/finnish/ExtendFin.gf b/src/finnish/ExtendFin.gf index 10689d760..2c3b19158 100644 --- a/src/finnish/ExtendFin.gf +++ b/src/finnish/ExtendFin.gf @@ -5,7 +5,7 @@ concrete ExtendFin of Extend = VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS, MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV ,ExistCN, ExistMassCN, ICompAP, ByVP - ,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash + ,CompoundN, GenNP, GenIP, GenRP, AdvIsNP, EmbedSSlash ,PassVPSlash, PassAgentVPSlash ,CardCNCard ,UttAccNP @@ -191,6 +191,15 @@ lin GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ; + GenRP num cn = { + s = \\n,c => + let k = npform2case num.n c + in relPron ! n ! Gen ++ linCN (NCase num.n k) cn ; +--- a = RNoAg + a = RAg (agrP3 num.n) + } ; + + ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ? AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ; diff --git a/src/french/ExtendFre.gf b/src/french/ExtendFre.gf index bffb25e13..0d6b0ddb0 100644 --- a/src/french/ExtendFre.gf +++ b/src/french/ExtendFre.gf @@ -4,6 +4,7 @@ concrete ExtendFre of Extend = CatFre ** ExtendFunctor - [ ---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron, + GenRP, ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP, PassVPSlash, PassAgentVPSlash, ApposNP, CompoundN ] -- put the names of your own definitions here @@ -23,6 +24,16 @@ lincat RNP = {s : Agr => Case => Str} ; lin + GenRP nu cn = { + s = \\_b,_aagr,_c => "dont" ++ num ++ artDef False g n Nom ++ cn.s ! n ; + a = aagr g n ; + hasAgr = True + } where { + g = cn.g ; + n = nu.n ; + num = if_then_Str nu.isNum (nu.s ! g) [] + } ; + ExistCN cn = let pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; diff --git a/src/german/ExtendGer.gf b/src/german/ExtendGer.gf index ac2246799..ee99afec8 100644 --- a/src/german/ExtendGer.gf +++ b/src/german/ExtendGer.gf @@ -3,7 +3,7 @@ concrete ExtendGer of Extend = CatGer ** ExtendFunctor - [ -- remove the default implementations of: - GenNP, EmptyRelSlash, + GenNP, GenRP, EmptyRelSlash, VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, ICompAP, IAdvAdv, CompIQuant, PrepCN, @@ -36,6 +36,13 @@ concrete ExtendGer of Extend = delCardOne = False } ; + GenRP nu cn = { + s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Weak ! nu.n ! c ; + a = RAg nu.n P3 + } ; + + + EmptyRelSlash slash = { s = \\m,t,a,p,gn => appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ; diff --git a/src/italian/ExtendIta.gf b/src/italian/ExtendIta.gf index b50ae1e12..ecac47954 100644 --- a/src/italian/ExtendIta.gf +++ b/src/italian/ExtendIta.gf @@ -1,6 +1,7 @@ --# -path=alltenses:../common:../abstract:../romance concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor - [ + GenRP, PassVPSlash, PassAgentVPSlash ] -- don't forget to put the names of your own @@ -16,6 +17,19 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor - ParadigmsIta in { -- put your own definitions here +lin + GenRP nu cn = { + s = \\_b,_aagr,_c => "di cui" ++ num ++ cn.s ! n ; + a = aagr g n ; + hasAgr = True + } where { + g = cn.g ; + n = nu.n ; + num = if_then_Str nu.isNum (nu.s ! g) [] + } ; + + + lin PassVPSlash vps = passVPSlash vps [] ; PassAgentVPSlash vps np = passVPSlash diff --git a/src/spanish/ExtendSpa.gf b/src/spanish/ExtendSpa.gf index dd8bdd95f..d51218d3f 100644 --- a/src/spanish/ExtendSpa.gf +++ b/src/spanish/ExtendSpa.gf @@ -7,7 +7,6 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor - ExistsNP, EmbedSSlash, GenRP, - GenRP, IAdvAdv, ICompAP, InOrderToVP, diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index c16898456..e6355a925 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -16,7 +16,8 @@ concrete ExtendSwe of Extend = CatSwe ** CompoundN, CompoundAP, AdvIsNP, UttAccNP, A2VPSlash, N2VPSlash, - CardCNCard + CardCNCard, + GenRP ] with (Grammar = GrammarSwe) ** @@ -392,5 +393,10 @@ lin UseDAPMasc, UseDAPFem = \dap -> lin CardCNCard card cn = {s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ; - + + GenRP num cn = { + s = \\g_,n,c => "vars" ++ cn.s ! num.n ! DDef Indef ! Nom ; --- c ? + a = RAg cn.g num.n P3 + } ; + }