middle polarity for French in Romance (for "personne ne dort")

This commit is contained in:
aarne
2012-05-27 12:55:32 +00:00
parent 25435a6912
commit bc522704cd
27 changed files with 88 additions and 80 deletions

View File

@@ -1,6 +1,6 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete CatCat of Cat =
CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] **
CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond,Pol] **
CatRomance with -- JS restore TPast for notpresent
(ResRomance = ResCat) ;

View File

@@ -104,9 +104,9 @@ oper
in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"no",[]>
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
RNeg _ => <"no",[]>
} ;
conjThan = "que" ;

View File

@@ -11,7 +11,7 @@ concrete GrammarCat of Grammar =
RelativeCat,
ConjunctionCat,
PhraseCat,
TextX - [SC,Temp,Tense],
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
IdiomCat,
StructuralCat,
TenseCat

View File

@@ -15,7 +15,7 @@ concrete IdiomCat of Idiom = CatCat **
(\\agr =>
let
clpr = <vp.clit1,vp.clit2> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ---- pol
in
vp.s.s ! VGer ++ clpr.p1 ++ obj
)
@@ -38,7 +38,7 @@ concrete IdiomCat of Idiom = CatCat **
} ;
ImpPl1 vp = {s =
mkImperative False P1 vp ! Pos ! Masc ! Pl --- fem
mkImperative False P1 vp ! RPos ! Masc ! Pl --- fem
} ;
CleftAdv ad s = mkClause [] True False (agrP3 Masc Sg)

View File

@@ -1,3 +1,3 @@
concrete TenseCat of Tense = CatCat, TenseX [Ant,Pol,AAnter,ASimul,PNeg,PPos] **
concrete TenseCat of Tense = CatCat, TenseX [Ant,AAnter,ASimul] **
TenseRomance with
(ResRomance = ResCat) ;

View File

@@ -1,5 +1,5 @@
--# -path=.:../romance:../common:../abstract:../common:prelude
concrete CatFre of Cat = CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond]
concrete CatFre of Cat = CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond,Pol]
** CatRomance with
(ResRomance = ResFre) ;

View File

@@ -90,11 +90,11 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
-- Positive polarity is used in the imperative: stressed for 1st and
-- 2nd persons.
pronArgGen : Polarity -> Number -> Person -> CAgr -> CAgr -> Str * Str =
pronArgGen : RPolarity -> Number -> Person -> CAgr -> CAgr -> Str * Str =
\b,n,p,acc,dat ->
let
cas : Person -> Case -> Case = \pr,c -> case <pr,b> of {
<P1 | P2, Pos> => CPrep P_de ; --- encoding in argPron
<P1 | P2, RPos> => CPrep P_de ; --- encoding in argPron
_ => c
} ;
pacc = case acc of {
@@ -126,15 +126,16 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
compl = vp.comp ! agr ++ vp.ext ! pol
in
case pol of {
Pos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
Neg => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
RPos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
RNeg _ => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
} ;
---- TODO: vois-le vs. vois-moi vs. ne me vois pas
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <elisNe,"pas">
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
RNeg True => <elisNe,[]> ;
RNeg False => <elisNe,"pas">
} ;
conjThan = elisQue ;

View File

@@ -67,4 +67,6 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
s2 = []
} ;
PNegNe = {s = [] ; p = RNeg True} ;
}

View File

@@ -35,4 +35,8 @@ abstract ExtraFreAbs = ExtraRomanceAbs - [ProDrop] ** {
tout_Det : Det ;
-- Polarity "ne" without "pas"
PNegNe : Pol ;
}

View File

@@ -11,12 +11,12 @@ concrete GrammarFre of Grammar =
RelativeFre,
ConjunctionFre,
PhraseFre,
TextX - [SC,Temp,Tense],
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
IdiomFre,
StructuralFre,
TenseFre
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;
flags startcat = Phr ;
} ;

View File

@@ -34,12 +34,12 @@ concrete IdiomFre of Idiom = CatFre **
(predV copula) ;
ImpPl1 vp = {
s = mkImperative False P1 vp ! Pos ! Masc ! Pl --- fem
s = mkImperative False P1 vp ! RPos ! Masc ! Pl --- fem
} ;
ImpP3 np vp = {
s = (mkClause (np.s ! Nom).comp np.hasClit False np.a vp).s
! DInv ! RPres ! Simul ! Pos ! Conjunct
! DInv ! RPres ! Simul ! RPos ! Conjunct
} ;
oper

View File

@@ -1,3 +1,3 @@
concrete TenseFre of Tense = CatFre, TenseX [Ant,Pol,AAnter,ASimul,PNeg,PPos] **
concrete TenseFre of Tense = CatFre, TenseX [Ant,AAnter,ASimul] **
TenseRomance with
(ResRomance = ResFre) ;

View File

@@ -1,4 +1,4 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete CatIta of Cat = CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** CatRomance with
concrete CatIta of Cat = CommonX - [SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond,Pol] ** CatRomance with
(ResRomance = ResIta) ;

View File

@@ -115,7 +115,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
agr = {g = g ; n = n ; p = pe} ;
clpr = <vp.clit1 ++ vp.clit2,[],False> ; ---- TODO: True is clit
verb = case <n,pol,pe> of {
<Sg,Neg,P2> => vp.s.s ! VInfin clpr.p3 ; ---- ! aag ;
<Sg,RNeg False,P2> => vp.s.s ! VInfin clpr.p3 ; ---- ! aag ;
_ => vp.s.s ! vImper n pe
} ;
neg = vp.neg ! pol ;
@@ -124,9 +124,9 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
---- TODO non mi mangi
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"non",[]>
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
RNeg _ => <"non",[]>
} ;
conjThan = "di" ; --- che

View File

@@ -11,7 +11,7 @@ concrete GrammarIta of Grammar =
RelativeIta,
ConjunctionIta,
PhraseIta,
TextX - [SC,Temp,Tense],
TextX - [SC,Temp,Tense,Pol,PPos,PNeg],
IdiomIta,
StructuralIta,
TenseIta

View File

@@ -37,14 +37,14 @@ concrete IdiomIta of Idiom = CatIta **
(\\agr =>
let
clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ---- pol
in
vp.s.s ! VGer ++ clpr.p1 ++ obj
)
(predV (essereV (verboV (stare_16 "stare")))) ;
ImpPl1 vp = {s =
mkImperative False P1 vp ! Pos ! Masc ! Pl --- fem
mkImperative False P1 vp ! RPos ! Masc ! Pl --- fem
} ;
}

View File

@@ -1,3 +1,3 @@
concrete TenseIta of Tense = CatIta, TenseX [Ant,Pol,AAnter,ASimul,PNeg,PPos] **
concrete TenseIta of Tense = CatIta, TenseX [Ant,AAnter,ASimul] **
TenseRomance with
(ResRomance = ResIta) ;

View File

@@ -1,10 +1,14 @@
incomplete concrete CatRomance of Cat = CommonX - [SC]
incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
** open Prelude, CommonRomance, ResRomance, (R = ParamX) in {
flags optimize=all_subs ;
lincat
-- exception to CommonX, due to the distinction ne/ne-pas
Pol = {s : Str ; p : RPolarity} ;
-- Tensed/Untensed
S = {s : Mood => Str} ;
@@ -19,16 +23,16 @@ incomplete concrete CatRomance of Cat = CommonX - [SC]
-- Sentence
Cl = {s : Direct => RTense => Anteriority => Polarity => Mood => Str} ;
Cl = {s : Direct => RTense => Anteriority => RPolarity => Mood => Str} ;
ClSlash = {
s : AAgr => Direct => RTense => Anteriority => Polarity => Mood => Str ;
s : AAgr => Direct => RTense => Anteriority => RPolarity => Mood => Str ;
c2 : Compl
} ;
Imp = {s : Polarity => ImpForm => Gender => Str} ;
Imp = {s : RPolarity => ImpForm => Gender => Str} ;
-- Question
QCl = {s : RTense => Anteriority => Polarity => QForm => Str} ;
QCl = {s : RTense => Anteriority => RPolarity => QForm => Str} ;
IP = {s : Case => Str ; a : AAgr} ;
IComp = {s : AAgr => Str} ;
IDet = {s : Gender => Case => Str ; n : Number} ;
@@ -37,7 +41,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC]
-- Relative
RCl = {
s : Agr => RTense => Anteriority => Polarity => Mood => Str ;
s : Agr => RTense => Anteriority => RPolarity => Mood => Str ;
c : Case
} ;
RP = {s : Bool => AAgr => Case => Str ; a : AAgr ; hasAgr : Bool} ;
@@ -95,7 +99,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC]
V, VQ, VA = Verb ;
V2, VV, V2S, V2Q = Verb ** {c2 : Compl} ;
V3, V2A, V2V = Verb ** {c2,c3 : Compl} ;
VS = Verb ** {m : Polarity => Mood} ;
VS = Verb ** {m : RPolarity => Mood} ;
A = {s : Degree => AForm => Str ; isPre : Bool} ;
A2 = {s : Degree => AForm => Str ; c2 : Compl} ;

View File

@@ -233,18 +233,21 @@ oper
oper
VPC : Type = {
s : VPForm => {
fin : Agr => Str ; -- ai
inf : AAgr => Str -- dit
fin : Agr => Str ; -- ai
inf : AAgr => Str -- dit
} ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : RPolarity => (Str * Str) ; -- ne-pas
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : RPolarity => Str ; -- que je dors / que je dorme
} ;
-- Polarity: three values (Fre positive,ne-pas,ne), presence of polarity element line "aucun"
param RPolarity = RPos | RNeg Bool ; -- RNeg True = "ne", RNeg False = "ne - pas"
}

View File

@@ -49,7 +49,8 @@ interface DiffRomance = open CommonRomance, Prelude in {
-- To render imperatives (with their clitics etc).
oper mkImperative : Bool -> Person -> VP -> Polarity => Gender => Number => Str ;
oper mkImperative : Bool -> Person -> VP -> RPolarity => Gender => Number => Str ;
--2 Constants that must derivatively depend on language
@@ -76,7 +77,7 @@ interface DiffRomance = open CommonRomance, Prelude in {
possCase : Gender -> Number -> Case -> Str ;
auxVerb : VType -> (VF => Str) ;
negation : Polarity => (Str * Str) ;
negation : RPolarity => (Str * Str) ;
copula : Verb ;
conjThan : Str ;
@@ -105,15 +106,16 @@ oper
VP : Type = {
s : Verb ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : RPolarity => (Str * Str) ; -- ne-pas
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : RPolarity => Str ; -- que je dors / que je dorme
} ;
--2 Workarounds, to be eliminated
-- This should be provided by $pronArg$ above, but causes trouble in compilation.

View File

@@ -166,7 +166,7 @@ oper
ext = vp.ext ;
} ;
insertExtrapos : (Polarity => Str) -> VP -> VP = \co,vp -> {
insertExtrapos : (RPolarity => Str) -> VP -> VP = \co,vp -> {
s = vp.s ;
agr = vp.agr ;
clit1 = vp.clit1 ;
@@ -179,19 +179,8 @@ oper
mkVPSlash : Compl -> VP -> VP ** {c2 : Compl} = \c,vp -> vp ** {c2 = c} ;
tmpVP : Type = {
s : Verb ;
agr : VPAgr ; -- dit/dite dep. on verb, subj, and clitic
neg : Polarity => (Str * Str) ; -- ne-pas
clit1 : Str ; -- le/se
clit2 : Str ; -- lui
clit3 : Str ; -- y en
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
ext : Polarity => Str ; -- que je dors / que je dorme
} ;
mkClause : Str -> Bool -> Bool -> Agr -> VP ->
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
{s : Direct => RTense => Anteriority => RPolarity => Mood => Str} =
\subj, hasClit, isPol, agr, vp -> {
s = \\d,te,a,b,m =>
let
@@ -252,8 +241,8 @@ oper
let
iform = False ; ---- meaning: no clitics
inf = vp.s.s ! VInfin iform ;
neg = vp.neg ! Pos ; --- Neg not in API
obj = neg.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ; ---- pol
neg = vp.neg ! RPos ; --- Neg not in API
obj = neg.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ; ---- pol
refl = case vp.s.vtyp of {
VRefl => reflPron agr.n agr.p Acc ; ---- case ?
_ => []

View File

@@ -1,6 +1,6 @@
incomplete concrete TenseRomance of Tense =
CatRomance [Tense,Temp], TenseX [Ant,Pol,AAnter,ASimul,PNeg,PPos] **
open ResRomance, CommonRomance in {
CatRomance [Tense,Temp], TenseX [Ant,AAnter,ASimul] **
open ResRomance, CommonRomance, Prelude in {
lin
TTAnt t a = {s = a.s ++ t.s ; a = a.a ; t = t.t} ;
@@ -9,4 +9,7 @@ incomplete concrete TenseRomance of Tense =
TFut = {s = []} ** {t = RFut} ; --# notpresent
TCond = {s = []} ** {t = RCond} ; --# notpresent
PPos = {s = [] ; p = RPos} ;
PNeg = {s = [] ; p = RNeg False} ;
}

View File

@@ -1,5 +1,5 @@
--# -path=.:../romance:../abstract:../common:prelude
concrete CatSpa of Cat = CommonX -
[SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond] ** CatRomance with
[SC,Temp,TTAnt,Tense,TPres,TPast,TFut,TCond,Pol] ** CatRomance with
(ResRomance = ResSpa) ;

View File

@@ -107,9 +107,9 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
in
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
negation : Polarity => (Str * Str) = table {
Pos => <[],[]> ;
Neg => <"no",[]>
negation : RPolarity => (Str * Str) = table {
RPos => <[],[]> ;
RNeg _ => <"no",[]>
} ;
conjThan = "que" ;

View File

@@ -11,7 +11,7 @@ concrete GrammarSpa of Grammar =
RelativeSpa,
ConjunctionSpa,
PhraseSpa,
TextSpa - [SC,Temp,Tense], -- special punctuation
TextSpa - [SC,Temp,Tense,Pol,PPos,PNeg], -- special punctuation
IdiomSpa,
StructuralSpa,
TenseSpa

View File

@@ -32,14 +32,14 @@ concrete IdiomSpa of Idiom = CatSpa **
(\\agr =>
let
clpr = <vp.clit1,vp.clit2> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ---- pol
in
vp.s.s ! VGer ++ clpr.p1 ++ obj
)
(predV (verboV (estar_2 "estar"))) ;
ImpPl1 vp = {s =
mkImperative False P1 vp ! Pos ! Masc ! Pl ; --- fem
mkImperative False P1 vp ! RPos ! Masc ! Pl ; --- fem
} ;
}

View File

@@ -1,3 +1,3 @@
concrete TenseSpa of Tense = CatSpa, TenseX [Ant,Pol,AAnter,ASimul,PNeg,PPos] **
concrete TenseSpa of Tense = CatSpa, TenseX [Ant,AAnter,ASimul] **
TenseRomance with
(ResRomance = ResSpa) ;