forked from GitHub/gf-core
fixed details of Romance clitics for reflexives, imperatives, infinitives. A change in the type of VP.clit3 was needed.
This commit is contained in:
@@ -196,7 +196,7 @@ abstract Sentences = Numeral ** {
|
||||
-- lexical items given in the resource Lexicon
|
||||
|
||||
VPlay, VRun, VSit, VSleep, VSwim, VWalk : VerbPhrase ;
|
||||
VDrink, VEat, VRead, VWait, VWrite : VerbPhrase ;
|
||||
VDrink, VEat, VRead, VWait, VWrite, VSit, VStop : VerbPhrase ;
|
||||
V2Buy, V2Drink, V2Eat : Object -> VerbPhrase ;
|
||||
V2Wait : Person -> VerbPhrase ;
|
||||
|
||||
|
||||
@@ -268,6 +268,8 @@ oper
|
||||
VSleep = mkVP sleep_V ;
|
||||
VSwim = mkVP swim_V ;
|
||||
VWalk = mkVP walk_V ;
|
||||
VSit = mkVP sit_V ;
|
||||
VStop = mkVP stop_V ;
|
||||
VDrink = mkVP <lin V drink_V2 : V> ;
|
||||
VEat = mkVP <lin V eat_V2 : V> ;
|
||||
VRead = mkVP <lin V read_V2 : V> ;
|
||||
|
||||
@@ -94,7 +94,12 @@ oper
|
||||
let
|
||||
pe = case b of {True => P3 ; _ => p} ;
|
||||
agr = {g = g ; n = n ; p = pe} ;
|
||||
clpr = <vp.clit1 ++ vp.clit2, [],False> ; ---- TODO: True if clit
|
||||
refl = case vp.s.vtyp of {
|
||||
VRefl => <reflPron n pe Acc,True> ;
|
||||
_ => <[],False>
|
||||
} ;
|
||||
|
||||
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ; ---- TODO: True if clit
|
||||
---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||
----e verb = case <aag.n, pol,pe> of {
|
||||
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
||||
@@ -104,7 +109,8 @@ oper
|
||||
neg = vp.neg ! pol ;
|
||||
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
|
||||
in
|
||||
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl
|
||||
;
|
||||
|
||||
negation : RPolarity => (Str * Str) = table {
|
||||
RPos => <[],[]> ;
|
||||
|
||||
@@ -21,7 +21,7 @@ concrete SentenceDut of Sentence = CatDut ** open ResDut, Prelude in {
|
||||
inf = vp.inf.p1 ;
|
||||
in
|
||||
verb ++ ps.p2 ++
|
||||
vp.a1 ! pol ++ vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext
|
||||
vp.a1 ! pol ++ vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
||||
instance DiffFre of DiffRomance - [imperClit] = open CommonRomance, PhonoFre, Prelude in {
|
||||
|
||||
flags optimize=noexpand ; -- coding=utf8 ;
|
||||
-- flags optimize=all ;
|
||||
@@ -122,15 +122,30 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
||||
num = if_then_else Number b Pl n ;
|
||||
verb = vp.s.s ! vImper num p ;
|
||||
neg = vp.neg ! pol ;
|
||||
clpr = <vp.clit1 ++ vp.clit2, False> ; ---- TODO: True if clit
|
||||
refl = case vp.s.vtyp of {
|
||||
VRefl => case <n,b> of {
|
||||
<Sg,False> => <"toi",elision "t",True> ;
|
||||
_ => <"vous","vous",True>
|
||||
} ;
|
||||
_ => <[],[],False>
|
||||
} ;
|
||||
clpr = <vp.clit1 ++ vp.clit2, vp.clit3.hasClit> ;
|
||||
compl = vp.comp ! agr ++ vp.ext ! pol
|
||||
in
|
||||
case pol of {
|
||||
RPos => verb ++ if_then_Str clpr.p2 "-" [] ++ clpr.p1 ++ compl ;
|
||||
RNeg _ => neg.p1 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
|
||||
RPos => verb ++ if_then_Str refl.p3 bindHyphen [] ++ refl.p1 ++
|
||||
if_then_Str clpr.p2 bindHyphen [] ++ vp.clit3.imp ++
|
||||
compl ;
|
||||
RNeg _ => neg.p1 ++ refl.p2 ++ clpr.p1 ++ verb ++ neg.p2 ++ compl
|
||||
} ;
|
||||
---- TODO: vois-le vs. vois-moi vs. ne me vois pas
|
||||
|
||||
imperClit : Agr -> Str -> Str -> Str = \a,c1,c2 -> case a of {
|
||||
{n = Sg ; p = P1 ; g = _} => "moi" ;
|
||||
{n = Sg ; p = P2 ; g = _} => "toi" ;
|
||||
_ => c1 ++ c2
|
||||
} ;
|
||||
|
||||
bindHyphen : Str = BIND ++ "-" ++ BIND ;
|
||||
|
||||
negation : RPolarity => (Str * Str) = table {
|
||||
RPos => <[],[]> ;
|
||||
|
||||
@@ -113,16 +113,21 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud
|
||||
let
|
||||
pe = case b of {True => P3 ; _ => p} ;
|
||||
agr = {g = g ; n = n ; p = pe} ;
|
||||
clpr = <vp.clit1 ++ vp.clit2,[],False> ; ---- TODO: True is clit
|
||||
refl = case vp.s.vtyp of {
|
||||
VRefl => <reflPron n pe Acc,True> ;
|
||||
_ => <[],False>
|
||||
} ;
|
||||
|
||||
clpr = <vp.clit1 ++ vp.clit2,[],vp.clit3.hasClit> ;
|
||||
verb = case <n,pol,pe> of {
|
||||
<Sg, RNeg True, 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 ;
|
||||
compl = vp.comp ! agr ++ vp.ext ! pol
|
||||
in
|
||||
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
---- TODO non mi mangi
|
||||
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
|
||||
negation : RPolarity => (Str * Str) = table {
|
||||
RPos => <[],[]> ;
|
||||
|
||||
@@ -230,22 +230,6 @@ oper
|
||||
VPAgrSubj -- elle est partie, elle s'est vue
|
||||
| VPAgrClit Gender Number ; -- elle a dormi; elle les a vues
|
||||
|
||||
oper
|
||||
VPC : Type = {
|
||||
s : VPForm => {
|
||||
fin : Agr => Str ; -- ai
|
||||
inf : AAgr => Str -- dit
|
||||
} ;
|
||||
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
|
||||
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
|
||||
} ;
|
||||
|
||||
-- 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"
|
||||
|
||||
@@ -110,12 +110,20 @@ oper
|
||||
neg : RPolarity => (Str * Str) ; -- ne-pas
|
||||
clit1 : Str ; -- le/se
|
||||
clit2 : Str ; -- lui
|
||||
clit3 : Str ; -- y en
|
||||
clit3 : Clit3 ; -- 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
|
||||
} ;
|
||||
|
||||
Clit3 : Type = {s : Str ; imp : Str ; hasClit : Bool} ; --- imp encodes special imperative clitic, hasClit whether there is a clitic
|
||||
|
||||
addClit3 : Bool -> Str -> Str -> Clit3 -> Clit3 = \hasClit,s,imp,clit -> {
|
||||
s = clit.s ++ s ; imp = clit.imp ++ imp ; hasClit = hasClit ---- in Fre, imp is "moi" for "me"
|
||||
} ;
|
||||
|
||||
imperClit : Agr -> Str -> Str -> Str = \a,c1,c2 -> c1 ++ c2 ;
|
||||
|
||||
-- The pronoun to be repeated in $VPS$ coordination, and also in Fre inverted questions.
|
||||
-- Empty in other languages than Fre (as a kind of prodrop).
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ oper
|
||||
neg = negation ;
|
||||
clit1 = [] ;
|
||||
clit2 = [] ;
|
||||
clit3 = [] ;
|
||||
clit3 = {s,imp = [] ; hasClit = False} ;
|
||||
isNeg = False ;
|
||||
comp = \\a => [] ;
|
||||
ext = \\p => []
|
||||
@@ -102,7 +102,7 @@ oper
|
||||
} ;
|
||||
clit1 = vp.clit1 ++ obj.c1 ;
|
||||
clit2 = vp.clit2 ++ obj.c2 ;
|
||||
clit3 = vp.clit3 ;
|
||||
clit3 = addClit3 np.hasClit [] (imperClit np.a obj.c1 obj.c2) vp.clit3 ;
|
||||
isNeg = orB vp.isNeg np.isNeg ;
|
||||
comp = \\a => c.s ++ obj.comp ++ vp.comp ! a ;
|
||||
neg = vp.neg ;
|
||||
@@ -178,7 +178,7 @@ oper
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
clit3 = vp.clit3 ++ co ;
|
||||
clit3 = addClit3 True co vp.clit3.imp vp.clit3 ;
|
||||
isNeg = vp.isNeg ;
|
||||
neg = vp.neg ;
|
||||
comp = vp.comp ;
|
||||
@@ -232,7 +232,7 @@ oper
|
||||
VRefl => reflPron num per Acc ; ---- case ?
|
||||
_ => []
|
||||
} ;
|
||||
clit = refl ++ vp.clit1 ++ vp.clit2 ++ vp.clit3 ; ---- refl first?
|
||||
clit = refl ++ vp.clit1 ++ vp.clit2 ++ vp.clit3.s ; ---- refl first?
|
||||
|
||||
verb = vp.s.s ;
|
||||
vaux = auxVerb vp.s.vtyp ;
|
||||
@@ -271,7 +271,7 @@ oper
|
||||
|
||||
infVP : VP -> Agr -> Str = \vp,agr ->
|
||||
let
|
||||
iform = False ; ---- meaning: no clitics
|
||||
iform = vp.clit3.hasClit ;
|
||||
inf = vp.s.s ! VInfin iform ;
|
||||
neg = vp.neg ! RPos ; --- Neg not in API
|
||||
obj = neg.p2 ++ vp.comp ! agr ++ vp.ext ! RPos ; ---- pol
|
||||
@@ -280,7 +280,7 @@ oper
|
||||
_ => []
|
||||
} ;
|
||||
in
|
||||
neg.p1 ++ clitInf iform (refl ++ vp.clit1 ++ vp.clit2 ++ vp.clit3) inf ++ obj ;
|
||||
neg.p1 ++ clitInf iform (refl ++ vp.clit1 ++ vp.clit2 ++ vp.clit3.s) inf ++ obj ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,12 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
|
||||
let
|
||||
pe = case b of {True => P3 ; _ => p} ;
|
||||
agr = {g = g ; n = n ; p = pe} ;
|
||||
clpr = <vp.clit1 ++ vp.clit2, [],False> ; ---- TODO: True if clit
|
||||
refl = case vp.s.vtyp of {
|
||||
VRefl => <reflPron n pe Acc,True> ;
|
||||
_ => <[],False>
|
||||
} ;
|
||||
|
||||
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ;
|
||||
---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||
----e verb = case <aag.n, pol,pe> of {
|
||||
----e <Sg,Neg,P2> => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ;
|
||||
@@ -105,7 +110,7 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud
|
||||
neg = vp.neg ! pol ;
|
||||
compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol
|
||||
in
|
||||
neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
neg.p1 ++ verb ++ bindIf refl.p2 ++ refl.p1 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
|
||||
negation : RPolarity => (Str * Str) = table {
|
||||
RPos => <[],[]> ;
|
||||
|
||||
Reference in New Issue
Block a user