(Romance) Attributive and predicative adjective forms (#93)

* (Fre,Por) accomodate changes to Romance adjectives
- to support Spanish buen/bueno, gran/grande and catalan bo/bon

* (Cat) Update paradigms to allow predicative and attributive forms of adj

* (Spa) fix argument order in Spanish adjective paradigms

* (Eng) fix missing paradigm invarA

* (Spa) Flip order of args in mkAdj constructor
This commit is contained in:
Inari Listenmaa
2018-12-05 19:16:35 +02:00
committed by GitHub
parent 78cac3725a
commit dadcd386c9
25 changed files with 401 additions and 332 deletions

View File

@@ -1,4 +1,4 @@
incomplete concrete AdjectiveRomance of Adjective =
incomplete concrete AdjectiveRomance of Adjective =
CatRomance ** open CommonRomance, ResRomance, Prelude in {
flags coding=utf8;
lin
@@ -8,11 +8,11 @@ incomplete concrete AdjectiveRomance of Adjective =
isPre = a.isPre
} ;
ComparA a np = {
s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ;
s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ;
isPre = False
} ;
CAdvAP ad ap np = {
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ (np.s ! Nom).ton ;
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ (np.s ! Nom).ton ;
isPre = False
} ;
UseComparA a = {
@@ -20,29 +20,26 @@ incomplete concrete AdjectiveRomance of Adjective =
isPre = a.isPre
} ;
AdjOrd ord = {
s = \\af => ord.s ! (case af of {
AF g n => aagr g n ;
_ => aagr Masc Sg ----
}) ;
s = \\af => ord.s ! aform2aagr af ; ----
isPre = False ----
} ;
-- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 adj np = {
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ;
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ;
isPre = False
} ;
ReflA2 adj = {
s = \\af =>
s = \\af =>
adj.s ! Posit ! af ++
adj.c2.s ++ prepCase adj.c2.c ++ reflPron Sg P3 Nom ; --- agr
isPre = False
} ;
SentAP ap sc = {
s = \\a => ap.s ! a ++ sc.s ! dative ; -- prête à dormir --- mood
s = \\a => ap.s ! a ++ sc.s ! dative ; -- prête à dormir --- mood
isPre = False
} ;

View File

@@ -134,8 +134,8 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
NP = \np -> (np.s ! Nom).comp ;
Conj = \c -> c.s2 ;
A = \a -> a.s ! Posit ! AF Masc Sg ;
A2 = \a -> a.s ! Posit ! AF Masc Sg ++ a.c2.s ;
A = \a -> a.s ! Posit ! ASg Masc APred ;
A2 = \a -> a.s ! Posit ! ASg Masc APred ++ a.c2.s ;
N = \n -> n.s ! Sg ;
N2 = \n -> n.s ! Sg ++ n.c2.s ;

View File

@@ -30,7 +30,9 @@ param
-- Comparative adjectives are moreover inflected in degree
-- (which in Romance is usually syntactic, though).
AForm = AF Gender Number | AA ;
AForm = ASg Gender APosition | APl Gender | AA ;
APosition = AAttr | APred ;
-- Gender is not morphologically determined for first and second person pronouns.
@@ -49,18 +51,44 @@ oper
} ;
-- genderpos2gender : GenderPosition -> {p1:Gender,p2:Number} = \gp -> case gp of {
-- MascSg _ => <Masc,Sg> ;
-- MascPl => <Masc,Pl> ;
-- FemSg => <Fem,Sg> ;
-- FemPl => <Fem,Pl>
-- } ;
aform2gender : AForm -> Gender = \a -> case a of {
AF g _ => g ;
_ => Masc -- "le plus lentement"
ASg g _ => g ;
APl g => g ;
_ => Masc -- "le plus lentement"
} ;
aform2number : AForm -> Number = \a -> case a of {
AF _ n => n ;
APl _ => Pl ;
_ => Sg -- "le plus lentement"
} ;
aform2aagr : AForm -> AAgr = \a -> case a of {
AF g n => aagr g n ;
_ => aagr Masc Sg -- "le plus lentement"
ASg g _ => aagr g Sg ;
APl g => aagr g Pl ;
_ => aagr Masc Sg -- "le plus lentement"
} ;
aagr2aform : AAgr -> AForm = \gn -> case gn of {
{g=g ; n=Sg} => ASg g APred ;
{g=g ; n=Pl} => APl g
} ;
genNum2Aform : Gender -> Number -> AForm ;
genNum2Aform g n = case n of {
Sg => ASg g APred ;
Pl => APl g
} ;
genNumPos2Aform : Gender -> Number -> Bool -> AForm ;
genNumPos2Aform g n isPre = case n of {
Sg => ASg g (if_then_else APosition isPre AAttr APred) ;
Pl => APl g
} ;
conjGender : Gender -> Gender -> Gender = \m,n ->
case m of {
@@ -236,7 +264,7 @@ oper
oper
mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ;
mkOrd x = {s = \\ag => x.s ! Posit ! AF ag.g ag.n} ;
mkOrd x = {s = \\ag => x.s ! Posit ! aagr2aform ag } ;
-- This is used in Spanish and Italian to bind clitics with preceding verb.

View File

@@ -101,9 +101,9 @@ incomplete concrete NounRomance of Noun =
AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum ; n = num.n} ;
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
OrdSuperl adj = {s = \\a => adj.s ! Superl ! genNum2Aform a.g a.n} ;
OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! AF a.g a.n} ; -- la terza più grande
OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! genNum2Aform a.g a.n} ; -- la terza più grande
---- could be discontinuous: la terza città più grande
DefArt = {
@@ -153,7 +153,7 @@ incomplete concrete NounRomance of Noun =
let
g = cn.g
in {
s = \\n => preOrPost ap.isPre (ap.s ! (AF g n)) (cn.s ! n) ;
s = \\n => preOrPost ap.isPre (ap.s ! genNumPos2Aform g n ap.isPre) (cn.s ! n) ;
g = g ;
} ;
@@ -188,9 +188,9 @@ incomplete concrete NounRomance of Noun =
CountNP det np = heavyNPpol np.isNeg
{s = \\c => det.s ! np.a.g ! c ++ (np.s ! genitive).ton ;
a = np.a ** {n = det.n} } ;
AdjDAP det ap = {
s = \\g => det.s ! g ++ ap.s ! AF g det.n ;
s = \\g => det.s ! g ++ ap.s ! genNum2Aform g det.n ;
n = det.n ;
} ;

View File

@@ -1,4 +1,4 @@
incomplete concrete PhraseRomance of Phrase =
incomplete concrete PhraseRomance of Phrase =
CatRomance ** open CommonRomance, ResRomance, Prelude in {
flags optimize = all_subs ;
@@ -18,7 +18,7 @@ incomplete concrete PhraseRomance of Phrase =
UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
UttAdv adv = adv ;
UttCN n = {s = n.s ! Sg} ;
UttAP ap = {s = ap.s ! AF Masc Sg} ;
UttAP ap = {s = ap.s ! genNum2Aform Masc Sg} ;
UttCard n = {s = n.s ! Masc} ;
UttInterj i = i ;

View File

@@ -1,4 +1,4 @@
incomplete concrete VerbRomance of Verb =
incomplete concrete VerbRomance of Verb =
CatRomance ** open Prelude, CommonRomance, ResRomance in {
flags optimize=all_subs ;
@@ -6,50 +6,50 @@ incomplete concrete VerbRomance of Verb =
lin
UseV = predV ;
ComplVV v vp =
ComplVV v vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ;
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
ComplVA v ap =
insertComplement (\\a => let agr = complAgr a in ap.s ! AF agr.g agr.n) (predV v) ;
ComplVA v ap =
insertComplement (\\a => let agr = complAgr a in ap.s ! genNum2Aform agr.g agr.n) (predV v) ;
SlashV2a v = mkVPSlash v.c2 (predV v) ;
Slash2V3 v np = mkVPSlash v.c3 (insertObject v.c2 np (predV v)) ;
Slash3V3 v np = mkVPSlash v.c2 (insertObject v.c3 np (predV v)) ;
SlashV2V v vp =
SlashV2V v vp =
mkVPSlash v.c2
(insertComplement
(\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp a)
(predV v)) ;
(insertComplement
(\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp a)
(predV v)) ;
SlashV2S v s =
SlashV2S v s =
mkVPSlash v.c2
(insertExtrapos
(insertExtrapos
(\\b => conjThat ++ s.s ! Indic) ---- mood
(predV v)) ;
(predV v)) ;
SlashV2Q v q =
SlashV2Q v q =
mkVPSlash v.c2
(insertExtrapos
(insertExtrapos
(\\_ => q.s ! QIndir)
(predV v)) ;
(predV v)) ;
{- ---- lincat should be fixed
SlashV2A v ap =
SlashV2A v ap =
let af = case v.c3.isDir of {
True => AF np.a.g np.a.n ; -- ... bleues
_ => AF Masc Sg -- il les peint en bleu
True => genNum2Aform np.a.g np.a.n ; -- ... bleues
_ => genNum2Aform Masc Sg -- il les peint en bleu
}
-}
SlashV2A v ap =
let af = AF Masc Sg
SlashV2A v ap =
let af = genNum2Aform Masc Sg
in
mkVPSlash v.c2
(insertComplement
(insertComplement
(\\_ => v.c3.s ++ prepCase v.c3.c ++ ap.s ! af)
(predV v)) ;
@@ -57,33 +57,33 @@ incomplete concrete VerbRomance of Verb =
ReflVP v = case v.c2.isDir of {
True => insertRefl v ;
False => insertComplement
False => insertComplement
(\\a => let agr = verbAgr a in v.c2.s ++ reflPron agr.n agr.p v.c2.c) v
} ;
SlashVV v vp =
SlashVV v vp =
mkVPSlash vp.c2
(insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v)) ;
SlashV2VNP v np vps = let obj = np.s ! v.c2.c in {
SlashV2VNP v np vps = let obj = np.s ! v.c2.c in {
s = v ;
agr = getVPAgr v ;
clit1 = obj.c1 ;
clit2 = obj.c2 ;
clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013
isNeg = False ;
clit1 = obj.c1 ;
clit2 = obj.c2 ;
clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013
isNeg = False ;
neg = negation ;
comp = \\a => v.c2.s ++ obj.comp ++ prepCase v.c3.c ++ infVP vps a ;
ext = \\p => [] ;
c2 = vps.c2
} ;
{- ---- this takes ages to compile, hence inlined as above AR 20/11/2013
SlashV2VNP v np vp =
{- ---- this takes ages to compile, hence inlined as above AR 20/11/2013
SlashV2VNP v np vp =
mkVPSlash vp.c2
(insertComplement
(\\a => prepCase v.c3.c ++ infVP vp a)
(insertObject v.c2 np (predV v))) ;
(insertComplement
(\\a => prepCase v.c3.c ++ infVP vp a)
(insertObject v.c2 np (predV v))) ;
-}
@@ -91,9 +91,9 @@ incomplete concrete VerbRomance of Verb =
UseCopula = predV copula ;
CompAP ap = {s = \\ag => let agr = complAgr ag in ap.s ! AF agr.g agr.n ; cop = serCopula} ;
CompCN cn = { s = \\ag =>
let agr = complAgr ag in
CompAP ap = {s = \\ag => let agr = complAgr ag in ap.s ! genNum2Aform agr.g agr.n ; cop = serCopula} ;
CompCN cn = { s = \\ag =>
let agr = complAgr ag in
artIndef False cn.g agr.n Nom ++ cn.s ! agr.n ;
cop = serCopula
}; --- RE 7/12/2010 -- AR added indef 2/8/2011
@@ -109,11 +109,10 @@ incomplete concrete VerbRomance of Verb =
AdVVPSlash adv vps = vps ** insertAdV adv.s vps ;
PassV2 v = insertComplement
PassV2 v = insertComplement
(\\a => let agr = complAgr a in v.s ! VPart agr.g agr.n) (predV auxPassive) ;
VPSlashPrep vp prep = vp ** {
c2 = {s = prep.s ; c = prep.c ; isDir = False}
} ;
}