Romance negative polarity of NP, Det. Quant: the positive form (and direct translation) of "he loves no woman" is "il n'aime aucune femme", "lui non ama nessuna donna", etc.

This commit is contained in:
aarne
2012-05-27 14:29:46 +00:00
parent bc522704cd
commit 336e32a9df
23 changed files with 171 additions and 90 deletions

View File

@@ -65,12 +65,14 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
s : Gender => Case => Str ;
n : Number ;
s2 : Str ; -- -ci
sp : Gender => Case => Str -- substantival: mien, mienne
sp : Gender => Case => Str ; -- substantival: mien, mienne
isNeg : Bool -- negative element, e.g. aucun
} ;
Quant = {
s : Bool => Number => Gender => Case => Str ;
s2 : Str ;
sp : Number => Gender => Case => Str
sp : Number => Gender => Case => Str ;
isNeg : Bool -- negative element, e.g. aucun
} ;
Predet = {
s : AAgr => Case => Str ;

View File

@@ -241,6 +241,7 @@ oper
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
isNeg : Bool ; -- includes a negative element, such as "rien"
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : RPolarity => Str ; -- que je dors / que je dorme
} ;

View File

@@ -111,6 +111,7 @@ oper
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
isNeg : Bool ; -- includes a negative element, such as "rien"
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : RPolarity => Str ; -- que je dors / que je dorme
} ;

View File

@@ -2,7 +2,8 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
open
CommonRomance,
Coordination,
ResRomance in {
ResRomance,
Prelude in {
lin TPasseSimple = {s = []} ** {t = RPasse} ; --# notpresent
@@ -28,7 +29,8 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
a = p.a ;
poss = p.poss ;
hasClit = p.hasClit ;
isPol = p.isPol
isPol = p.isPol ;
isNeg = False
} ;
CompIQuant iq = {s = \\aa => iq.s ! aa.n ! aa.g ! Nom} ;

View File

@@ -5,4 +5,6 @@ abstract ExtraRomanceAbs = Cat, Extra[
fun
TPasseSimple : Tense ; --# notpresent
ComplCN : V2 -> CN -> VP ; -- j'ai soif
}

View File

@@ -8,7 +8,7 @@ incomplete concrete NounRomance of Noun =
let
g = cn.g ;
n = det.n
in heavyNP {
in heavyNPpol det.isNeg {
s = \\c => det.s ! g ! c ++ cn.s ! n ++ det.s2 ;
a = agrP3 g n ;
hasClit = False
@@ -16,11 +16,11 @@ incomplete concrete NounRomance of Noun =
UsePN = pn2np ;
UsePron p = p ;
UsePron p = p ** {isNeg = False} ;
PredetNP pred np =
let agr = complAgr np.a in
heavyNP {
heavyNPpol np.isNeg {
s = \\c => pred.s ! agr ! c ++ (np.s ! pred.c).ton ;
a = case pred.a of {PAg n => agrP3 agr.g n ; _ => np.a} ;
hasClit = False
@@ -28,19 +28,19 @@ incomplete concrete NounRomance of Noun =
PPartNP np v2 =
let agr = complAgr np.a in
heavyNP {
heavyNPpol np.isNeg {
s = \\c => (np.s ! c).ton ++ v2.s ! VPart agr.g agr.n ;
a = np.a ;
hasClit = False
} ;
RelNP np rs = heavyNP {
RelNP np rs = heavyNPpol np.isNeg {
s = \\c => (np.s ! c).ton ++ rs.s ! Indic ! np.a ;
a = np.a ;
hasClit = False
} ;
AdvNP np adv = heavyNP {
AdvNP np adv = heavyNPpol np.isNeg {
s = \\c => (np.s ! c).ton ++ adv.s ;
a = np.a ;
hasClit = False
@@ -50,7 +50,8 @@ incomplete concrete NounRomance of Noun =
s,sp = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ++
ord.s ! aagr g num.n ;
s2 = quant.s2 ;
n = num.n
n = num.n ;
isNeg = quant.isNeg
} ;
DetQuant quant num = {
@@ -60,14 +61,15 @@ incomplete concrete NounRomance of Noun =
False => quant.sp ! num.n ! g ! c ++ num.s ! g
} ;
s2 = quant.s2 ;
n = num.n
n = num.n ;
isNeg = quant.isNeg
} ;
DetNP det =
let
g = Masc ; ---- Fem in Extra
n = det.n
in heavyNP {
in heavyNPpol det.isNeg {
s = det.sp ! g ;
a = agrP3 g n ;
hasClit = False
@@ -76,7 +78,8 @@ incomplete concrete NounRomance of Noun =
PossPron p = {
s = \\_,n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- il mio!
sp = \\ n,g,c => possCase g n c ++ p.poss ! n ! g ; ---- not for Fre
s2 = []
s2 = [] ;
isNeg = False
} ;
NumSg = {s = \\_ => [] ; isNum = False ; n = Sg} ;
@@ -97,13 +100,15 @@ incomplete concrete NounRomance of Noun =
DefArt = {
s = \\_,n,g,c => artDef g n c ;
sp = \\n,g,c => artDef g n c ; ---- not for Fre
s2 = []
s2 = [] ;
isNeg = False
} ;
IndefArt = {
s = \\b,n,g,c => if_then_Str b (prepCase c) (artIndef g n c) ;
sp = \\n,g,c => artIndef g n c ; ---- not for Fre
s2 = []
s2 = [] ;
isNeg = False
} ;
MassNP cn = let
@@ -112,7 +117,8 @@ incomplete concrete NounRomance of Noun =
in heavyNP {
s = \\c => partitive g c ++ cn.s ! n ;
a = agrP3 g n ;
hasClit = False
hasClit = False ;
isNeg = False
} ;
-- This is based on record subtyping.

View File

@@ -16,17 +16,25 @@ oper
s : Case => {c1,c2,comp,ton : Str} ;
a : Agr ;
hasClit : Bool ;
isPol : Bool --- only needed for French complement agr
isPol : Bool ; --- only needed for French complement agr
isNeg : Bool --- needed for negative NP's such as "personne"
} ;
Pronoun : Type = NounPhrase ** {
Pronoun : Type = {
s : Case => {c1,c2,comp,ton : Str} ;
a : Agr ;
hasClit : Bool ;
isPol : Bool ; --- only needed for French complement agr
poss : Number => Gender => Str ---- also: substantival
} ;
heavyNP : {s : Case => Str ; a : Agr} -> NounPhrase = \np -> {
heavyNP : {s : Case => Str ; a : Agr} -> NounPhrase = heavyNPpol False ;
heavyNPpol : Bool -> {s : Case => Str ; a : Agr} -> NounPhrase = \isNeg,np -> {
s = \\c => {comp,ton = np.s ! c ; c1,c2 = []} ;
a = np.a ;
hasClit = False ;
isPol = False
isPol = False ;
isNeg = isNeg
} ;
Compl : Type = {s : Str ; c : Case ; isDir : Bool} ;
@@ -35,7 +43,10 @@ oper
complGen : Compl = {s = [] ; c = genitive ; isDir = False} ;
complDat : Compl = {s = [] ; c = dative ; isDir = True} ;
pn2np : {s : Str ; g : Gender} -> NounPhrase = \pn -> heavyNP {
pn2np : {s : Str ; g : Gender} -> NounPhrase = pn2npPol False ;
pn2npNeg : {s : Str ; g : Gender} -> NounPhrase = pn2npPol True ;
pn2npPol : Bool -> {s : Str ; g : Gender} -> NounPhrase = \isNeg, pn -> heavyNPpol isNeg {
s = \\c => prepCase c ++ pn.s ;
a = agrP3 pn.g Sg
} ;
@@ -75,6 +86,7 @@ oper
clit1 = [] ;
clit2 = [] ;
clit3 = [] ;
isNeg = False ;
comp = \\a => [] ;
ext = \\p => []
} ;
@@ -91,6 +103,7 @@ oper
clit1 = vp.clit1 ++ obj.c1 ;
clit2 = vp.clit2 ++ obj.c2 ;
clit3 = vp.clit3 ;
isNeg = orB vp.isNeg np.isNeg ;
comp = \\a => c.s ++ obj.comp ++ vp.comp ! a ;
neg = vp.neg ;
ext = vp.ext ;
@@ -102,6 +115,7 @@ oper
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ; --- can be in compl as well
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ! a ;
ext = vp.ext ;
@@ -116,7 +130,8 @@ oper
agr = vpAgrClit (agrP3 ag.g ag.n) ;
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
@@ -128,6 +143,7 @@ oper
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
@@ -138,7 +154,8 @@ oper
agr = vp.agr ;
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ; --- adv could be neg
neg = vp.neg ;
comp = \\a => vp.comp ! a ++ co ;
ext = vp.ext ;
@@ -149,7 +166,8 @@ oper
agr = vp.agr ;
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ;
neg = \\b => let vpn = vp.neg ! b in {p1 = vpn.p1 ; p2 = vpn.p2 ++ co} ;
comp = vp.comp ;
ext = vp.ext ;
@@ -160,7 +178,8 @@ oper
agr = vp.agr ;
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ++ co ;
clit3 = vp.clit3 ++ co ;
isNeg = vp.isNeg ;
neg = vp.neg ;
comp = vp.comp ;
ext = vp.ext ;
@@ -171,7 +190,8 @@ oper
agr = vp.agr ;
clit1 = vp.clit1 ;
clit2 = vp.clit2 ;
clit3 = vp.clit3 ;
clit3 = vp.clit3 ;
isNeg = vp.isNeg ;
neg = vp.neg ;
comp = vp.comp ;
ext = \\p => vp.ext ! p ++ co ! p ;
@@ -181,10 +201,21 @@ oper
mkClause : Str -> Bool -> Bool -> Agr -> VP ->
{s : Direct => RTense => Anteriority => RPolarity => Mood => Str} =
\subj, hasClit, isPol, agr, vp -> {
mkClausePol False ;
-- isNeg = True if subject NP is a negative element, e.g. "personne"
mkClausePol : Bool -> Str -> Bool -> Bool -> Agr -> VP ->
{s : Direct => RTense => Anteriority => RPolarity => Mood => Str} =
\isNeg, subj, hasClit, isPol, agr, vp -> {
s = \\d,te,a,b,m =>
let
neg = vp.neg ! b ;
isAnyNeg = orB isNeg vp.isNeg ;
pol = case <isAnyNeg,b> of {
<True,RPos> => RNeg True ;
_ => b
} ;
neg = vp.neg ! pol ;
gen = agr.g ;
num = agr.n ;
@@ -193,7 +224,7 @@ oper
compl = case isPol of {
True => vp.comp ! {g = gen ; n = Sg ; p = per} ;
_ => vp.comp ! agr
} ++ vp.ext ! b ;
} ++ vp.ext ! pol ;
vtyp = vp.s.vtyp ;
refl = case vtyp of {

View File

@@ -4,7 +4,7 @@ incomplete concrete SentenceRomance of Sentence =
flags optimize=all_subs ;
lin
PredVP np vp = mkClause (np.s ! Nom).comp np.hasClit np.isPol np.a vp ;
PredVP np vp = mkClausePol np.isNeg (np.s ! Nom).comp np.hasClit np.isPol np.a vp ;
PredSCVP sc vp = mkClause (sc.s ! Nom) False False (agrP3 Masc Sg) vp ;
@@ -23,7 +23,7 @@ incomplete concrete SentenceRomance of Sentence =
---- <Acc,True> => insertAgr ag v2 ;
---- _ => v2
----e }
in (mkClause (np.s ! Nom).comp np.hasClit np.isPol np.a vp).s ;
in (mkClausePol np.isNeg (np.s ! Nom).comp np.hasClit np.isPol np.a vp).s ;
c2 = v2.c2
} ;
@@ -39,7 +39,7 @@ incomplete concrete SentenceRomance of Sentence =
SlashVS np vs slash =
{s = \\ag =>
(mkClause
(mkClausePol np.isNeg
(np.s ! Nom).comp np.hasClit np.isPol np.a
(insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b))
(predV vs))