1
0
forked from GitHub/gf-rgl

(Spa) create pronouns in one place

Use the same oper to get a matching pronoun for an NP. Useful in 
application grammars, when you want to refer to an NP argument by a 
matching pronoun.
This commit is contained in:
Inari Listenmaa
2019-04-11 16:24:10 +02:00
parent 0ce6696bfa
commit 1f3f8aea90
3 changed files with 77 additions and 55 deletions

View File

@@ -33,33 +33,16 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
-- put your own definitions here
lin
iFem_Pron = mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Fem Sg P1 ;
theyFem_Pron = mkPronoun
"ellas" "las" "les" "ellas"
"su" "su" "sus" "sus"
Fem Pl P3 ;
iFem_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P1} ;
youFem_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P2} ;
weFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P1} ;
youPlFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P2} ;
theyFem_Pron = agr2pron ! {g=Fem ; n=Pl ; p=P3} ;
weFem_Pron = mkPronoun
"nosotras" "nos" "nos" "nosotras"
"nuestro" "nuestra" "nuestros" "nuestras"
Fem Pl P1 ;
youFem_Pron = mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Fem Sg P2 ;
youPlFem_Pron = mkPronoun
"vosotras" "os" "os" "vosotras"
"vuestro" "vuestra" "vuestros" "vuestras"
Fem Pl P2 ;
youPolFem_Pron = mkPronoun
"usted" "la" "le" "usted"
"su" "su" "sus" "sus"
Fem Sg P3 ;
youPolPl_Pron = mkPronoun
"ustedes" "los" "les" "ustedes"
"su" "su" "sus" "sus"

View File

@@ -164,6 +164,71 @@ oper
hasClit = True ; isPol = False
} ;
oper
-- To retrieve a matching pronoun for an NP argument.
-- Used in application grammars, please don't remove. /IL
agr2pron : Agr => Pron = table {
{g=Masc ; n=Sg ; p=P1}
=> mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Masc Sg P1 ;
{g=Masc ; n=Sg ; p=P2}
=> mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Masc Sg P2 ;
{g=Masc ; n=Sg ; p=P3}
=> mkPronoun
"él" "lo" "le" "él"
"su" "su" "sus" "sus"
Masc Sg P3 ;
{g=Masc ; n=Pl ; p=P1}
=> mkPronoun
"nosotros" "nos" "nos" "nosotros"
"nuestro" "nuestra" "nuestros" "nuestras"
Masc Pl P1 ;
{g=Masc ; n=Pl ; p=P2}
=> mkPronoun
"vosotros" "os" "os" "vosotros"
"vuestro" "vuestra" "vuestros" "vuestras"
Masc Pl P2 ;
{g=Masc ; n=Pl ; p=P3}
=> mkPronoun
"ellos" "los" "les" "ellos"
"su" "su" "sus" "sus"
Masc Pl P3 ;
{g=Fem ; n=Sg ; p=P1}
=> mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Fem Sg P1 ;
{g=Fem ; n=Sg ; p=P2}
=> mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Fem Sg P2 ;
{g=Fem ; n=Sg ; p=P3}
=> mkPronoun
"ella" "la" "le" "ella"
"su" "su" "sus" "sus"
Fem Sg P3 ;
{g=Fem ; n=Pl ; p=P1}
=> mkPronoun
"nosotras" "nos" "nos" "nosotras"
"nuestro" "nuestra" "nuestros" "nuestras"
Fem Pl P1 ;
{g=Fem ; n=Pl ; p=P2}
=> mkPronoun
"vosotras" "os" "os" "vosotras"
"vuestro" "vuestra" "vuestros" "vuestras"
Fem Pl P2 ;
{g=Fem ; n=Pl ; p=P3}
=> mkPronoun
"ellas" "las" "les" "ellas"
"su" "su" "sus" "sus"
Fem Pl P3
} ;
--2 Determiners
--

View File

@@ -43,11 +43,7 @@ lin
--- first_Ord = {s = \\ag => (regA "primero").s ! Posit ! AF ag.g ag.n} ;
for_Prep = mkPrep "para" ;
from_Prep = complGen ; ---
he_Pron =
mkPronoun
"él" "lo" "le" "él"
"su" "su" "sus" "sus"
Masc Sg P3 ;
he_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P3} ;
here_Adv = mkAdv "aquí" ;
here7to_Adv = mkAdv ["para aquí"] ;
here7from_Adv = mkAdv ["de aquí"] ;
@@ -57,11 +53,7 @@ lin
if_Subj = ss "si" ** {m = Indic} ;
if_then_Conj = {s1 = "si" ; s2 = "entonces" ; n = Sg ; lock_Conj = <>} ;
in8front_Prep = {s = "delante" ; c = MorphoSpa.genitive ; isDir = False} ;
i_Pron =
mkPronoun
"yo" "me" "me" "mí"
"mi" "mi" "mis" "mis"
Masc Sg P1 ;
i_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P1} ;
in_Prep = mkPrep "en" ;
it_Pron =
mkPronoun
@@ -101,11 +93,7 @@ lin
please_Voc = ss ["por favor"] ;
possess_Prep = complGen ;
quite_Adv = ss "bastante" ;
she_Pron =
mkPronoun
"ella" "la" "le" "ella"
"su" "su" "sus" "sus"
Fem Sg P3 ;
she_Pron = agr2pron ! {g=Fem ; n=Sg ; p=P3} ;
so_AdA = ss "tanto" ;
somebody_NP = pn2np (mkPN "alguien" Masc) ;
somePl_Det = mkDeterminer "algunos" "algunas" Pl False ;
@@ -117,10 +105,7 @@ lin
there7to_Adv = mkAdv ["para allí"] ;
there7from_Adv = mkAdv ["de allí"] ;
therefore_PConj = ss ["por eso"] ;
they_Pron = mkPronoun
"ellos" "los" "les" "ellos"
"su" "su" "sus" "sus"
Masc Pl P3 ;
they_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P3} ;
this_Quant = mkQuantifier "este" "esta" "estos" "estas" ;
through_Prep = mkPrep "por" ;
too_AdA = ss "demasiado" ;
@@ -128,11 +113,7 @@ lin
under_Prep = mkPrep "bajo" ;
very_AdA = ss "muy" ;
want_VV = mkVV (verboV (querer_64 "querer")) ;
we_Pron =
mkPronoun
"nosotros" "nos" "nos" "nosotros"
"nuestro" "nuestra" "nuestros" "nuestras"
Masc Pl P1 ;
we_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P1} ;
whatSg_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Sg} ;
whatPl_IP = {s = \\c => prepCase c ++ ["qué"] ; a = aagr Masc Pl} ; ---
when_IAdv = ss "cuándo" ;
@@ -149,15 +130,8 @@ lin
without_Prep = mkPrep "sin" ;
with_Prep = mkPrep "con" ;
yes_Utt = ss "sí" ;
youSg_Pron = mkPronoun
"tú" "te" "te" "ti"
"tu" "tu" "tus" "tus"
Masc Sg P2 ;
youPl_Pron =
mkPronoun
"vosotros" "os" "os" "vosotros"
"vuestro" "vuestra" "vuestros" "vuestras"
Masc Pl P2 ;
youSg_Pron = agr2pron ! {g=Masc ; n=Sg ; p=P2} ;
youPl_Pron = agr2pron ! {g=Masc ; n=Pl ; p=P2} ;
youPol_Pron =
mkPronoun
"usted" "lo" "le" "usted"