From 2d5655aa506eb48d9d92f021e70cdf535b4e1e78 Mon Sep 17 00:00:00 2001 From: bruno cuconato Date: Sun, 21 Oct 2018 17:42:05 +0000 Subject: [PATCH] (Por) Extend: add lins (#49) - add PastPartAP, PastPartAgentAP - add PassVPSlash, PassAgentVPSlash lins from ExtraRomance - correct CompoundN --- src/portuguese/ExtendPor.gf | 45 +++++++++++++++++++---------- src/portuguese/MakeStructuralPor.gf | 3 +- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/portuguese/ExtendPor.gf b/src/portuguese/ExtendPor.gf index 6719ca65d..3ee18db8f 100644 --- a/src/portuguese/ExtendPor.gf +++ b/src/portuguese/ExtendPor.gf @@ -18,7 +18,9 @@ concrete ExtendPor of Extend = iFem_Pron, ListVPS, PassVPSlash, - PassVPSlash, + PassAgentVPSlash, + PastPartAP, + PastPartAgentAP, ProDrop, theyFem_Pron, VPS, @@ -94,31 +96,42 @@ concrete ExtendPor of Extend = PrepCN prep cn = {s = prep.s ++ prepCase prep.c ++ cn.s ! Sg} ; lin - PassVPSlash vps = - let auxvp = predV copula - in - insertComplement (\\a => let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) { - s = auxvp.s ; - agr = auxvp.agr ; - neg = vps.neg ; - clit1 = vps.clit1 ; - clit2 = vps.clit2 ; - clit3 = vps.clit3 ; - isNeg = vps.isNeg ; - comp = vps.comp ; - ext = vps.ext + PastPartAP vps = pastPartAP vps [] ; + + PastPartAgentAP vps np = pastPartAP vps (let by = in by.s ++ (np.s ! by.c).ton) ; + + oper + pastPartAP : VPSlash -> Str -> AP ; + pastPartAP vps agent = lin AP { + s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ; + isPre = False } ; + lin + PassVPSlash vps = passVPSlash vps [] ; + + PassAgentVPSlash vps np = passVPSlash vps (let by = in by.s ++ (np.s ! by.c).ton) ; + ExistsNP np = mkClause [] True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (mkV "existir"))) ; + oper + passVPSlash : VPSlash -> Str -> VP = \vps, agent -> + let auxvp = predV auxPassive + in + vps ** { + s = auxvp.s ; + agr = auxvp.agr ; + comp = \\a => vps.comp ! a ++ (let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) ++ agent ; + } ; + lin CompoundN noun noun2 = { -- order is different because that's needed for correct translation from english s = \\n => noun2.s ! n - ++ variants {genNumForms "do" "da" "dos" "das" ! noun.g ! n; "de"} - ++ noun.s ! n ; + ++ variants {"de" ; genForms "do" "da" ! noun.g} + ++ noun.s ! Sg ; g = noun2.g } ; diff --git a/src/portuguese/MakeStructuralPor.gf b/src/portuguese/MakeStructuralPor.gf index d7f714587..87ab6dc31 100644 --- a/src/portuguese/MakeStructuralPor.gf +++ b/src/portuguese/MakeStructuralPor.gf @@ -19,5 +19,4 @@ oper a = if_then_else PAgr p (PAg Sg) PNoAg ---- e,g, "chacun de"; other possibilities? } ; - -} +} ;