mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added Spanish and Italian existentials
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
4
lib/resource/spanish/ClauseSpa.gf
Normal file
4
lib/resource/spanish/ClauseSpa.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete ClauseSpa of Clause = CategoriesSpa **
|
||||
ClauseRomance with (SyntaxRomance=SyntaxSpa) ;
|
||||
@@ -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
|
||||
--
|
||||
|
||||
@@ -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 <n,p> of {
|
||||
<Sg,P1> => pronJe ;
|
||||
<Sg,P2> => pronTu ;
|
||||
<Sg,P3> => case g of {
|
||||
Masc => pronIl ;
|
||||
Fem => pronElle
|
||||
} ;
|
||||
<Pl,P1> => pronNous ;
|
||||
<Pl,P2> => pronVous ;
|
||||
<Pl,P3> => case g of {
|
||||
Masc => pronIls ;
|
||||
Fem => pronIls
|
||||
}
|
||||
} ;
|
||||
|
||||
{- ----
|
||||
existNounPhrase = \delvino -> {
|
||||
s = \\m =>
|
||||
|
||||
@@ -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 **
|
||||
|
||||
Reference in New Issue
Block a user