(Por) ExtendPor

- use Extend instead of Extra in All
- use Extend funs in Extra whenever possible
This commit is contained in:
odanoburu
2018-05-16 10:38:54 -03:00
parent d0410a1b0f
commit 8ba3bbe82f
5 changed files with 90 additions and 34 deletions

View File

@@ -3,5 +3,5 @@
concrete AllPor of AllPorAbs = concrete AllPor of AllPorAbs =
LangPor, LangPor,
IrregPor, IrregPor,
ExtraPor ExtendPor
** {} ; ** {} ;

View File

@@ -1,5 +1,5 @@
abstract AllPorAbs = abstract AllPorAbs =
Lang, Lang,
IrregPorAbs, IrregPorAbs,
ExtraPorAbs Extend
** {} ; ** {} ;

View File

@@ -0,0 +1,68 @@
--# -path=alltenses:../common:../abstract
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
] -- put the names of your own definitions here
with
(Grammar = GrammarPor), (Syntax = SyntaxPor) **
open
GrammarPor,
ResPor,
MorphoPor,
Coordination,
Prelude,
ParadigmsPor,
(S = StructuralPor) in {
lin
ProDrop p = {
s = table {
Nom => let pn = p.s ! Nom in {c1 = pn.c1 ; c2 = pn.c2 ; comp = [] ; ton = pn.ton} ;
c => p.s ! c
} ;
a = p.a ;
poss = p.poss ;
hasClit = p.hasClit ;
isPol = p.isPol ;
isNeg = False
} ;
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
} ;
ExistsNP np =
mkClause [] True False np.a
(insertComplement (\\_ => (np.s ! Nom).ton)
(predV (mkV "existir"))) ;
lin
-- Romance
iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;
weFem_Pron = pronAgr S.we_Pron Fem Pl P1 ;
youFem_Pron = pronAgr S.youSg_Pron Fem Sg P3 ;
youPlFem_Pron = pronAgr S.youPl_Pron Fem Pl P3 ;
youPolPl_Pron = mkPronoun "vós" "vos" "vos" "vós"
"vosso" "vossa" "vossos" "vossas"
Masc Pl P2 ;
youPolFem_Pron = pronAgr S.youPol_Pron Fem Sg P2 ;
youPolPlFem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ;
theyFem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ;
} ;

View File

@@ -1,18 +1,20 @@
-- the Extra* modules are to be deprecated in favour of the Extend*
-- module.
concrete ExtraPor of ExtraPorAbs = ExtraRomancePor ** concrete ExtraPor of ExtraPorAbs = ExtraRomancePor **
open CommonRomance, PhonoPor, MorphoPor, ParadigmsPor, ParamX, ResPor, BeschPor, (I = IrregPor), (S = StructuralPor), open CommonRomance, PhonoPor, MorphoPor, ParadigmsPor, ParamX, ResPor, BeschPor, (I = IrregPor), (E = ExtendPor),
Prelude in { Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
lin lin
--- Prons --- Prons
i8fem_Pron = pronAgr S.i_Pron Fem Sg P1 ; i8fem_Pron = E.iFem_Pron ;
youSg8fem_Pron = pronAgr S.youSg_Pron Fem Sg P3 ; youSg8fem_Pron = E.youFem_Pron ;
we8fem_Pron = pronAgr S.we_Pron Fem Pl P1 ; we8fem_Pron = E.weFem_Pron ;
youPl8fem_Pron = pronAgr S.youPl_Pron Fem Pl P3 ; youPl8fem_Pron = E.youPlFem_Pron ;
youPolPl_Pron = S.youPol_Pron ** pronLin "vós" "vos" "vos" "vós" ; youPolPl_Pron = E.youPolPl_Pron ;
youPol8fem_Pron = pronAgr S.youPol_Pron Fem Sg P2 ; youPol8fem_Pron = E.youPolFem_Pron ;
youPolPl8fem_Pron = pronAgr youPolPl_Pron Fem Pl P2 ; youPolPl8fem_Pron = E.youPolPlFem_Pron ;
they8fem_Pron = mkPronFrom S.they_Pron "elas" "as" "lhes" "elas" Fem Pl P3 ; they8fem_Pron = E.theyFem_Pron ;
these8fem_NP = makeNP ["estas"] Fem Pl ; these8fem_NP = makeNP ["estas"] Fem Pl ;
@@ -37,23 +39,9 @@ concrete ExtraPor of ExtraPorAbs = ExtraRomancePor **
} ; } ;
-- ExtraRomance.PassVPSlash uses estar -- ExtraRomance.PassVPSlash uses estar
PassVPSlash_ser vps = PassVPSlash_ser = E.PassVPSlash ;
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
} ;
ExistsNP np = ExistsNP = E.ExistsNP ;
mkClause [] True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (mkV "existir"))) ;
UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ; UseComp_estar comp = insertComplement comp.s (predV I.estar_V) ;

View File

@@ -14,19 +14,19 @@ abstract ExtraPorAbs = ExtraRomanceAbs ** {
this8fem_NP : NP ; this8fem_NP : NP ;
those8fem_NP : NP ; those8fem_NP : NP ;
we8fem_Pron : Pron ; -- nosotras we8fem_Pron : Pron ;
whoPl8fem_IP : IP ; whoPl8fem_IP : IP ;
whoSg8fem_IP : IP ; whoSg8fem_IP : IP ;
youSg8fem_Pron : Pron ; youSg8fem_Pron : Pron ;
youPl8fem_Pron : Pron ; -- vosotras youPl8fem_Pron : Pron ;
youPol8fem_Pron : Pron ; -- usted youPol8fem_Pron : Pron ;
youPolPl_Pron : Pron ; -- ustedes youPolPl_Pron : Pron ;
youPolPl8fem_Pron : Pron ; youPolPl8fem_Pron : Pron ;
ImpNeg : NP -> VP -> Utt ; --"no fumes" ImpNeg : NP -> VP -> Utt ; --"não fume"
InvQuestCl : Cl -> QCl ; InvQuestCl : Cl -> QCl ;