From c410abfa6b2c6f06354d0d0e63156f6075e595a1 Mon Sep 17 00:00:00 2001 From: bruno cuconato Date: Wed, 3 Oct 2018 10:51:16 +0000 Subject: [PATCH] (ExtendPor) add CompoundN (#31) * (Por) add Str -> V3 paradigm * (Por) small fixes * adjust import list and add Mood to VPS * (Por) add compoundN to ExtendPor --- src/portuguese/ExtendPor.gf | 39 +++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/src/portuguese/ExtendPor.gf b/src/portuguese/ExtendPor.gf index edd347afd..2130689e5 100644 --- a/src/portuguese/ExtendPor.gf +++ b/src/portuguese/ExtendPor.gf @@ -2,10 +2,11 @@ concrete ExtendPor of Extend = CatPor ** ExtendFunctor - - [ - iFem_Pron, weFem_Pron, youFem_Pron, youPlFem_Pron, youPolPl_Pron, youPolFem_Pron, youPolPlFem_Pron, theyFem_Pron, - ProDrop, - PassVPSlash, ExistsNP, VPS + [ + GenNP, GenIP, GenModNP, GenModIP, iFem_Pron, weFem_Pron, youFem_Pron + , youPlFem_Pron, youPolPl_Pron, youPolFem_Pron, youPolPlFem_Pron, theyFem_Pron + , ProDrop, PassVPSlash, ExistsNP, VPS, ListVPS, BaseVPS, ConsVPS, PassVPSlash + , ExistsNP, CompoundN ] -- put the names of your own definitions here with (Grammar = GrammarPor), (Syntax = SyntaxPor) ** @@ -18,14 +19,28 @@ concrete ExtendPor of Extend = ParadigmsPor, (S = StructuralPor) in { + lin + GenNP np = + let denp = (np.s ! ResPor.genitive).ton in { + s = \\_,_,_,_ => [] ; + sp = \\_,_,_ => denp ; + s2 = denp ; + isNeg = False ; + } ; + + GenIP ip = {s = \\_,_,c => ip.s ! c} ; + + GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ; + GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ; + lincat - VPS = {s : Agr => Str} ; - [VPS] = {s1,s2 : Agr => Str} ; + VPS = {s : Agr => Mood => Str} ; + [VPS] = {s1,s2 : Agr => Mood => Str} ; -- VPI = {s : VType => Agr => Str } ; lin - BaseVPS = twotable Agr ; - ConsVPS = consrTable Agr comma ; + BaseVPS = twoTable2 Agr Mood ; + ConsVPS = consrTable2 Agr Mood comma ; -- MkVPS t p vp = mkVPS (lin Temp t) (lin Pol p) (lin VP vp) ; --TODO: write mkVPS oper @@ -64,6 +79,14 @@ concrete ExtendPor of Extend = (insertComplement (\\_ => (np.s ! Nom).ton) (predV (mkV "existir"))) ; + 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 ; + g = noun2.g + } ; + lin -- Romance iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;