From fb1e3fa798a6924f8dfc478aee7b2aa8c2aeb3c5 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 16 Dec 2003 15:39:07 +0000 Subject: [PATCH] More work on rom --- lib/resource-0.6/french/SyntaxFre.gf | 5 ++++- lib/resource-0.6/french/TypesFre.gf | 7 ++++++ lib/resource-0.6/italian/SyntaxIta.gf | 5 ++++- lib/resource-0.6/italian/TypesIta.gf | 7 ++++++ lib/resource-0.6/romance/SyntaxRomance.gf | 26 ++++++++++++++--------- lib/resource-0.6/romance/TypesRomance.gf | 4 +--- 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/lib/resource-0.6/french/SyntaxFre.gf b/lib/resource-0.6/french/SyntaxFre.gf index 8e4576b1e..292f6d08b 100644 --- a/lib/resource-0.6/french/SyntaxFre.gf +++ b/lib/resource-0.6/french/SyntaxFre.gf @@ -9,6 +9,8 @@ oper jean.g Sg ; + nounPhraseOn = mkNameNounPhrase "on" Masc ; + partitiveNounPhrase = \n,vin -> normalNounPhrase (table { @@ -90,7 +92,8 @@ oper isTransVerbClit = \v -> case v.c of { Acc => True ; - _ => False --- hmmm + Dat => True ; + _ => False } ; -- The "ne - pas" negation. diff --git a/lib/resource-0.6/french/TypesFre.gf b/lib/resource-0.6/french/TypesFre.gf index 2fcb2e3ae..80fe5778d 100644 --- a/lib/resource-0.6/french/TypesFre.gf +++ b/lib/resource-0.6/french/TypesFre.gf @@ -126,6 +126,13 @@ oper _ => Ton c } ; + case2pformClit = \c -> case c of { + Nom => Aton Nom ; + Acc => Aton Acc ; + Dat => Aton Dat ; + _ => Ton c + } ; + -- Relative pronouns: the case-dependent parameter type. param RelForm = RSimple Case | RComplex Gender Number Case ; diff --git a/lib/resource-0.6/italian/SyntaxIta.gf b/lib/resource-0.6/italian/SyntaxIta.gf index d9b57ec23..a676dab62 100644 --- a/lib/resource-0.6/italian/SyntaxIta.gf +++ b/lib/resource-0.6/italian/SyntaxIta.gf @@ -9,6 +9,8 @@ oper jean.g Sg ; + nounPhraseOn = mkNameNounPhrase "si" Masc ; --- can be plural dep. on object + partitiveNounPhrase = \n,vino -> normalNounPhrase (table { @@ -85,7 +87,8 @@ oper isTransVerbClit = \v -> case v.c of { Acc => True ; - _ => False --- hmmm + CPrep P_a => True ; -- dative + _ => False } ; -- The negation of a verb. diff --git a/lib/resource-0.6/italian/TypesIta.gf b/lib/resource-0.6/italian/TypesIta.gf index 761df4f61..8df73a485 100644 --- a/lib/resource-0.6/italian/TypesIta.gf +++ b/lib/resource-0.6/italian/TypesIta.gf @@ -65,6 +65,13 @@ oper _ => Ton c } ; + case2pformClit = \c -> case c of { + Nom => Aton Nom ; + Acc => Aton Acc ; + CPrep P_a => Aton c ; + _ => Ton c + } ; + -- Comparative adjectives are only sometimes formed morphologically -- (actually: by different morphemes). diff --git a/lib/resource-0.6/romance/SyntaxRomance.gf b/lib/resource-0.6/romance/SyntaxRomance.gf index 23cf65bdf..1b757976d 100644 --- a/lib/resource-0.6/romance/SyntaxRomance.gf +++ b/lib/resource-0.6/romance/SyntaxRomance.gf @@ -47,7 +47,7 @@ oper mkNameNounPhrase : Str -> Gender -> NounPhrase = \jean,m -> nameNounPhrase (mkProperName jean m) ; - nounPhraseOn = mkNameNounPhrase "on" Masc ; + nounPhraseOn : NounPhrase ; normalNounPhrase : (CaseA => Str) -> Gender -> Number -> NounPhrase = \cs,g,n -> {s = \\p => cs ! (pform2case p) ; @@ -459,7 +459,7 @@ oper complTransVerb : TransVerb -> NounPhrase -> VerbGroup = \aime,jean -> {s = \\b,g,w => ---- BUG: v gives stack overflow - let {Jean = jean.s ! (case2pform aime.c) ; Aime = aime.s ! w} in + let {Jean = jean.s ! (case2pformClit aime.c) ; Aime = aime.s ! w} in if_then_Str (andB (isNounPhraseClit jean) (isTransVerbClit aime)) (posNeg b (Jean ++ Aime) []) (posNeg b Aime Jean) @@ -490,24 +490,30 @@ oper DitransVerb = TransVerb ** {s3 : Preposition ; c3 : CaseA} ; - mkDitransVerb : Verb -> Preposition -> CaseA -> Preposition -> CaseA -> DitransVerb = + mkDitransVerb : + Verb -> Preposition -> CaseA -> Preposition -> CaseA -> DitransVerb = \v,p1,c1,p2,c2 -> v ** {s2 = p1 ; c = c1 ; s3 = p2 ; c3 = c2} ; ---- This must be completed to account for the cliticization of the second object. +--- This must be completed to account for the order of the clitics, and also, to +--- distinguish between different types of complements. complDitransVerb : DitransVerb -> NounPhrase -> NounPhrase -> VerbGroup = \donner,jean,vin -> {s = \\b,g,w => let donne = donner.s ! w ; - Jean = jean.s ! (case2pform donner.c) ; - duvin = vin.s ! (case2pform donner.c3) ; + cJean = isNounPhraseClit jean ; + cVin = isNounPhraseClit vin ; + Jean = jean.s ! (case2pformClit donner.c) ; + Vin = vin.s ! (case2pformClit donner.c3) ; + aJean = if_then_Str cJean [] Jean ; + duVin = if_then_Str cVin [] Vin ; + lui = if_then_Str cJean Jean [] ; + te = if_then_Str cVin Vin [] in - if_then_Str (andB (isNounPhraseClit jean) (isTransVerbClit donner)) - (posNeg b (Jean ++ donne) duvin) - (posNeg b donne (Jean ++ duvin)) - } ; + posNeg b (te ++ lui ++ donne) (aJean ++ duVin) + } ; -- The following macro builds the "ne - pas" or "non" negation. The second -- string argument is used for the complement of a verb phrase. In Italian, diff --git a/lib/resource-0.6/romance/TypesRomance.gf b/lib/resource-0.6/romance/TypesRomance.gf index facac8843..0ab31be10 100644 --- a/lib/resource-0.6/romance/TypesRomance.gf +++ b/lib/resource-0.6/romance/TypesRomance.gf @@ -61,7 +61,7 @@ oper oper pform2case : NPFormA -> CaseA ; - case2pform : CaseA -> NPFormA ; + case2pform, case2pformClit : CaseA -> NPFormA ; prepCase : CaseA -> Str ; @@ -101,8 +101,6 @@ oper -- Tonic forms are divided into four classes of clitic type. -- The first value is used for never-clitic noun phrases. --- This classification is incomplete, since we do not (yet) treat --- ditransitive verbs. -- -- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".