diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf index 8dbd8483e..da15031db 100644 --- a/examples/phrasebook/Sentences.gf +++ b/examples/phrasebook/Sentences.gf @@ -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 ; diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf index d2df39ca9..f41b069ab 100644 --- a/examples/phrasebook/SentencesI.gf +++ b/examples/phrasebook/SentencesI.gf @@ -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 ; VEat = mkVP ; VRead = mkVP ; diff --git a/lib/src/catalan/DiffCat.gf b/lib/src/catalan/DiffCat.gf index 2e8cc9102..e7d81cd0e 100644 --- a/lib/src/catalan/DiffCat.gf +++ b/lib/src/catalan/DiffCat.gf @@ -94,7 +94,12 @@ oper let pe = case b of {True => P3 ; _ => p} ; agr = {g = g ; n = n ; p = pe} ; - clpr = ; ---- TODO: True if clit + refl = case vp.s.vtyp of { + VRefl => ; + _ => <[],False> + } ; + + clpr = ; ---- TODO: True if clit ---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ; ----e verb = case of { ----e => (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 => <[],[]> ; diff --git a/lib/src/dutch/SentenceDut.gf b/lib/src/dutch/SentenceDut.gf index 11f85c3ea..61cd41642 100644 --- a/lib/src/dutch/SentenceDut.gf +++ b/lib/src/dutch/SentenceDut.gf @@ -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 = diff --git a/lib/src/french/DiffFre.gf b/lib/src/french/DiffFre.gf index 69967c30a..9f94aedd1 100644 --- a/lib/src/french/DiffFre.gf +++ b/lib/src/french/DiffFre.gf @@ -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 = ; ---- TODO: True if clit + refl = case vp.s.vtyp of { + VRefl => case of { + => <"toi",elision "t",True> ; + _ => <"vous","vous",True> + } ; + _ => <[],[],False> + } ; + clpr = ; 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 => <[],[]> ; diff --git a/lib/src/italian/DiffIta.gf b/lib/src/italian/DiffIta.gf index 4f8d4b289..8c442f8d4 100644 --- a/lib/src/italian/DiffIta.gf +++ b/lib/src/italian/DiffIta.gf @@ -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 = ; ---- TODO: True is clit + refl = case vp.s.vtyp of { + VRefl => ; + _ => <[],False> + } ; + + clpr = ; verb = case of { + => vp.s.s ! VInfin clpr.p3 ; ---- ! aag ; => 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 => <[],[]> ; diff --git a/lib/src/romance/CommonRomance.gf b/lib/src/romance/CommonRomance.gf index c5b959c29..421cf12fb 100644 --- a/lib/src/romance/CommonRomance.gf +++ b/lib/src/romance/CommonRomance.gf @@ -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" diff --git a/lib/src/romance/DiffRomance.gf b/lib/src/romance/DiffRomance.gf index 91906c9e0..b24b27407 100644 --- a/lib/src/romance/DiffRomance.gf +++ b/lib/src/romance/DiffRomance.gf @@ -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). diff --git a/lib/src/romance/ResRomance.gf b/lib/src/romance/ResRomance.gf index 72d526bce..7de05e373 100644 --- a/lib/src/romance/ResRomance.gf +++ b/lib/src/romance/ResRomance.gf @@ -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 ; } diff --git a/lib/src/spanish/DiffSpa.gf b/lib/src/spanish/DiffSpa.gf index 59957bec3..1fcc870b0 100644 --- a/lib/src/spanish/DiffSpa.gf +++ b/lib/src/spanish/DiffSpa.gf @@ -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 = ; ---- TODO: True if clit + refl = case vp.s.vtyp of { + VRefl => ; + _ => <[],False> + } ; + + clpr = ; ---- clpr = <[],[],False> ; ----e pronArg agr.n agr.p vp.clAcc vp.clDat ; ----e verb = case of { ----e => (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 => <[],[]> ;