diff --git a/lib/resource-1.0/doc/index.txt b/lib/resource-1.0/doc/index.txt index 581c19f02..cc0ee5561 100644 --- a/lib/resource-1.0/doc/index.txt +++ b/lib/resource-1.0/doc/index.txt @@ -335,7 +335,6 @@ Danish English -- - Finnish @@ -343,16 +342,14 @@ Finnish French -- no inverted word order in questions - multiple clitics (with V3) not always right +- no pronominal questions with inverted word order German -- - Italian -- no contraction of infinitives before clitics - multiple clitics (with V3) not always right @@ -367,10 +364,11 @@ Russian Spanish - multiple clitics (with V3) not always right +- missing contractions with imperatives and clitics Swedish -- - + diff --git a/lib/resource-1.0/french/BeschFre.gf b/lib/resource-1.0/french/BeschFre.gf index 424e10814..9903e07ec 100644 --- a/lib/resource-1.0/french/BeschFre.gf +++ b/lib/resource-1.0/french/BeschFre.gf @@ -8,7 +8,7 @@ oper mkNV : Verbe -> VerbeN = \ve -> {s = vvf ve} ; oper conj : Str -> Verbe = conj1aimer ; --- temp. default oper v_nancy100inf : Str -> VerbeN = \ve -> {s = table { - VInfin => ve ; + VInfin _ => ve ; _ => nonExist } } ; diff --git a/lib/resource-1.0/french/DiffFre.gf b/lib/resource-1.0/french/DiffFre.gf index 64671ec10..39e2bb32d 100644 --- a/lib/resource-1.0/french/DiffFre.gf +++ b/lib/resource-1.0/french/DiffFre.gf @@ -66,23 +66,24 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in { ---- pronArg = pronArgGen Neg ; --- takes more space and time - pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str = \n,p,acc,dat -> + pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str * Bool = + \n,p,acc,dat -> let pacc = case acc of { - CRefl => case p of { + CRefl => elision "s" ; --- use of reflPron incred. expensive _ => argPron Fem n p Acc - } ; - CPron a => argPron a.g a.n a.p Acc ; - _ => [] + },True> ; + CPron a => ; + _ => <[],False> } ; in case dat of { CPron a => let pdat = argPron a.g a.n a.p dative in case a.p of { - P3 => ; - _ => + P3 => ; + _ => } ; - _ => + _ => } ; @@ -119,11 +120,12 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in { agr = aag ** {p = p} ; verb = (vp.s ! VPImperat).fin ! agr ; neg = vp.neg ! pol ; + hascl = (pronArg agr.n agr.p vp.clAcc vp.clDat).p3 ; clpr = pronArgGen pol agr.n agr.p vp.clAcc vp.clDat ; compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol in case pol of { - Pos => verb ++ clpr.p1 ++ compl ; + Pos => verb ++ if_then_Str hascl "-" [] ++ clpr.p1 ++ compl ; Neg => neg.p1 ++ clpr.p1 ++ verb ++ compl } } ; @@ -137,7 +139,7 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in { conjThan = elisQue ; conjThat = elisQue ; - clitInf cli inf = cli ++ inf ; + clitInf _ cli inf = cli ++ inf ; relPron : Bool => AAgr => Case => Str = \\b,a,c => let @@ -198,8 +200,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in { auxPassive : Verb = copula ; - copula : Verb = {s = table VF ["être";"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois";"soit";"soyons";"soyez";"soient";"étais";"étais";"était";"étions";"étiez";"étaient";"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";"fus";"fus";"fut";"fûmes";"fûtes";"furent";"serai";"seras";"sera";"serons";"serez";"seront";"serais";"serais";"serait";"serions";"seriez";"seraient";"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant"]; vtyp=VHabere} ; + copula : Verb = {s = table VF ["être";"être";"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois";"soit";"soyons";"soyez";"soient";"étais";"étais";"était";"étions";"étiez";"étaient";"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";"fus";"fus";"fut";"fûmes";"fûtes";"furent";"serai";"seras";"sera";"serons";"serez";"seront";"serais";"serais";"serait";"serions";"seriez";"seraient";"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant"]; vtyp=VHabere} ; - avoir_V : Verb = {s=table VF ["avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait";"ayons";"ayez";"aient";"avais";"avais";"avait";"avions";"aviez";"avaient";"eusse";"eusses";"eût";"eussions";"eussiez";"eussent";"eus";"eus";"eut";"eûmes";"eûtes";"eurent";"aurai";"auras";"aura";"aurons";"aurez";"auront";"aurais";"aurais";"aurait";"aurions";"auriez";"auraient";"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant"];vtyp=VHabere}; + avoir_V : Verb = {s=table VF ["avoir";"avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait";"ayons";"ayez";"aient";"avais";"avais";"avait";"avions";"aviez";"avaient";"eusse";"eusses";"eût";"eussions";"eussiez";"eussent";"eus";"eus";"eut";"eûmes";"eûtes";"eurent";"aurai";"auras";"aura";"aurons";"aurez";"auront";"aurais";"aurais";"aurait";"aurions";"auriez";"auraient";"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant"];vtyp=VHabere}; } diff --git a/lib/resource-1.0/french/MorphoFre.gf b/lib/resource-1.0/french/MorphoFre.gf index f49c34582..2af5be809 100644 --- a/lib/resource-1.0/french/MorphoFre.gf +++ b/lib/resource-1.0/french/MorphoFre.gf @@ -220,11 +220,11 @@ param | Imper NumPersI | Part TPart ; --- This is a conversion to the type in $ParamRomance$. +-- This is a conversion to the type in $CommonRomance$. oper vvf : (VForm => Str) -> (VF => Str) = \aller -> table { - VInfin => aller ! Inf ; + VInfin _ => aller ! Inf ; VFin (VPres Indic) n p => aller ! Indi Presn n p ; VFin (VPres Subjunct) n p => aller ! Subjo SPres n p ; VFin (VImperf Indic) n p => aller ! Indi Imparf n p ; --# notpresent diff --git a/lib/resource-1.0/italian/BeschIta.gf b/lib/resource-1.0/italian/BeschIta.gf index 0b57f9309..c9120731e 100644 --- a/lib/resource-1.0/italian/BeschIta.gf +++ b/lib/resource-1.0/italian/BeschIta.gf @@ -6491,7 +6491,8 @@ oper venire_110 : Str -> Verbo = \venire -> } ; verbBesch : {s : VForm => Str} -> {s : VF => Str} = \amare -> {s = table { - VInfin => amare.s ! Inf ; + VInfin False => amare.s ! Inf ; + VInfin True => amare.s ! InfClit ; VFin (VPres Indic) n p => amare.s ! Indi Pres n p ; VFin (VPres Conjunct) n p => amare.s ! Cong Pres n p ; VFin (VImperf Indic) n p => amare.s ! Indi Imperf n p ; --# notpresent diff --git a/lib/resource-1.0/italian/DiffIta.gf b/lib/resource-1.0/italian/DiffIta.gf index 193150896..33a274e00 100644 --- a/lib/resource-1.0/italian/DiffIta.gf +++ b/lib/resource-1.0/italian/DiffIta.gf @@ -94,26 +94,30 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud CNone => False ; _ => True } ; + hasDat = case dat of { + CNone => False ; + _ => True + } ; pdat = case dat of { CPron a => argPron a.g a.n a.p dative hasAcc ; _ => [] } ; in - ; + ; mkImperative p vp = { s = \\pol,aag => let agr = aag ** {p = p} ; + clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; verb = case of { - => (vp.s ! VPInfinit Simul).inf ! aag ; + => (vp.s ! VPInfinit Simul clpr.p3).inf ! aag ; _ => (vp.s ! VPImperat).fin ! agr } ; neg = vp.neg ! pol ; - clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol in - neg.p1 ++ verb ++ clpr.p1 ++ compl ; + neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ; } ; negation : Polarity => (Str * Str) = table { @@ -124,7 +128,7 @@ instance DiffIta of DiffRomance = open CommonRomance, PhonoIta, BeschIta, Prelud conjThan = "che" ; --- di conjThat = "che" ; - clitInf cli inf = inf ++ cli ; --- contraction of inf + clitInf b cli inf = inf ++ bindIf b ++ cli ; relPron : Bool => AAgr => Case => Str = \\b,a,c => case c of { diff --git a/lib/resource-1.0/romance/CommonRomance.gf b/lib/resource-1.0/romance/CommonRomance.gf index 86372c8a9..212e336f3 100644 --- a/lib/resource-1.0/romance/CommonRomance.gf +++ b/lib/resource-1.0/romance/CommonRomance.gf @@ -85,7 +85,7 @@ oper param VF = - VInfin + VInfin Bool | VFin TMood Number Person | VImper NumPersI | VPart Gender Number @@ -106,7 +106,7 @@ param VPFinite TMood Anteriority | VPImperat | VPGerund - | VPInfinit Anteriority ; + | VPInfinit Anteriority Bool ; RTense = RPres @@ -149,7 +149,7 @@ oper => VImper SgP2 ; => VImper PlP1 ; => VImper PlP2 ; - _ => VInfin + _ => VInfin False } ; --- @@ -183,6 +183,10 @@ oper mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ; mkOrd x = {s = \\ag => x.s ! Posit ! AF ag.g ag.n} ; +-- This is used in Spanish and Italian to bind clitics with preceding verb. + + bindIf : Bool -> Str = \b -> if_then_Str b BIND [] ; + param VPAgr = VPAgrSubj -- elle est partie, elle s'est vue diff --git a/lib/resource-1.0/romance/DiffRomance.gf b/lib/resource-1.0/romance/DiffRomance.gf index 4e7e35901..ed372d994 100644 --- a/lib/resource-1.0/romance/DiffRomance.gf +++ b/lib/resource-1.0/romance/DiffRomance.gf @@ -37,13 +37,15 @@ interface DiffRomance = open CommonRomance, Prelude in { oper conjunctCase : NPForm -> NPForm ; -- How infinitives and clitics are placed relative to each other --- (Fre "la voir", Ita "vederla"). +-- (Fre "la voir", Ita "vederla"). The $Bool$ is used for indicating +-- if there are any clitics. - oper clitInf : Str -> Str -> Str ; + oper clitInf : Bool -> Str -> Str -> Str ; -- To render pronominal arguments as clitics and/or ordinary complements. +-- Returns $True$ if there are any clitics. - oper pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str ; + oper pronArg : Number -> Person -> CAgr -> CAgr -> Str * Str * Bool ; -- To render imperatives (with their clitics etc). diff --git a/lib/resource-1.0/romance/ResRomance.gf b/lib/resource-1.0/romance/ResRomance.gf index 17acc2670..2a286b5b2 100644 --- a/lib/resource-1.0/romance/ResRomance.gf +++ b/lib/resource-1.0/romance/ResRomance.gf @@ -52,14 +52,14 @@ oper let vfin : TMood -> Agr -> Str = \tm,a -> verb.s ! VFin tm a.n a.p ; vpart : AAgr -> Str = \a -> verb.s ! VPart a.g a.n ; - vinf = verb.s ! VInfin ; + vinf : Bool -> Str = \b -> verb.s ! VInfin b ; vger = verb.s ! VGer ; typ = verb.vtyp ; aux = auxVerb typ ; habet : TMood -> Agr -> Str = \tm,a -> aux ! VFin tm a.n a.p ; - habere : Str = aux ! VInfin ; + habere : Str = aux ! VInfin False ; vimp : Agr -> Str = \a -> verb.s ! VImper (case of { => PlP1 ; @@ -80,10 +80,10 @@ oper s = table { VPFinite t Simul => vf (vfin t) (\_ -> []) ; VPFinite t Anter => vf (habet t) vpart ; --# notpresent - VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a) ; --# notpresent + VPInfinit Anter _=> vf (\_ -> []) (\a -> habere ++ vpart a) ; --# notpresent VPImperat => vf vimp (\_ -> []) ; VPGerund => vf (\_ -> []) (\_ -> vger) ; - VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) + VPInfinit Simul b=> vf (\_ -> []) (\_ -> vinf b) } ; agr = partAgr typ ; neg = negation ; @@ -217,12 +217,12 @@ oper infVP : VP -> Agr -> Str = \vp,agr -> let - inf = (vp.s ! VPInfinit Simul).inf ! (aagr agr.g agr.n) ; - neg = vp.neg ! Pos ; --- Neg not in API clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; + inf = (vp.s ! VPInfinit Simul clpr.p3).inf ! (aagr agr.g agr.n) ; + neg = vp.neg ! Pos ; --- Neg not in API obj = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol in - clitInf (clpr.p1 ++ vp.clit2) inf ++ obj ; + clitInf clpr.p3 (clpr.p1 ++ vp.clit2) inf ++ obj ; } diff --git a/lib/resource-1.0/romance/SentenceRomance.gf b/lib/resource-1.0/romance/SentenceRomance.gf index 09000907b..ff110bcf3 100644 --- a/lib/resource-1.0/romance/SentenceRomance.gf +++ b/lib/resource-1.0/romance/SentenceRomance.gf @@ -25,7 +25,7 @@ incomplete concrete SentenceRomance of Sentence = (mkClause (np.s ! Aton Nom) np.a (insertComplement - (\\a => prepCase vv.c2.c ++ v2.s ! VInfin) (predV vv))).s ; + (\\a => prepCase vv.c2.c ++ v2.s ! VInfin False) (predV vv))).s ; c2 = v2.c2 } ; diff --git a/lib/resource-1.0/spanish/BeschSpa.gf b/lib/resource-1.0/spanish/BeschSpa.gf index 08fae6d17..adc1e5cef 100644 --- a/lib/resource-1.0/spanish/BeschSpa.gf +++ b/lib/resource-1.0/spanish/BeschSpa.gf @@ -5829,8 +5829,23 @@ oper llover_89 : Str -> Verbum = \llover -> -- Verbs: conversion from full verbs to present-tense verbs. - verbBesch : {s : VFB => Str} -> {s : CommonRomance.VF => Str} = \amar -> {s = table { - VInfin => amar.s ! VI Infn ; + verbBesch : {s : VFB => Str} -> {s : CommonRomance.VF => Str} = \amar -> + {- + -- even imperatives should be modified this way, so let's postpone this + -- AR 21/6/2006 + let + amare = amar.s ! VI Infn ; + a'r = case last (init amare) of { + "i" => "ír" ; + "e" => "ér" ; + _ => "ár" + } ; + ama'r = Predef.tk 2 amare ++ a'r + in + -} + {s = table { +-- VInfin True => ama'r ; + VInfin _ => amar.s ! VI Infn ; VFin (VPres Indic) n p => amar.s ! VP (Pres Ind n p) ; VFin (VPres Conjunct) n p => amar.s ! VP (Pres Sub n p) ; VFin (VImperf Indic) n p => amar.s ! VP (Impf Ind n p) ; --# notpresent --# notpresent diff --git a/lib/resource-1.0/spanish/DiffSpa.gf b/lib/resource-1.0/spanish/DiffSpa.gf index 557a5f9ae..fe21a2089 100644 --- a/lib/resource-1.0/spanish/DiffSpa.gf +++ b/lib/resource-1.0/spanish/DiffSpa.gf @@ -58,21 +58,18 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud pronArg = \n,p,acc,dat -> let paccp = case acc of { - CRefl => ; - CPron a => ; - _ => <[],P2> + CRefl => ; + CPron a => ; + _ => <[],P2,False> } ; pdatp = case dat of { - CPron a => ; - _ => <[],P2> + CPron a => ; + _ => <[],P2,False> } in case of { - => <"se" ++ paccp.p1, []> ; - _ => + => <"se" ++ paccp.p1, [],True> ; + _ => } ; --- case of { --- => <"te" ++ "me", []> ; --- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ; mkImperative p vp = { s = \\pol,aag => @@ -86,7 +83,7 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ; compl = neg.p2 ++ clpr.p2 ++ vp.comp ! agr ++ vp.ext ! pol in - neg.p1 ++ verb ++ clpr.p1 ++ compl ; + neg.p1 ++ verb ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ; } ; negation : Polarity => (Str * Str) = table { @@ -97,7 +94,7 @@ instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelud conjThan = "que" ; conjThat = "que" ; - clitInf cli inf = inf ++ cli ; --- contraction of inf + clitInf b cli inf = inf ++ bindIf b ++ cli ; relPron : Bool => AAgr => Case => Str = \\b,a,c => case c of {