diff --git a/lib/resource/italian/MorphoIta.gf b/lib/resource/italian/MorphoIta.gf index 2f63e8c96..8473582e4 100644 --- a/lib/resource/italian/MorphoIta.gf +++ b/lib/resource/italian/MorphoIta.gf @@ -278,6 +278,19 @@ oper } } ; + -- used in constructions like "(non) ci sono ..." + + pronEmpty : Number -> Pronoun = \n -> mkPronoun + [] + [] + [] + [] + [] [] [] [] + (PGen Masc) + n + P3 + Clit2 ; + --2 Determiners -- -- Determiners, traditionally called indefinite pronouns, are inflected diff --git a/lib/resource/italian/SyntaxIta.gf b/lib/resource/italian/SyntaxIta.gf index 9fe98d144..27c2ba2cc 100644 --- a/lib/resource/italian/SyntaxIta.gf +++ b/lib/resource/italian/SyntaxIta.gf @@ -40,7 +40,13 @@ oper npGenPossNum = \nu,ton,mec -> \\c => artDef mec.g Pl c ++ ton.s ! Poss Pl mec.g ++ nu.s ! mec.g ++ mec.s ! Pl ; - existNounPhrase = variants {} ; ---- + existNounPhrase np = + let ci = MorphoIta.pronNous in + sats2clause ( + insertObject (mkSatsObject (pronEmpty np.n) (mkTransVerbCas verbEssere dative) ci) + accusative [] np) ; + + {- ---- existNounPhrase = \delvino -> { s = \\m => @@ -51,15 +57,15 @@ oper } ; -} + ---- check this! reflPron : Number => Person => NPFormA => Str = \\n,p => case p of { P3 => table { Ton x => prepCase x ++ "sé" ; - Aton _ => "si" ; - Poss Sg Masc => "suo" ; - Poss Sg Fem => "sua" ; - Poss Pl Masc => "suoi" ; - Poss Pl _ => "sue" + Aton _ => "se" ; + Poss Sg Masc => "su" ; + Poss Sg _ => "su" ; + Poss Pl _ => "sus" } ; _ => (personPron Masc n p).s } ; diff --git a/lib/resource/romance/SyntaxRomance.gf b/lib/resource/romance/SyntaxRomance.gf index 2e12927c3..0a085b05a 100644 --- a/lib/resource/romance/SyntaxRomance.gf +++ b/lib/resource/romance/SyntaxRomance.gf @@ -1418,7 +1418,7 @@ oper artIndef : Gender -> Number -> CaseA -> Str ; genForms : Str -> Str -> Gender => Str ; ------ moved from Res +----- moved from Res ; should not be here (pronouns are also in MorphoIta...) pronJe, pronTu, pronIl, pronElle, pronNous, pronVous, pronIls, pronElles : Pronoun ; diff --git a/lib/resource/spanish/ClauseSpa.gf b/lib/resource/spanish/ClauseSpa.gf new file mode 100644 index 000000000..542b63e6d --- /dev/null +++ b/lib/resource/spanish/ClauseSpa.gf @@ -0,0 +1,4 @@ +--# -path=.:../romance:../abstract:../../prelude + +concrete ClauseSpa of Clause = CategoriesSpa ** + ClauseRomance with (SyntaxRomance=SyntaxSpa) ; diff --git a/lib/resource/spanish/MorphoSpa.gf b/lib/resource/spanish/MorphoSpa.gf index ee08323cb..99e25d698 100644 --- a/lib/resource/spanish/MorphoSpa.gf +++ b/lib/resource/spanish/MorphoSpa.gf @@ -126,6 +126,18 @@ oper c = c } ; + -- used in constructions like "(no) hay ..." + + pronEmpty : Number -> Pronoun = \n -> mkPronoun + [] + [] + [] + [] + [] [] [] [] + (PGen Masc) + n + P3 + Clit2 ; --2 Reflexive pronouns -- diff --git a/lib/resource/spanish/SyntaxSpa.gf b/lib/resource/spanish/SyntaxSpa.gf index 800f85d60..5978710e1 100644 --- a/lib/resource/spanish/SyntaxSpa.gf +++ b/lib/resource/spanish/SyntaxSpa.gf @@ -37,7 +37,48 @@ oper npGenPossNum = \nu,ton,mec -> \\c => artDef mec.g Pl c ++ ton.s ! Poss Pl mec.g ++ nu.s ! mec.g ++ mec.s ! Pl ; - existNounPhrase = variants {} ; + existNounPhrase np = + let + verbHay = + {s = table { + VFin (VPres Ind) Sg P3 => "hay" ; + v => verbHaber.s ! v + } ; + aux = verbHaber.aux + } + in + sats2clause ( + mkSatsObject (pronEmpty Sg) (mkTransVerbCas verbHay accusative) np) ; + + reflPron : Number => Person => NPFormA => Str = \\n,p => + case p of { + P3 => table { + Ton x => prepCase x ++ "sé" ; + Aton _ => "si" ; + Poss Sg Masc => "suo" ; + Poss Sg Fem => "sua" ; + Poss Pl Masc => "suoi" ; + Poss Pl _ => "sue" + } ; + _ => (personPron Masc n p).s + } ; + + personPron : Gender -> Number -> Person -> Pronoun = \g,n,p -> + case of { + => pronJe ; + => pronTu ; + => case g of { + Masc => pronIl ; + Fem => pronElle + } ; + => pronNous ; + => pronVous ; + => case g of { + Masc => pronIls ; + Fem => pronIls + } + } ; + {- ---- existNounPhrase = \delvino -> { s = \\m => diff --git a/lib/resource/spanish/TestResourceSpa.gf b/lib/resource/spanish/TestResourceSpa.gf index 7ab00189e..609c8c972 100644 --- a/lib/resource/spanish/TestResourceSpa.gf +++ b/lib/resource/spanish/TestResourceSpa.gf @@ -1,7 +1,8 @@ ---# -path=.:../romance:../oldabstract:../abstract:../../prelude +--# -path=.:../romance:../abstract:../../prelude concrete TestResourceSpa of TestResource = - RulesSpa, StructuralSpa ** open Prelude, TypesSpa, MorphoSpa, SyntaxSpa in { + RulesSpa, ClauseSpa, StructuralSpa ** open Prelude, TypesSpa, + MorphoSpa, BeschSpa, SyntaxSpa in { flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ; @@ -18,23 +19,22 @@ lin Woman = mkCNom (nomPilar "mujer") Fem ; Car = mkCNom (nomVino "coche") Masc ; Light = mkCNom (numForms "luz" "luces") Fem ; - Level = mkCNom (nomPilar "nivel") Masc ; House = mkCNom (nomVino "casa") Fem ; Wine = mkCNom (nomVino "vino") Masc ; Bottle = mkCNom (nomVino "botella") Fem ; Bar = mkCNom (nomTram "bar") Masc ; - Walk = verbPres (zurrar_3 "pasear") AHabere ; + Walk = verbPres (cortar_5 "pasear") AHabere ; ---- Run = (verbPres (correre_41 "correre") AHabere) ; - Send = mkTransVerbDir (verbPres (zurrar_3 "mandar") AHabere) ; - Love = mkTransVerbDir (verbPres (zurrar_3 "amar") AHabere) ; - Wait = mkTransVerbCas (verbPres (zurrar_3 "esperar") AHabere) dative ; + Send = mkTransVerbDir (verbPres (cortar_5 "mandar") AHabere) ; + Love = mkTransVerbDir (verbPres (cortar_5 "amar") AHabere) ; + Wait = mkTransVerbCas (verbPres (cortar_5 "esperar") AHabere) dative ; ---- Drink = mkTransVerbDir (verbPres (bere_29 "bere") AHabere) ; ---- Give = mkDitransVerb (verbPres (dare_17 "dare") AHabere) [] dative [] accusative ; - Prefer = mkDitransVerb (verbPres (zurrir_5 "preferir") AHabere) [] accusative [] dative ; + Prefer = mkDitransVerb (verbPres (vivir_7 "preferir") AHabere) [] accusative [] dative ; ---- Say = verbSent (verbPres (dire_44 "dire") AHabere) Ind Ind ; - Prove = verbSent (verbPres (zurrar_3 "demonstrar") AHabere) Ind Ind ; - SwitchOn = mkTransVerbDir (verbPres (vender_4 "enciender") AHabere) ; ---- - SwitchOff = mkTransVerbDir (verbPres (zurrar_3 "apagar") AHabere) ; + Prove = verbSent (verbPres (cortar_5 "demonstrar") AHabere) Ind Ind ; + SwitchOn = mkTransVerbDir (verbPres (deber_6 "enciender") AHabere) ; ---- + SwitchOff = mkTransVerbDir (verbPres (cortar_5 "apagar") AHabere) ; Mother = funGen (mkCNom (nomVino "madre") Fem) ; Uncle = funGen (mkCNom (nomVino "tío") Masc) ; Connection = mkCNom (nomPilar "connexión") Fem **