mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
resource = resource-1.0
This commit is contained in:
2
lib/resource/spanish/AdjectiveSpa.gf
Normal file
2
lib/resource/spanish/AdjectiveSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete AdjectiveSpa of Adjective = CatSpa ** AdjectiveRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
2
lib/resource/spanish/AdverbSpa.gf
Normal file
2
lib/resource/spanish/AdverbSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete AdverbSpa of Adverb = CatSpa ** AdverbRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
File diff suppressed because it is too large
Load Diff
4
lib/resource/spanish/CatSpa.gf
Normal file
4
lib/resource/spanish/CatSpa.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete CatSpa of Cat = CommonX - [Tense,TPres,TPast,TFut,TCond] ** CatRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete CategoriesSpa of Categories =
|
||||
CategoriesRomance with (SyntaxRomance=SyntaxSpa) ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete ClauseSpa of Clause = CategoriesSpa **
|
||||
ClauseRomance with (SyntaxRomance=SyntaxSpa) ;
|
||||
2
lib/resource/spanish/ConjunctionSpa.gf
Normal file
2
lib/resource/spanish/ConjunctionSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete ConjunctionSpa of Conjunction = CatSpa ** ConjunctionRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
@@ -1,25 +0,0 @@
|
||||
concrete CountrySpa of Country = open CategoriesSpa, ParadigmsSpa in {
|
||||
|
||||
lincat
|
||||
Country = PN ;
|
||||
Nationality = A ;
|
||||
Language = N ;
|
||||
|
||||
lin
|
||||
Denmark = mkPN "Dinamarca" feminine ;
|
||||
England = mkPN "Inglaterra" feminine ;
|
||||
Finland = mkPN "Finlandia" feminine ;
|
||||
France = mkPN "Francia" feminine ;
|
||||
Germany = mkPN "Germania" feminine ;
|
||||
Italy = mkPN "Italia" feminine ;
|
||||
Norway = mkPN "Noruega" feminine ;
|
||||
Russia = mkPN "Rusia" feminine ;
|
||||
Spain = mkPN "España" feminine ;
|
||||
Sweden = mkPN "Suecia" feminine ;
|
||||
|
||||
Danish = regA "danés" ;
|
||||
English = regA "inglés" ;
|
||||
|
||||
DanishLang = regN "danés" ;
|
||||
EnglishLang = regN "inglés" ;
|
||||
} ;
|
||||
160
lib/resource/spanish/DiffSpa.gf
Normal file
160
lib/resource/spanish/DiffSpa.gf
Normal file
@@ -0,0 +1,160 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
instance DiffSpa of DiffRomance = open CommonRomance, PhonoSpa, BeschSpa, Prelude in {
|
||||
|
||||
flags optimize=noexpand ;
|
||||
|
||||
param
|
||||
Prep = P_de | P_a ;
|
||||
VType = VHabere | VRefl ;
|
||||
|
||||
oper
|
||||
dative : Case = CPrep P_a ;
|
||||
genitive : Case = CPrep P_de ;
|
||||
|
||||
prepCase = \c -> case c of {
|
||||
Nom => [] ;
|
||||
Acc => [] ;
|
||||
CPrep P_de => "de" ;
|
||||
CPrep P_a => "a"
|
||||
} ;
|
||||
|
||||
artDef : Gender -> Number -> Case -> Str = \g,n,c ->
|
||||
case <g,n,c> of {
|
||||
<Masc,Sg, CPrep P_de> => "del" ;
|
||||
<Masc,Sg, CPrep P_a> => "al" ;
|
||||
<Masc,Sg, _> => prepCase c ++ "el" ;
|
||||
<Fem ,Sg, _> => prepCase c ++ "la" ;
|
||||
<Masc,Pl, _> => prepCase c ++ "los" ;
|
||||
<Fem ,Pl, _> => prepCase c ++ "las"
|
||||
} ;
|
||||
|
||||
-- In these two, "de de/du/des" becomes "de".
|
||||
|
||||
artIndef = \g,n,c -> case n of {
|
||||
Sg => prepCase c ++ genForms "un" "una" ! g ;
|
||||
_ => prepCase c ++ genForms "unos" "unas" ! g
|
||||
} ;
|
||||
|
||||
possCase = \_,_,c -> prepCase c ;
|
||||
|
||||
partitive = \g,c -> case c of {
|
||||
CPrep P_de => "de" ;
|
||||
_ => prepCase c ++ artDef g Sg (CPrep P_de)
|
||||
} ;
|
||||
|
||||
conjunctCase : NPForm -> NPForm = \c -> case c of {
|
||||
Ton Nom | Aton Nom => Ton Nom ;
|
||||
_ => Ton Acc
|
||||
} ;
|
||||
|
||||
auxVerb : VType -> (VF => Str) = \_ -> haber_V.s ;
|
||||
|
||||
partAgr : VType -> VPAgr = \vtyp -> vpAgrNone ;
|
||||
|
||||
vpAgrClit : Agr -> VPAgr = \a ->
|
||||
vpAgrNone ;
|
||||
|
||||
pronArg = \n,p,acc,dat ->
|
||||
let
|
||||
paccp = case acc of {
|
||||
CRefl => <reflPron n p Acc, p,True> ;
|
||||
CPron a => <argPron a.g a.n a.p Acc, a.p,True> ;
|
||||
_ => <[],P2,False>
|
||||
} ;
|
||||
pdatp = case dat of {
|
||||
CPron a => <argPron a.g a.n a.p dative, a.p,True> ;
|
||||
_ => <[],P2,False>
|
||||
}
|
||||
in case <paccp.p2, pdatp.p2> of {
|
||||
<P3,P3> => <"se" ++ paccp.p1, [],True> ;
|
||||
_ => <pdatp.p1 ++ paccp.p1, [],orB paccp.p3 pdatp.p3>
|
||||
} ;
|
||||
|
||||
mkImperative p vp = {
|
||||
s = \\pol,aag =>
|
||||
let
|
||||
agr = aag ** {p = p} ;
|
||||
verb = case <aag.n, pol> of {
|
||||
<Sg,Neg> => (vp.s ! VPFinite (VPres Conjunct) Simul).fin ! agr ;
|
||||
_ => (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 ++ bindIf clpr.p3 ++ clpr.p1 ++ compl ;
|
||||
} ;
|
||||
|
||||
negation : Polarity => (Str * Str) = table {
|
||||
Pos => <[],[]> ;
|
||||
Neg => <"no",[]>
|
||||
} ;
|
||||
|
||||
conjThan = "que" ;
|
||||
conjThat = "que" ;
|
||||
|
||||
clitInf b cli inf = inf ++ bindIf b ++ cli ;
|
||||
|
||||
relPron : Bool => AAgr => Case => Str = \\b,a,c =>
|
||||
case c of {
|
||||
Nom | Acc => "que" ;
|
||||
CPrep P_a => "cuyo" ;
|
||||
_ => prepCase c ++ "cuyo"
|
||||
} ;
|
||||
|
||||
pronSuch : AAgr => Str = aagrForms "tál" "tál" "tales" "tales" ;
|
||||
|
||||
quelPron : AAgr => Str = aagrForms "cuál" "cuál" "cuales" "cuales" ;
|
||||
|
||||
partQIndir = [] ; ---- ?
|
||||
|
||||
reflPron : Number -> Person -> Case -> Str = \n,p,c ->
|
||||
let pro = argPron Fem n p c
|
||||
in
|
||||
case p of {
|
||||
P3 => case c of {
|
||||
Acc | CPrep P_a => "se" ;
|
||||
_ => "sí"
|
||||
} ;
|
||||
_ => pro
|
||||
} ;
|
||||
|
||||
argPron : Gender -> Number -> Person -> Case -> Str =
|
||||
let
|
||||
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
|
||||
Acc | CPrep P_a => me ;
|
||||
_ => moi
|
||||
} ;
|
||||
cases3 : (x,y,z : Str) -> Case -> Str = \les,leur,eux,c -> case c of {
|
||||
Acc => les ;
|
||||
CPrep P_a => leur ;
|
||||
_ => eux
|
||||
} ;
|
||||
in
|
||||
\g,n,p -> case <g,n,p> of {
|
||||
<_,Sg,P1> => cases "me" "mí" ;
|
||||
<_,Sg,P2> => cases "te" "tí" ;
|
||||
<_,Pl,P1> => cases "nos" "nosotras" ; --- nosotros
|
||||
<_,Pl,P2> => cases "vos" "vosotras" ; --- vosotros
|
||||
<Fem,Sg,P3> => cases3 "la" "le" "ella" ;
|
||||
<_, Sg,P3> => cases3 "lo" "le" "èl" ;
|
||||
<Fem,Pl,P3> => cases3 "las" "les" "ellas" ;
|
||||
<_, Pl,P3> => cases3 "los" "les" "ellos"
|
||||
} ;
|
||||
|
||||
vRefl : VType = VRefl ;
|
||||
isVRefl : VType -> Bool = \ty -> case ty of {
|
||||
VRefl => True ;
|
||||
_ => False
|
||||
} ;
|
||||
|
||||
auxPassive : Verb = copula ;
|
||||
|
||||
copula = verbBeschH (ser_1 "ser") ;
|
||||
|
||||
haber_V : Verb = verbBeschH (haber_3 "haber") ;
|
||||
|
||||
verbBeschH : Verbum -> Verb = \v -> verbBesch v ** {vtyp = VHabere} ;
|
||||
|
||||
}
|
||||
2
lib/resource/spanish/ExtraRomanceSpa.gf
Normal file
2
lib/resource/spanish/ExtraRomanceSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete ExtraRomanceSpa of ExtraRomanceAbs = CatSpa ** ExtraRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
47
lib/resource/spanish/ExtraSpa.gf
Normal file
47
lib/resource/spanish/ExtraSpa.gf
Normal file
@@ -0,0 +1,47 @@
|
||||
concrete ExtraSpa of ExtraSpaAbs = ExtraRomanceSpa **
|
||||
open CommonRomance, PhonoSpa, MorphoSpa, ParadigmsSpa, ParamX, ResSpa in {
|
||||
|
||||
lin
|
||||
i8fem_Pron = mkPronoun
|
||||
"yo" "me" "me" "mí"
|
||||
"mi" "mi" "mis" "mis"
|
||||
Fem Sg P1 ;
|
||||
these8fem_NP = mkNP ["estas"] Fem Pl ;
|
||||
they8fem_Pron = mkPronoun
|
||||
"ellas" "las" "les" "ellas"
|
||||
"su" "su" "sus" "sus"
|
||||
Fem Pl P3 ;
|
||||
this8fem_NP = pn2np (mkPN ["esta"] Fem) ;
|
||||
those8fem_NP = mkNP ["esas"] Fem Pl ;
|
||||
|
||||
we8fem_Pron = mkPronoun
|
||||
"nosotras" "nos" "nos" "nosotras"
|
||||
"nuestro" "nuestra" "nuestros" "nuestras"
|
||||
Fem Pl P1 ;
|
||||
whoPl8fem_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Fem Pl} ;
|
||||
whoSg8fem_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Fem Sg} ;
|
||||
|
||||
youSg8fem_Pron = mkPronoun
|
||||
"tu" "te" "te" "tí"
|
||||
"tu" "tu" "tus" "tus"
|
||||
Fem Sg P2 ;
|
||||
youPl8fem_Pron = mkPronoun
|
||||
"vosotras" "vos" "vos" "vosotras"
|
||||
"vuestro" "vuestra" "vuestros" "vuestras"
|
||||
Fem Pl P2 ;
|
||||
youPol8fem_Pron = mkPronoun
|
||||
"usted" "la" "le" "usted"
|
||||
"su" "su" "sus" "sus"
|
||||
Fem Sg P3 ;
|
||||
|
||||
youPolPl_Pron = mkPronoun
|
||||
"ustedes" "las" "les" "usted"
|
||||
"su" "su" "sus" "sus"
|
||||
Masc Pl P3 ;
|
||||
youPolPl8fem_Pron = mkPronoun
|
||||
"ustedes" "las" "les" "usted"
|
||||
"su" "su" "sus" "sus"
|
||||
Fem Pl P3 ;
|
||||
|
||||
|
||||
}
|
||||
28
lib/resource/spanish/ExtraSpaAbs.gf
Normal file
28
lib/resource/spanish/ExtraSpaAbs.gf
Normal file
@@ -0,0 +1,28 @@
|
||||
-- Structures special for Spanish. These are not implemented in other
|
||||
-- Romance languages.
|
||||
|
||||
abstract ExtraSpaAbs = ExtraRomanceAbs ** {
|
||||
|
||||
fun
|
||||
|
||||
-- Feminine variants of pronouns (those in $Structural$ are
|
||||
-- masculine, which is the default when gender is unknown).
|
||||
|
||||
i8fem_Pron : Pron ;
|
||||
these8fem_NP : NP ;
|
||||
they8fem_Pron : Pron ;
|
||||
this8fem_NP : NP ;
|
||||
those8fem_NP : NP ;
|
||||
|
||||
we8fem_Pron : Pron ; -- nosotras
|
||||
whoPl8fem_IP : IP ;
|
||||
whoSg8fem_IP : IP ;
|
||||
|
||||
youSg8fem_Pron : Pron ;
|
||||
youPl8fem_Pron : Pron ; -- vosotras
|
||||
youPol8fem_Pron : Pron ; -- usted
|
||||
|
||||
youPolPl_Pron : Pron ; -- ustedes
|
||||
youPolPl8fem_Pron : Pron ;
|
||||
|
||||
}
|
||||
22
lib/resource/spanish/GrammarSpa.gf
Normal file
22
lib/resource/spanish/GrammarSpa.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete GrammarSpa of Grammar =
|
||||
NounSpa,
|
||||
VerbSpa,
|
||||
AdjectiveSpa,
|
||||
AdverbSpa,
|
||||
NumeralSpa,
|
||||
SentenceSpa,
|
||||
QuestionSpa,
|
||||
RelativeSpa,
|
||||
ConjunctionSpa,
|
||||
PhraseSpa,
|
||||
TextSpa - [Tense,TPres,TPast,TFut,TCond], -- special punctuation
|
||||
IdiomSpa,
|
||||
StructuralSpa
|
||||
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
} ;
|
||||
43
lib/resource/spanish/IdiomSpa.gf
Normal file
43
lib/resource/spanish/IdiomSpa.gf
Normal file
@@ -0,0 +1,43 @@
|
||||
concrete IdiomSpa of Idiom = CatSpa **
|
||||
open (P = ParamX), MorphoSpa, ParadigmsSpa, BeschSpa, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
ImpersCl vp = mkClause [] (agrP3 Masc Sg) vp ;
|
||||
GenericCl vp = mkClause "se" (agrP3 Masc Sg) vp ; ---- just Italian ?
|
||||
|
||||
CleftNP np rs = mkClause [] (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => rs.s ! Indic ! np.a)
|
||||
(insertComplement (\\_ => np.s ! Ton rs.c) (predV copula))) ;
|
||||
|
||||
CleftAdv ad s = mkClause [] (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => conjThat ++ s.s ! Indic)
|
||||
(insertComplement (\\_ => ad.s) (predV copula))) ;
|
||||
|
||||
|
||||
ExistNP np =
|
||||
mkClause [] (agrP3 Masc Sg)
|
||||
(insertComplement (\\_ => np.s ! Ton Acc) (predV (verboV (hay_3 "haber")))) ;
|
||||
ExistIP ip = {
|
||||
s = \\t,a,p,_ =>
|
||||
ip.s ! Nom ++
|
||||
(mkClause [] (agrP3 Masc Sg) (predV (verboV (hay_3 "haber")))).s ! t ! a ! p ! Indic
|
||||
} ;
|
||||
|
||||
ProgrVP vp =
|
||||
insertComplement
|
||||
(\\agr =>
|
||||
let
|
||||
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||
obj = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! Pos ---- pol
|
||||
in
|
||||
(vp.s ! VPGerund).inf ! (aagr agr.g agr.n) ++ clpr.p1 ++ obj
|
||||
)
|
||||
(predV (verboV (estar_2 "estar"))) ;
|
||||
|
||||
ImpPl1 vp = {s =
|
||||
(mkImperative P1 vp).s ! Pos ! {n = Pl ; g = Masc} --- fem
|
||||
} ;
|
||||
|
||||
}
|
||||
71819
lib/resource/spanish/IrregSpa.gf
Normal file
71819
lib/resource/spanish/IrregSpa.gf
Normal file
File diff suppressed because it is too large
Load Diff
1092
lib/resource/spanish/IrregSpaAbs.gf
Normal file
1092
lib/resource/spanish/IrregSpaAbs.gf
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,10 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete LangSpa of Lang =
|
||||
RulesSpa,
|
||||
ClauseSpa,
|
||||
StructuralSpa,
|
||||
BasicSpa,
|
||||
TimeSpa,
|
||||
CountrySpa,
|
||||
MathSpa
|
||||
GrammarSpa,
|
||||
LexiconSpa
|
||||
** {
|
||||
|
||||
** open Prelude, ParadigmsSpa in {
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
lin
|
||||
AdvDate d = prefixSS "el" d ;
|
||||
AdvTime t = prefixSS ["a las"] t ;
|
||||
NWeekday w = w ;
|
||||
PNWeekday w = mkPN (w.s ! singular) w.g ;
|
||||
|
||||
PNCountry x = x ;
|
||||
ANationality x = x ;
|
||||
NLanguage x = x ;
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
--# -path=.:../romance:../common:../abstract:../../prelude
|
||||
|
||||
concrete BasicSpa of Basic = CategoriesSpa ** open ParadigmsSpa, BeschSpa in {
|
||||
|
||||
-- words contributed by Ana Bove, May 2005
|
||||
---- TO CHECK: verb conjugations marked ----V
|
||||
concrete LexiconSpa of Lexicon = CatSpa ** open
|
||||
MorphoSpa, ParadigmsSpa, BeschSpa in {
|
||||
|
||||
flags
|
||||
startcat=Phr ; lexer=textlit ; unlexer=text ;
|
||||
optimize=values ;
|
||||
|
||||
lin
|
||||
@@ -17,17 +14,17 @@ lin
|
||||
art_N = regN "arte" ;
|
||||
ask_V2Q = mkV2Q (regV "preguntar") dative ;
|
||||
baby_N = regN "bebé" ; -- can be used for both fem. & masc.
|
||||
bad_ADeg = prefADeg (mkADeg (regA "malo") (regA "peor")) ;
|
||||
bad_A = prefA (mkADeg (regA "malo") (regA "peor")) ;
|
||||
bank_N = regN "banco" ;
|
||||
beautiful_ADeg = prefADeg (regADeg "bello") ; -- bella
|
||||
become_VA = regV "conventir" ; --- convertirse en, volverse, ponerse
|
||||
beautiful_A = prefA (regADeg "bello") ; -- bella
|
||||
become_VA = reflV (regV "convertir") ; --- convertirse en, volverse, ponerse
|
||||
beer_N = regN "cerveza" ;
|
||||
beg_V2V = mkV2V (regV "rogar") accusative dative ; -- pedir
|
||||
big_ADeg = prefADeg (regADeg "grande") ;
|
||||
big_A = prefA (regADeg "grande") ;
|
||||
bike_N = regN "bicicleta" ;
|
||||
bird_N = regN "pájaro" ;
|
||||
black_ADeg = regADeg "negro" ; -- negra
|
||||
blue_ADeg = regADeg "azul" ;
|
||||
black_A = regADeg "negro" ; -- negra
|
||||
blue_A = regADeg "azul" ;
|
||||
boat_N = regN "bote" ;
|
||||
book_N = regN "libro" ;
|
||||
boot_N = regN "bota" ;
|
||||
@@ -35,9 +32,9 @@ lin
|
||||
boy_N = regN "niño" ;
|
||||
bread_N = regN "pan" ;
|
||||
break_V2 = dirV2 (special_ppV (regV "romper") "roto") ;
|
||||
broad_ADeg = regADeg "ancho" ;
|
||||
broad_A = regADeg "ancho" ;
|
||||
brother_N2 = deN2 (regN "hermano") ;
|
||||
brown_ADeg = regADeg "marrón" ; --- *
|
||||
brown_A = regADeg "marrón" ; --- *
|
||||
butter_N = regN "manteca" ;
|
||||
buy_V2 = dirV2 (regV "comprar") ;
|
||||
camera_N = regN "cámara" ; -- ["máquina fotográfica"]
|
||||
@@ -51,18 +48,18 @@ lin
|
||||
child_N = regN "niño" ; -- niña
|
||||
church_N = regN "iglesia" ;
|
||||
city_N = femN (regN "ciudad") ; -- fem
|
||||
clean_ADeg = regADeg "limpio" ;
|
||||
clever_ADeg = regADeg "inteligente" ;
|
||||
clean_A = regADeg "limpio" ;
|
||||
clever_A = regADeg "inteligente" ;
|
||||
close_V2 = dirV2 (regV "cerrar") ;
|
||||
coat_N = regN "abrigo" ;
|
||||
cold_ADeg = regADeg "frío" ; -- fría
|
||||
cold_A = regADeg "frío" ; -- fría
|
||||
come_V = verboV (venir_82 "venir") ;
|
||||
computer_N = regN "computadora" ; -- also computador, ordenador in Spain
|
||||
country_N = regN "país" ; -- masc
|
||||
cousin_N = regN "primo" ;
|
||||
cow_N = regN "vaca" ;
|
||||
die_V = verboV (morir_35b "morir") ;
|
||||
dirty_ADeg = regADeg "sucio" ;
|
||||
dirty_A = regADeg "sucio" ;
|
||||
distance_N3 = mkN3 (regN "distancia") genitive dative ;
|
||||
doctor_N = regN "médico" ; -- médica
|
||||
dog_N = regN "perro" ; -- perra
|
||||
@@ -70,7 +67,7 @@ lin
|
||||
drink_V2 = dirV2 (regV "tomar") ; -- beber
|
||||
easy_A2V = mkA2V (regA "fácil") dative genitive ;
|
||||
eat_V2 = dirV2 (regV "comer") ;
|
||||
empty_ADeg = regADeg "vacío" ;
|
||||
empty_A = regADeg "vacío" ;
|
||||
enemy_N = regN "enemigo" ; -- enemiga
|
||||
factory_N = regN "fábrica" ;
|
||||
father_N2 = deN2 (regN "padre") ;
|
||||
@@ -87,9 +84,9 @@ lin
|
||||
girl_N = regN "niña" ;
|
||||
glove_N = regN "guante" ;
|
||||
gold_N = regN "oro" ;
|
||||
good_ADeg = prefADeg (mkADeg (regA "bueno") (regA "mejor")) ; ---- adv?
|
||||
good_A = prefA (mkADeg (regA "bueno") (regA "mejor")) ; ---- adv?
|
||||
go_V = (verboV (ir_46 "ir")) ;
|
||||
green_ADeg = regADeg "verde" ;
|
||||
green_A = regADeg "verde" ;
|
||||
harbour_N = regN "puerto" ;
|
||||
hate_V2 = dirV2 (regV "odiar") ;
|
||||
hat_N = regN "sombrero" ;
|
||||
@@ -98,9 +95,9 @@ lin
|
||||
hill_N = regN "colina" ;
|
||||
hope_VS = mkVS (regV "esperar") ;
|
||||
horse_N = regN "caballo" ;
|
||||
hot_ADeg = regADeg "caliente" ;
|
||||
hot_A = regADeg "caliente" ;
|
||||
house_N = regN "casa" ;
|
||||
important_ADeg = regADeg "importante" ;
|
||||
important_A = regADeg "importante" ;
|
||||
industry_N = regN "industria" ;
|
||||
iron_N = regN "fierro" ;
|
||||
king_N = regN "rey" ;
|
||||
@@ -113,7 +110,7 @@ lin
|
||||
like_V2 = dirV2 (regV "gustar") ;
|
||||
listen_V2 = dirV2 (regV "escuchar") ;
|
||||
live_V = verboV (vivir_7 "vivir") ;
|
||||
long_ADeg = regADeg "largo" ;
|
||||
long_A = regADeg "largo" ;
|
||||
lose_V2 = dirV2 (verboV (defender_29 "perder")) ;
|
||||
love_N = regN "amor" ;
|
||||
love_V2 = dirV2 (regV "amar") ;
|
||||
@@ -125,14 +122,15 @@ lin
|
||||
mother_N2 = deN2 (femN (regN "madre")) ; -- fem
|
||||
mountain_N = regN "montaña" ;
|
||||
music_N = regN "música" ;
|
||||
narrow_ADeg = regADeg "estrecho" ;
|
||||
new_ADeg = prefADeg (regADeg "nuevo") ;
|
||||
narrow_A = regADeg "estrecho" ;
|
||||
new_A = prefA (regADeg "nuevo") ;
|
||||
newspaper_N = regN "periódico" ; -- diario
|
||||
oil_N = regN "aceite" ;
|
||||
old_ADeg = prefADeg (regADeg "viejo") ;
|
||||
old_A = prefA (regADeg "viejo") ;
|
||||
open_V2 = dirV2 (special_ppV (regV "abrir") "abierto") ;
|
||||
paint_V2A = mkV2A (regV "pintar") accusative ;
|
||||
paint_V2A = mkV2A (regV "pintar") accusative (mkPrep "en") ;
|
||||
paper_N = regN "papel" ;
|
||||
paris_PN = mkPN "Paris" masculine ;
|
||||
peace_N = femN (regN "paz") ;
|
||||
pen_N = regN "lapicera" ;
|
||||
planet_N = mascN (regN "planeta") ;
|
||||
@@ -145,7 +143,7 @@ lin
|
||||
radio_N = femN (regN "radio") ;
|
||||
rain_V0 = mkV0 (verboV (llover_89 "llover")) ;
|
||||
read_V2 = dirV2 (verboV (creer_26 "leer")) ;
|
||||
red_ADeg = regADeg "rojo" ;
|
||||
red_A = regADeg "rojo" ;
|
||||
religion_N = mkN "religión" "religiones" feminine ;
|
||||
restaurant_N = regN "restaurante" ; -- restorán, restaurán, masc
|
||||
river_N = regN "río" ;
|
||||
@@ -166,11 +164,11 @@ lin
|
||||
shirt_N = regN "camisa" ;
|
||||
shoe_N = regN "zapato" ;
|
||||
shop_N = regN "negocio" ;
|
||||
short_ADeg = regADeg "corto" ; --- breve
|
||||
short_A = regADeg "corto" ; --- breve
|
||||
silver_N = regN "plata" ;
|
||||
sister_N = regN "hermana" ;
|
||||
sleep_V = verboV (dormir_35 "dormir") ;
|
||||
small_ADeg = prefADeg (regADeg "pequeño") ;
|
||||
small_A = prefA (regADeg "pequeño") ;
|
||||
snake_N = femN (regN "serpiente") ; -- fem
|
||||
sock_N = regN "media" ;
|
||||
speak_V2 = dirV2 (regV "hablar") ;
|
||||
@@ -179,7 +177,7 @@ lin
|
||||
stone_N = regN "piedra" ;
|
||||
stove_N = regN "horno" ; -- estufa
|
||||
student_N = regN "estudiante" ; -- used both for fem & masc
|
||||
stupid_ADeg = regADeg "estúpido" ;
|
||||
stupid_A = regADeg "estúpido" ;
|
||||
sun_N = regN "sol" ;
|
||||
switch8off_V2 = dirV2 (regV "apagar") ;
|
||||
switch8on_V2 = dirV2 (regV "prender") ;
|
||||
@@ -188,32 +186,32 @@ lin
|
||||
teacher_N = regN "maestro" ; -- maestra
|
||||
teach_V2 = dirV2 (regV "enseñar") ;
|
||||
television_N = mkN "televisión" "televisiones" feminine ; -- televisor masc
|
||||
thick_ADeg = regADeg "grueso" ;
|
||||
thin_ADeg = regADeg "fino" ; -- delgado
|
||||
thick_A = regADeg "grueso" ;
|
||||
thin_A = regADeg "fino" ; -- delgado
|
||||
train_N = regN "tren" ;
|
||||
travel_V = regV "viajar" ;
|
||||
tree_N = regN "árbol" ;
|
||||
--- trousers_N = regN "pantalón" ; -- masc
|
||||
ugly_ADeg = regADeg "feo" ;
|
||||
ugly_A = regADeg "feo" ;
|
||||
understand_V2 = dirV2 (regV "entender") ;
|
||||
university_N = femN (regN "universidad") ;
|
||||
village_N = regN "pueblo" ;
|
||||
wait_V2 = mkV2 (regV "esperar") dative ;
|
||||
walk_V = regV "caminar" ;
|
||||
warm_ADeg = regADeg "tibio" ;
|
||||
warm_A = regADeg "tibio" ;
|
||||
war_N = regN "guerra" ;
|
||||
watch_V2 = dirV2 (regV "mirar") ; -- ver
|
||||
water_N = mascN (regN "agua") ;
|
||||
white_ADeg = compADeg (regA "blanco") ;
|
||||
white_A = compADeg (regA "blanco") ;
|
||||
window_N = regN "ventana" ;
|
||||
wine_N = regN "vino" ;
|
||||
win_V2 = dirV2 (regV "ganar") ;
|
||||
woman_N = femN (regN "mujer") ;
|
||||
wonder_VQ = mkVQ (regV "preguntar") ; ---- preguntarse
|
||||
wonder_VQ = mkVQ (reflV (regV "preguntar")) ;
|
||||
wood_N = regN "madera" ;
|
||||
write_V2 = dirV2 (special_ppV (regV "escribir") "escrito") ;
|
||||
yellow_ADeg = regADeg "amarillo" ;
|
||||
young_ADeg = prefADeg (regADeg "joven") ;
|
||||
yellow_A = regADeg "amarillo" ;
|
||||
young_A = prefA (regADeg "joven") ;
|
||||
|
||||
do_V2 = dirV2 (verboV (hacer_44 "hacer")) ;
|
||||
now_Adv = mkAdv "ahora" ;
|
||||
@@ -224,11 +222,135 @@ lin
|
||||
put_V2 = dirV2 (verboV (poner_60 "poner")) ;
|
||||
stop_V = regV "parar" ;
|
||||
jump_V = regV "saltar" ;
|
||||
here_Adv = mkAdv "aquí" ; -- acá
|
||||
here7to_Adv = mkAdv ["para acá"] ;
|
||||
here7from_Adv = mkAdv ["de acá"] ;
|
||||
there_Adv = mkAdv "allí" ; -- allá
|
||||
there7to_Adv = mkAdv ["para allá"] ;
|
||||
there7from_Adv = mkAdv ["de allá"] ;
|
||||
|
||||
left_Ord = mkOrd (regA "izquierda") ;
|
||||
right_Ord = mkOrd (regA "derecha") ;
|
||||
far_Adv = mkAdv "lejos" ; ----?
|
||||
correct_A = regA "correcto" ;
|
||||
dry_A = regA "seco" ;
|
||||
dull_A = regA "desafilado" ;
|
||||
full_A = regA "lleno" ;
|
||||
heavy_A = regA "pesado" ;
|
||||
near_A = regA "cerca" ;
|
||||
rotten_A = regA "podrido" ;
|
||||
round_A = regA "redondo" ;
|
||||
sharp_A = regA "filoso" ; -- afilado, puntiagudo
|
||||
smooth_A = regA "liso" ; -- suave
|
||||
straight_A = regA "directo" ;
|
||||
wet_A = regA "mojado" ;
|
||||
wide_A = regA "ancho" ; -- extenso
|
||||
animal_N = regN "animal" ; -- masc (sometimes fem when adj)
|
||||
ashes_N = regN "ceniza" ;
|
||||
back_N = regN "espalda" ;
|
||||
bark_N = regN "corteza" ;
|
||||
belly_N = regN "panza" ; -- barriga
|
||||
blood_N = femN (regN "sangre") ;
|
||||
bone_N = regN "hueso" ;
|
||||
breast_N = regN "seno" ; -- pecho
|
||||
cloud_N = femN (regN "nube") ;
|
||||
day_N = mascN (regN "día") ;
|
||||
dust_N = regN "polvo" ;
|
||||
ear_N = regN "oreja" ;
|
||||
earth_N = regN "tierra" ;
|
||||
egg_N = regN "huevo" ;
|
||||
eye_N = regN "ojo" ;
|
||||
fat_N = regN "grasa" ;
|
||||
feather_N = regN "pluma" ;
|
||||
fingernail_N = regN "uña" ;
|
||||
fire_N = regN "fuego" ;
|
||||
flower_N = femN (regN "flor") ;
|
||||
fog_N = regN "niebla" ;
|
||||
foot_N = regN "pie" ;
|
||||
forest_N = regN "bosque" ;
|
||||
grass_N = regN "pasto" ; -- hierba, césped (masc)
|
||||
guts_N = regN "tripa" ; -- gut=intestino ---- pl.t. tripas
|
||||
hair_N = regN "cabello" ; -- pelo
|
||||
hand_N = femN (regN "mano") ;
|
||||
head_N = regN "cabeza" ;
|
||||
heart_N = mkN "corazón" "corazones" masculine ;
|
||||
horn_N = regN "cuerno" ;
|
||||
husband_N = regN "marido" ; -- esposo
|
||||
ice_N = regN "hielo" ;
|
||||
knee_N = regN "rodilla" ;
|
||||
leaf_N = regN "hoja" ;
|
||||
leg_N = regN "pierna" ;
|
||||
liver_N = regN "hígado" ;
|
||||
louse_N = regN "piojo" ;
|
||||
mouth_N = regN "boca" ;
|
||||
name_N = regN "nombre" ;
|
||||
neck_N = regN "cuello" ;
|
||||
night_N = femN (regN "noche") ;
|
||||
nose_N = femN (regN "nariz") ;
|
||||
person_N = regN "persona" ;
|
||||
rain_N = regN "lluvia" ;
|
||||
road_N = femN (regN "calle") ; -- camino
|
||||
root_N = femN (regN "raíz") ;
|
||||
rope_N = regN "cuerda" ;
|
||||
salt_N = femN (regN "sal") ;
|
||||
sand_N = regN "arena" ;
|
||||
seed_N = regN "semilla" ;
|
||||
skin_N = femN (regN "piel") ; -- fem
|
||||
sky_N = regN "cielo" ;
|
||||
smoke_N = regN "humo" ;
|
||||
snow_N = femN (regN "nieve") ; -- fem
|
||||
stick_N = mkN "bastón" "bastones" masculine ; -- palo
|
||||
tail_N = regN "cola" ;
|
||||
tongue_N = regN "lengua" ;
|
||||
tooth_N = regN "diente" ;
|
||||
wife_N = regN "esposa" ;
|
||||
wind_N = regN "viento" ;
|
||||
wing_N = regN "ala" ;
|
||||
worm_N = regN "gusano" ; -- lombriz (fem)
|
||||
year_N = regN "año" ;
|
||||
bite_V2 = dirV2 (verboV (morder_50b "morder")) ;
|
||||
blow_V = regV "soplar" ;
|
||||
burn_V = regV "quemar" ;
|
||||
count_V2 = dirV2 (verboV (contar_38b "contar")) ;
|
||||
cut_V2 = dirV2 (regV "cortar") ;
|
||||
dig_V = regV "escarbar" ;
|
||||
fall_V = verboV (caer_20 "caer") ;
|
||||
fear_V2 = dirV2 (regV "temer") ;
|
||||
fight_V2 = dirV2 (regV "pelear") ;
|
||||
float_V = regV "flotar" ;
|
||||
flow_V = verboV (influir_45 "fluir") ; -- circular
|
||||
fly_V = regV "volar" ;
|
||||
freeze_V = regV "congelar" ;
|
||||
give_V3 = dirdirV3 (verboV (dar_27 "dar")) ;
|
||||
hit_V2 = dirV2 (regV "golpear") ;
|
||||
hold_V2 = dirV2 (verboV (tener_4 "tener")) ;
|
||||
hunt_V2 = dirV2 (regV "cazar") ;
|
||||
kill_V2 = dirV2 (regV "matar") ;
|
||||
laugh_V = regV "reir" ; ----V reír_67
|
||||
lie_V = reflV (regV "acostar") ; -- "acostarse"
|
||||
play_V = regV "jugar" ;
|
||||
pull_V2 = dirV2 (regV "tirar") ;
|
||||
push_V2 = dirV2 (regV "empujar") ;
|
||||
rub_V2 = dirV2 (regV "resfregar") ;
|
||||
scratch_V2 = dirV2 (regV "rascar") ;
|
||||
sew_V = regV "coser" ;
|
||||
sing_V = regV "cantar" ;
|
||||
sit_V = reflV (regV "sentar") ;
|
||||
smell_V = verboV (oler_52 "oler") ;
|
||||
spit_V = regV "escupir" ;
|
||||
split_V2 = dirV2 (regV "separar") ; -- dividir,) ;
|
||||
squeeze_V2 = dirV2 (regV "exprimir") ;
|
||||
stab_V2 = dirV2 (regV "apuñalar") ;
|
||||
stand_V = verboV (estar_2 "estar") ; ---- "estar de pie" ;
|
||||
suck_V2 = dirV2 (regV "chupar") ;
|
||||
swell_V = regV "tragar" ;
|
||||
swim_V = regV "nadar" ;
|
||||
think_V = regV "pensar" ;
|
||||
throw_V2 = dirV2 (regV "tirar") ;
|
||||
tie_V2 = dirV2 (regV "atar") ;
|
||||
turn_V = regV "doblar" ;
|
||||
vomit_V = regV "vomitar" ;
|
||||
wash_V2 = dirV2 (regV "lavar") ;
|
||||
wipe_V2 = dirV2 (regV "secar") ;
|
||||
breathe_V = (regV "respirar") ;
|
||||
|
||||
grammar_N = regN "gramática" ;
|
||||
language_N = regN "lengua" ;
|
||||
rule_N = regN "regla" ;
|
||||
|
||||
|
||||
} ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete MathSpa of Math = CategoriesSpa **
|
||||
MathRomance with (SyntaxRomance=SyntaxSpa) ;
|
||||
@@ -1,38 +1,25 @@
|
||||
--# -path=.:../romance:../../prelude
|
||||
--# -path=.:../romance:../common:../../prelude
|
||||
|
||||
--1 A Simple Spanish Resource Morphology
|
||||
--
|
||||
-- Aarne Ranta 2002--2003
|
||||
-- Aarne Ranta 2002 -- 2005
|
||||
--
|
||||
-- This resource morphology contains definitions needed in the resource
|
||||
-- syntax. It moreover contains the most usual inflectional patterns.
|
||||
-- The patterns for verbs contain the complete "Bescherelle" conjugation
|
||||
-- tables.
|
||||
--
|
||||
-- We use the parameter types and word classes defined in $TypesSpa.gf$.
|
||||
-- syntax. To build a lexicon, it is better to use $ParadigmsSpa$, which
|
||||
-- gives a higher-level access to this module.
|
||||
|
||||
resource MorphoSpa = open (Predef=Predef), Prelude, TypesSpa, BeschSpa in {
|
||||
resource MorphoSpa = CommonRomance, ResSpa **
|
||||
open PhonoSpa, Prelude, Predef in {
|
||||
|
||||
--2 Some phonology
|
||||
--
|
||||
--3 Elision
|
||||
--
|
||||
-- The phonological rule of *elision* can be defined as follows in GF.
|
||||
-- In Italian it includes both vowels and the *impure 's'*.
|
||||
flags optimize=all ;
|
||||
|
||||
oper
|
||||
vocale : Strs = strs {
|
||||
"a" ; "e" ; "h" ; "i" ; "o" ; "u"
|
||||
} ;
|
||||
|
||||
elisQue = "que" ; --- no elision in Italian
|
||||
elisDe = "de" ;
|
||||
|
||||
--2 Nouns
|
||||
--
|
||||
-- The following macro is useful for creating the forms of number-dependent
|
||||
-- tables, such as common nouns.
|
||||
|
||||
oper
|
||||
numForms : (_,_ : Str) -> Number => Str = \vino, vini ->
|
||||
table {Sg => vino ; Pl => vini} ;
|
||||
|
||||
@@ -49,18 +36,18 @@ oper
|
||||
|
||||
-- Common nouns are inflected in number and have an inherent gender.
|
||||
|
||||
mkCNom : (Number => Str) -> Gender -> CNom = \mecmecs,gen ->
|
||||
mkNoun : (Number => Str) -> Gender -> Noun = \mecmecs,gen ->
|
||||
{s = mecmecs ; g = gen} ;
|
||||
|
||||
mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs ->
|
||||
mkCNom (numForms mec mecs) ;
|
||||
mkNounIrreg : Str -> Str -> Gender -> Noun = \mec,mecs ->
|
||||
mkNoun (numForms mec mecs) ;
|
||||
|
||||
mkNomReg : Str -> CNom = \mec ->
|
||||
mkNomReg : Str -> Noun = \mec ->
|
||||
case last mec of {
|
||||
"o" | "e" => mkCNom (nomVino mec) Masc ;
|
||||
"a" => mkCNom (nomVino mec) Fem ;
|
||||
"z" => mkCNomIrreg mec (init mec + "ces") Fem ;
|
||||
_ => mkCNom (nomPilar mec) Masc
|
||||
"o" | "e" => mkNoun (nomVino mec) Masc ;
|
||||
"a" => mkNoun (nomVino mec) Fem ;
|
||||
"z" => mkNounIrreg mec (init mec + "ces") Fem ;
|
||||
_ => mkNoun (nomPilar mec) Masc
|
||||
} ;
|
||||
|
||||
--2 Adjectives
|
||||
@@ -105,50 +92,22 @@ oper
|
||||
-- We follow the rule that the atonic nominative is empty.
|
||||
|
||||
mkPronoun : (_,_,_,_,_,_,_,_ : Str) ->
|
||||
PronGen -> Number -> Person -> ClitType -> Pronoun =
|
||||
\il,le,lui,Lui,son,sa,ses,see,g,n,p,c ->
|
||||
Gender -> Number -> Person -> Pronoun =
|
||||
\il,le,lui,Lui,son,sa,ses,see,g,n,p ->
|
||||
{s = table {
|
||||
Ton Nom => il ;
|
||||
Ton x => prepCase x ++ Lui ;
|
||||
Aton Nom => il ; ---- [] ;
|
||||
Aton Nom => strOpt il ; ---- [] ;
|
||||
Aton Acc => le ;
|
||||
---- Aton (CPrep P_de) => "ne" ; --- hmm
|
||||
Aton (CPrep P_a) => lui ;
|
||||
Aton (CPrep q) => strPrep q ++ Lui ; ---- GF bug with c or p!
|
||||
Poss Sg Masc => son ;
|
||||
Poss Sg Fem => sa ;
|
||||
Poss Pl Masc => ses ;
|
||||
Poss Pl Fem => see
|
||||
Aton q => prepCase q ++ Lui ; ---- GF bug with c or p!
|
||||
Poss {n = Sg ; g = Masc} => son ;
|
||||
Poss {n = Sg ; g = Fem} => sa ;
|
||||
Poss {n = Pl ; g = Masc} => ses ;
|
||||
Poss {n = Pl ; g = Fem} => see
|
||||
} ;
|
||||
g = g ;
|
||||
n = n ;
|
||||
p = p ;
|
||||
c = c
|
||||
} ;
|
||||
|
||||
-- used in constructions like "(no) hay ..."
|
||||
|
||||
pronEmpty : Number -> Pronoun = \n -> mkPronoun
|
||||
[]
|
||||
[]
|
||||
[]
|
||||
[]
|
||||
[] [] [] []
|
||||
(PGen Masc)
|
||||
n
|
||||
P3
|
||||
Clit2 ;
|
||||
|
||||
--2 Reflexive pronouns
|
||||
--
|
||||
-- It is simply a function depending on number and person.
|
||||
|
||||
pronRefl : Number -> Person -> Str = \n,p -> case <n,p> of {
|
||||
<Sg,P1> => "me" ;
|
||||
<Sg,P2> => "te" ;
|
||||
<_, P3> => "se" ;
|
||||
<Pl,P1> => "nos" ;
|
||||
<Pl,P2> => "vos"
|
||||
a = {g = g ; n = n ; p = p} ;
|
||||
hasClit = True
|
||||
} ;
|
||||
|
||||
|
||||
@@ -159,53 +118,4 @@ oper
|
||||
|
||||
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ;
|
||||
|
||||
qualPron : Gender -> Number -> Str = pronForms (adjUtil "cuál" "cuales") ;
|
||||
|
||||
talPron : Gender -> Number -> Str = pronForms (adjUtil "tál" "tales") ;
|
||||
|
||||
tuttoPron : Gender -> Number -> Str = pronForms (adjSolo "todo") ;
|
||||
|
||||
--2 Articles
|
||||
--
|
||||
-- The definite article has quite some variation: three parameters and
|
||||
-- elision. This is the simples definition we have been able to find.
|
||||
|
||||
artDefTable : Gender => Number => Case => Str = \\g,n,c => case <g,n,c> of {
|
||||
<Masc,Sg, CPrep P_de> => "del" ;
|
||||
<Masc,Sg, CPrep P_a> => "al" ;
|
||||
<Masc,Sg, _> => prepCase c ++ "el" ;
|
||||
|
||||
<Fem ,Sg, _> => prepCase c ++ "la" ;
|
||||
<Masc,Pl, _> => prepCase c ++ "los" ;
|
||||
<Fem ,Pl, _> => prepCase c ++ "las"
|
||||
} ;
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
--3 The Bescherelle conjugations.
|
||||
--
|
||||
-- The following conjugations tables were generated using FM software
|
||||
-- from a Haskell source.
|
||||
--
|
||||
-- The verb "essere" is often used in syntax.
|
||||
|
||||
verbSer = verbPres (ser_7 "ser") AHabere ;
|
||||
verbHaber = verbPres (haber_10 "haber") AHabere ;
|
||||
|
||||
-- for bw compatibility
|
||||
|
||||
ser_7 : Str -> Verbum = ser_1 ;
|
||||
haber_10 : Str -> Verbum = haber_3 ;
|
||||
|
||||
-- for Numerals
|
||||
|
||||
param DForm = unit | teen | ten | hundred ;
|
||||
param Modif = mod | unmod | conj ;
|
||||
|
||||
oper spl : Str -> {s : Gender => Str ; n : Number} = \s -> {s = \\_ =>
|
||||
s ; n = Pl} ;
|
||||
|
||||
uno : Gender => Str = table {Masc => "uno" ; Fem => "una"} ;
|
||||
yuno : Gender => Str = \\g => "y" ++ uno ! g ;
|
||||
|
||||
}
|
||||
|
||||
2
lib/resource/spanish/NounSpa.gf
Normal file
2
lib/resource/spanish/NounSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete NounSpa of Noun = CatSpa ** NounRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
103
lib/resource/spanish/NumeralSpa.gf
Normal file
103
lib/resource/spanish/NumeralSpa.gf
Normal file
@@ -0,0 +1,103 @@
|
||||
concrete NumeralSpa of Numeral = CatSpa **
|
||||
open CommonRomance, ResRomance, MorphoSpa, Prelude in {
|
||||
|
||||
lincat
|
||||
Digit = {s : DForm => CardOrd => Str} ;
|
||||
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||
Sub100 = {s : CardOrd => Str ; n : Number} ;
|
||||
Sub1000 = {s : CardOrd => Str ; n : Number} ;
|
||||
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
|
||||
|
||||
lin num x = x ;
|
||||
|
||||
lin n2 =
|
||||
mkTal "dos" "doce" "veinte" "doscientos"
|
||||
"segundo" "duodécimo" "vigésimo" "ducentésimo" ;
|
||||
lin n3 =
|
||||
mkTal "tres" "trece" "treinta" "trescientos"
|
||||
"terzero" "decimotercero" "trigésimo" "tricentesimo" ;
|
||||
lin n4 =
|
||||
mkTal "cuatro" "catorce" "cuarenta" "cuatrocientos"
|
||||
"cuarto" "decimocuarto" "cuadragésimo" "cuadringentesimo" ;
|
||||
lin n5 =
|
||||
mkTal "cinco" "quince" "cinquenta" "quinientos"
|
||||
"quinto" "decimoquinto" "quincuagésimo" "guingentésimo" ;
|
||||
lin n6 =
|
||||
mkTal "seis" "dieciséis" "sesenta" "seiscientos"
|
||||
"sexto" "decimosexto" "sexagésimo" "sexcentesimo" ;
|
||||
lin n7 =
|
||||
mkTal "siete" "diecisiéte" "setenta" "setecientos"
|
||||
"séptimo" "decimoséptimo" "septuagésimo" "septingentesimo" ;
|
||||
lin n8 =
|
||||
mkTal "ocho" "dieciocho" "ochenta" "ochocientos"
|
||||
"octavo" "decimoctavo" "octogésimo" "octingentésimo" ;
|
||||
lin n9 =
|
||||
mkTal "nueve" "diecinueve" "noventa" "novecientos"
|
||||
"noveno" "decimonoveno" "nonagésimo" "noningentésimo" ;
|
||||
|
||||
lin pot01 =
|
||||
let uno = (mkTal "uno" "once" "diez" "ciento" "primero" "undécimo"
|
||||
"décimo" "centésimo").s in
|
||||
{s =\\f,g => case <f,g> of {
|
||||
<ental pred,_> => [] ;
|
||||
<ental _, NCard Fem> => "una" ;
|
||||
<hundra False, NCard _> => "cien" ;
|
||||
<hundra True, NCard Fem> => "ciento" ;
|
||||
_ => uno ! f ! g
|
||||
} ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
lin pot0 d = {s = d.s ; n = Pl} ;
|
||||
lin pot110 = spl ((mkTal "diez" [] [] [] "decimo" [] [] []).s ! ental indip) ;
|
||||
lin pot111 = spl ((mkTal "once" [] [] [] "undécimo" [] [] []).s ! ental indip) ;
|
||||
lin pot1to19 d = spl (d.s ! ton) ;
|
||||
lin pot0as1 n = {s = n.s ! ental indip ; n = n.n} ;
|
||||
lin pot1 d = spl (d.s ! tiotal) ;
|
||||
lin pot1plus d e =
|
||||
{s = \\g => d.s ! tiotal ! g ++ y_CardOrd g ++ e.s ! ental indip ! g ; n = Pl} ;
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 d = spl (d.s ! hundra False) ;
|
||||
lin pot2plus d e =
|
||||
{s = \\g => d.s ! hundra True ! g ++ e.s ! g ; n = Pl} ;
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = spl (\\g => n.s ! NCard Masc ++ mil g) ;
|
||||
lin pot3plus n m = {s = \\g => n.s ! NCard Masc ++ mil g ++ m.s ! g ; n = Pl} ;
|
||||
|
||||
oper
|
||||
mkTal : (x1,_,_,_,_,_,_,x8 : Str) -> {s : DForm => CardOrd => Str} =
|
||||
\due,dodici,venti,ducento,secondo,dodicesimo,ventesimo,ducentesimo ->
|
||||
{s = \\d,co => case <d,co> of {
|
||||
<ental _, NCard _> => due ;
|
||||
<ental _, NOrd g n> => pronForms (adjSolo secondo) g n ;
|
||||
<tiotal, NCard _> => venti ;
|
||||
<tiotal, NOrd g n> => regCard ventesimo g n ;
|
||||
<ton, NCard _> => venti ;
|
||||
<ton, NOrd g n> => regCard ventesimo g n ;
|
||||
<hundra _, NCard Masc> => ducento ;
|
||||
<hundra _, NCard Fem> => Predef.tk 2 ducento + "as" ;
|
||||
<hundra _, NOrd g n> => regCard ducentesimo g n
|
||||
}
|
||||
} ;
|
||||
|
||||
regCard : Str -> Gender -> Number -> Str = \ventesimo ->
|
||||
pronForms (adjSolo ventesimo) ;
|
||||
|
||||
spl : (CardOrd => Str) -> {s : CardOrd => Str ; n : Number} = \s -> {
|
||||
s = s ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
mil : CardOrd -> Str = \g ->
|
||||
(mkTal "mil" [] [] [] "milésimo" [] [] []).s ! ental indip ! g ;
|
||||
|
||||
y_CardOrd : CardOrd -> Str = \co -> case co of {
|
||||
NCard _ => "y" ;
|
||||
_ => []
|
||||
} ;
|
||||
|
||||
param
|
||||
DForm = ental Pred | ton | tiotal | hundra Bool ;
|
||||
Pred = pred | indip ;
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete NumeralsSpa of Numerals = open TypesSpa, MorphoSpa in {
|
||||
|
||||
-- by Carlos Gonzalia, Chalmers, 1999
|
||||
-- original source automatically translated to new GF by AR
|
||||
-- modified by addition of gender and number 30/3/2005
|
||||
|
||||
lincat Numeral = {s : Gender => Str ; n : Number} ;
|
||||
lincat Digit = {inh : Modif ; s : {p1 : DForm ; p2 : Modif} => Str} ;
|
||||
lincat Sub10 = {s : {p1 : DForm ; p2 : Modif} => Gender => Str ; n : Number} ;
|
||||
lincat Sub100 = {s : Gender => Str ; n : Number} ;
|
||||
lincat Sub1000 = {s : Gender => Str ; n : Number} ;
|
||||
lincat Sub1000000 = {s : Gender => Str ; n : Number} ;
|
||||
|
||||
lin num x0 = x0 ;
|
||||
|
||||
lin n2 =
|
||||
{inh = mod ; s = table {{p1 = unit ; p2 = mod} => "dos" ; {p1 = unit ; p2 = unmod} => "dos" ; {p1 = unit ; p2 = conj} => "y" ++ "dos" ; {p1 = teen ; p2 = mod} => "doce" ; {p1 = teen ; p2 = unmod} => "doce" ; {p1 = teen ; p2 = conj} => "doce" ; {p1 = ten ; p2 = mod} => "veinti" ; {p1 = ten ; p2 = unmod} => "veinte" ; {p1 = ten ; p2 = conj} => "veinte" ; {p1 = hundred ; p2 = mod} => "doscientos" ; {p1 = hundred ; p2 = unmod} => "doscientos" ; {p1 = hundred ; p2 = conj} => "doscientos"}} ;
|
||||
lin n3 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "tres" ; {p1 = unit ; p2 = unmod} => "tres" ; {p1 = unit ; p2 = conj} => "y" ++ "tres" ; {p1 = teen ; p2 = mod} => "trece" ; {p1 = teen ; p2 = unmod} => "trece" ; {p1 = teen ; p2 = conj} => "trece" ; {p1 = ten ; p2 = mod} => "treinta" ; {p1 = ten ; p2 = unmod} => "treinta" ; {p1 = ten ; p2 = conj} => "treinta" ; {p1 = hundred ; p2 = mod} => "trescientos" ; {p1 = hundred ; p2 = unmod} => "trescientos" ; {p1 = hundred ; p2 = conj} => "trescientos"}} ;
|
||||
lin n4 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cuatro" ; {p1 = unit ; p2 = unmod} => "cuatro" ; {p1 = unit ; p2 = conj} => "y" ++ "cuatro" ; {p1 = teen ; p2 = mod} => "catorce" ; {p1 = teen ; p2 = unmod} => "catorce" ; {p1 = teen ; p2 = conj} => "catorce" ; {p1 = ten ; p2 = mod} => "cuarenta" ; {p1 = ten ; p2 = unmod} => "cuarenta" ; {p1 = ten ; p2 = conj} => "cuarenta" ; {p1 = hundred ; p2 = mod} => "cuatrocientos" ; {p1 = hundred ; p2 = unmod} => "cuatrocientos" ; {p1 = hundred ; p2 = conj} => "cuatrocientos"}} ;
|
||||
lin n5 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "cinco" ; {p1 = unit ; p2 = unmod} => "cinco" ; {p1 = unit ; p2 = conj} => "y" ++ "cinco" ; {p1 = teen ; p2 = mod} => "quince" ; {p1 = teen ; p2 = unmod} => "quince" ; {p1 = teen ; p2 = conj} => "quince" ; {p1 = ten ; p2 = mod} => "cincuenta" ; {p1 = ten ; p2 = unmod} => "cincuenta" ; {p1 = ten ; p2 = conj} => "cincuenta" ; {p1 = hundred ; p2 = mod} => "quinientos" ; {p1 = hundred ; p2 = unmod} => "quinientos" ; {p1 = hundred ; p2 = conj} => "quinientos"}} ;
|
||||
lin n6 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "seis" ; {p1 = unit ; p2 = unmod} => "seis" ; {p1 = unit ; p2 = conj} => "y" ++ "seis" ; {p1 = teen ; p2 = mod} => "dieciseis" ; {p1 = teen ; p2 = unmod} => "dieciseis" ; {p1 = teen ; p2 = conj} => "dieciseis" ; {p1 = ten ; p2 = mod} => "sesenta" ; {p1 = ten ; p2 = unmod} => "sesenta" ; {p1 = ten ; p2 = conj} => "sesenta" ; {p1 = hundred ; p2 = mod} => "seiscientos" ; {p1 = hundred ; p2 = unmod} => "seiscientos" ; {p1 = hundred ; p2 = conj} => "seiscientos"}} ;
|
||||
lin n7 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "siete" ; {p1 = unit ; p2 = unmod} => "siete" ; {p1 = unit ; p2 = conj} => "y" ++ "siete" ; {p1 = teen ; p2 = mod} => "diecisiete" ; {p1 = teen ; p2 = unmod} => "diecisiete" ; {p1 = teen ; p2 = conj} => "diecisiete" ; {p1 = ten ; p2 = mod} => "setenta" ; {p1 = ten ; p2 = unmod} => "setenta" ; {p1 = ten ; p2 = conj} => "setenta" ; {p1 = hundred ; p2 = mod} => "setecientos" ; {p1 = hundred ; p2 = unmod} => "setecientos" ; {p1 = hundred ; p2 = conj} => "setecientos"}} ;
|
||||
lin n8 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "ocho" ; {p1 = unit ; p2 = unmod} => "ocho" ; {p1 = unit ; p2 = conj} => "y" ++ "ocho" ; {p1 = teen ; p2 = mod} => "dieciocho" ; {p1 = teen ; p2 = unmod} => "dieciocho" ; {p1 = teen ; p2 = conj} => "dieciocho" ; {p1 = ten ; p2 = mod} => "ochenta" ; {p1 = ten ; p2 = unmod} => "ochenta" ; {p1 = ten ; p2 = conj} => "ochenta" ; {p1 = hundred ; p2 = mod} => "ochocientos" ; {p1 = hundred ; p2 = unmod} => "ochocientos" ; {p1 = hundred ; p2 = conj} => "ochocientos"}} ;
|
||||
lin n9 =
|
||||
{inh = conj ; s = table {{p1 = unit ; p2 = mod} => "nueve" ; {p1 = unit ; p2 = unmod} => "nueve" ; {p1 = unit ; p2 = conj} => "y" ++ "nueve" ; {p1 = teen ; p2 = mod} => "diecinueve" ; {p1 = teen ; p2 = unmod} => "diecinueve" ; {p1 = teen ; p2 = conj} => "diecinueve" ; {p1 = ten ; p2 = mod} => "noventa" ; {p1 = ten ; p2 = unmod} => "noventa" ; {p1 = ten ; p2 = conj} => "noventa" ; {p1 = hundred ; p2 = mod} => "novecientos" ; {p1 = hundred ; p2 = unmod} => "novecientos" ; {p1 = hundred ; p2 = conj} => "novecientos"}} ;
|
||||
lin pot01 =
|
||||
{s = table {{p1 = unit ; p2 = mod} => uno ; {p1 = unit ; p2 = unmod}
|
||||
=> uno ; {p1 = unit ; p2 = conj} => yuno ; {p1 = teen ; p2 = mod} =>
|
||||
uno ; {p1 = teen ; p2 = unmod} => uno ; {p1 = teen ; p2 = conj} =>
|
||||
yuno ; {p1 = ten ; p2 = mod} => uno ; {p1 = ten ; p2 = unmod} => uno
|
||||
; {p1 = ten ; p2 = conj} => yuno ; {p1 = hundred ; p2 = mod} =>
|
||||
\\_ => "ciento" ; {p1 = hundred ; p2 = unmod} => \\_ => "cien" ; {p1 = hundred ; p2 = conj} => yuno} ; n = Sg} ;
|
||||
lin pot0 d =
|
||||
{s = \\f,g => d.s ! f ; n = Pl} ;
|
||||
lin pot110 =
|
||||
spl "diez" ;
|
||||
lin pot111 =
|
||||
spl "once" ;
|
||||
lin pot1to19 d =
|
||||
spl (d.s ! {p1 = teen ; p2 = unmod}) ;
|
||||
lin pot0as1 n =
|
||||
{s = n.s ! {p1 = unit ; p2 = unmod} ; n = n.n} ;
|
||||
lin pot1 d =
|
||||
spl (d.s ! {p1 = ten ; p2 = unmod}) ;
|
||||
lin pot1plus d e =
|
||||
{s = \\g => (d.s ! {p1 = ten ; p2 = mod}) ++ e.s ! {p1 = unit ; p2 =
|
||||
d.inh} ! g ; n = Pl} ;
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 d =
|
||||
spl (d.s ! {p1 = hundred ; p2 = unmod} ! Masc) ;
|
||||
lin pot2plus d e =
|
||||
{s = \\g => (d.s ! {p1 = hundred ; p2 = mod}) ! Masc ++ e.s ! g ; n = Pl} ;
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n =
|
||||
spl (n.s ! Masc ++ "mil") ;
|
||||
lin pot3plus n m =
|
||||
{s = \\g => n.s ! Masc ++ "mil" ++ m.s ! g ; n = Pl} ;
|
||||
}
|
||||
@@ -1,41 +1,53 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
--# -path=.:../romance:../common:../abstract:../../prelude
|
||||
|
||||
--1 Spanish Lexical Paradigms
|
||||
--
|
||||
-- Aarne Ranta 2005
|
||||
-- Aarne Ranta 2004 - 2006
|
||||
--
|
||||
-- This is an API to the user of the resource grammar
|
||||
-- for adding lexical items. It give shortcuts for forming
|
||||
-- expressions of basic categories: nouns, adjectives, verbs.
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $resource.Abs.gf$.
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoIta.gf$ is that the types
|
||||
-- The main difference with $MorphoSpa.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
-- had the design principle of always having existing forms, not stems, as string
|
||||
-- arguments of the paradigms.
|
||||
-- had the design principle of always having existing forms, rather
|
||||
-- than stems, as string arguments of the paradigms.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
-- The structure of functions for each word class $C$ is the following:
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||
-- escape to construct the most irregular words of type $C$. For
|
||||
-- verbs, there is a fairly complete list of irregular verbs in
|
||||
-- [``IrregSpa`` ../../spanish/IrregSpa.gf].
|
||||
|
||||
resource ParadigmsSpa =
|
||||
open Prelude, (Types = TypesSpa), SyntaxSpa, MorphoSpa, BeschSpa,
|
||||
RulesSpa in {
|
||||
open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
CommonRomance,
|
||||
ResSpa,
|
||||
MorphoSpa,
|
||||
BeschSpa,
|
||||
CatSpa in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Bool : Type ;
|
||||
Gender : Type ;
|
||||
Gender : Type ;
|
||||
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
|
||||
Number : Type ;
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
@@ -43,22 +55,23 @@ oper
|
||||
-- Prepositions used in many-argument functions are either strings
|
||||
-- (including the 'accusative' empty string) or strings that
|
||||
-- amalgamate with the following word (the 'genitive' "de" and the
|
||||
-- 'dative' "à").
|
||||
-- 'dative' "a").
|
||||
|
||||
Preposition : Type ;
|
||||
Prep : Type ;
|
||||
|
||||
accusative : Preposition ;
|
||||
dative : Preposition ;
|
||||
genitive : Preposition ;
|
||||
accusative : Prep ;
|
||||
genitive : Prep ;
|
||||
dative : Prep ;
|
||||
|
||||
mkPrep : Str -> Prep ;
|
||||
|
||||
mkPreposition : Str -> Preposition ;
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: two forms (singular + plural),
|
||||
-- and the gender.
|
||||
|
||||
mkN : (_,_ : Str) -> Gender -> N ; -- uomo, uomini, masculine
|
||||
mkN : (_,_ : Str) -> Gender -> N ; -- bastón, bastones, masculine
|
||||
|
||||
-- The regular function takes the singular form and the gender,
|
||||
-- and computes the plural and the gender by a heuristic.
|
||||
@@ -78,7 +91,7 @@ oper
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- Some nouns are ones where the first part is inflected as a noun but
|
||||
-- the second part is not inflected. e.g. "numéro de téléphone".
|
||||
-- the second part is not inflected. e.g. "número de teléfono".
|
||||
-- They could be formed in syntax, but we give a shortcut here since
|
||||
-- they are frequent in lexica.
|
||||
|
||||
@@ -89,7 +102,7 @@ oper
|
||||
--
|
||||
-- Relational nouns ("fille de x") need a case and a preposition.
|
||||
|
||||
mkN2 : N -> Preposition -> N2 ;
|
||||
mkN2 : N -> Prep -> N2 ;
|
||||
|
||||
-- The most common cases are the genitive "de" and the dative "a",
|
||||
-- with the empty preposition.
|
||||
@@ -99,7 +112,7 @@ oper
|
||||
|
||||
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
|
||||
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
mkN3 : N -> Prep -> Prep -> N3 ;
|
||||
|
||||
|
||||
--3 Relational common noun phrases
|
||||
@@ -114,7 +127,9 @@ oper
|
||||
--
|
||||
-- Proper names need a string and a gender.
|
||||
|
||||
mkPN : Str -> Gender -> PN ; -- Jean
|
||||
mkPN : Str -> Gender -> PN ; -- Juan
|
||||
regPN : Str -> PN ; -- feminine for "-a", otherwise masculine
|
||||
|
||||
|
||||
-- To form a noun phrase that can also be plural,
|
||||
-- you can use the worst-case function.
|
||||
@@ -126,7 +141,7 @@ oper
|
||||
-- Non-comparison one-place adjectives need five forms in the worst
|
||||
-- case (masc and fem singular, masc plural, adverbial).
|
||||
|
||||
mkA : (solo,sola,soli,sole, solamente : Str) -> A ;
|
||||
mkA : (solo,sola,solos,solas, solamiento : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, all other forms are derived from the
|
||||
-- masculine singular. The types of adjectives that are recognized are
|
||||
@@ -136,7 +151,7 @@ oper
|
||||
|
||||
-- These functions create postfix adjectives. To switch
|
||||
-- them to prefix ones (i.e. ones placed before the noun in
|
||||
-- modification, as in "petite maison"), the following function is
|
||||
-- modification, as in "bueno vino"), the following function is
|
||||
-- provided.
|
||||
|
||||
prefA : A -> A ;
|
||||
@@ -145,33 +160,25 @@ oper
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
mkA2 : A -> Prep -> A2 ;
|
||||
|
||||
--3 Comparison adjectives
|
||||
|
||||
-- Comparison adjectives are in the worst case put up from two
|
||||
-- adjectives: the positive ("bueno"), and the comparative ("mejor").
|
||||
|
||||
mkADeg : A -> A -> ADeg ;
|
||||
mkADeg : A -> A -> A ;
|
||||
|
||||
-- If comparison is formed by "mas", as usual in Spanish,
|
||||
-- the following pattern is used:
|
||||
|
||||
compADeg : A -> ADeg ;
|
||||
compADeg : A -> A ;
|
||||
|
||||
-- The regular pattern is the same as $regA$ for plain adjectives,
|
||||
-- with comparison by "mas".
|
||||
|
||||
regADeg : Str -> ADeg ;
|
||||
regADeg : Str -> A ;
|
||||
|
||||
-- From a given $ADeg$, it is possible to get back to $A$.
|
||||
|
||||
adegA : ADeg -> A ;
|
||||
|
||||
-- For prefixed adjectives, the following function is
|
||||
-- provided.
|
||||
|
||||
prefADeg : ADeg -> ADeg ;
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
@@ -204,6 +211,10 @@ oper
|
||||
|
||||
verboV : Verbum -> V ;
|
||||
|
||||
-- To form reflexive verbs:
|
||||
|
||||
reflV : V -> V ;
|
||||
|
||||
-- Verbs with a deviant passive participle: just give the participle
|
||||
-- in masculine singular form as second argument.
|
||||
|
||||
@@ -214,7 +225,7 @@ oper
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
|
||||
mkV2 : V -> Preposition -> V2 ;
|
||||
mkV2 : V -> Prep -> V2 ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
@@ -227,9 +238,9 @@ oper
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- parler, à, de
|
||||
dirV3 : V -> Preposition -> V3 ; -- donner,_,à
|
||||
dirdirV3 : V -> V3 ; -- donner,_,_
|
||||
mkV3 : V -> Prep -> Prep -> V3 ; -- hablar, a, di
|
||||
dirV3 : V -> Prep -> V3 ; -- dar,(accusative),a
|
||||
dirdirV3 : V -> V3 ; -- dar,(dative),(accusative)
|
||||
|
||||
--3 Other complement patterns
|
||||
--
|
||||
@@ -238,73 +249,86 @@ oper
|
||||
|
||||
mkV0 : V -> V0 ;
|
||||
mkVS : V -> VS ;
|
||||
mkV2S : V -> Preposition -> V2S ;
|
||||
mkVV : V -> VV ; -- plain infinitive: "je veux parler"
|
||||
deVV : V -> VV ; -- "j'essaie de parler"
|
||||
aVV : V -> VV ; -- "j'arrive à parler"
|
||||
mkV2V : V -> Preposition -> Preposition -> V2V ;
|
||||
mkV2S : V -> Prep -> V2S ;
|
||||
mkVV : V -> VV ; -- plain infinitive: "quiero hablar"
|
||||
deVV : V -> VV ; -- "terminar de hablar"
|
||||
aVV : V -> VV ; -- "aprender a hablar"
|
||||
mkV2V : V -> Prep -> Prep -> V2V ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Preposition -> V2A ;
|
||||
mkV2A : V -> Prep -> Prep -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2Q : V -> Preposition -> V2Q ;
|
||||
mkV2Q : V -> Prep -> V2Q ;
|
||||
|
||||
mkAS : A -> AS ;
|
||||
subjAS : A -> AS ;
|
||||
mkA2S : A -> Preposition -> A2S ;
|
||||
mkAV : A -> Preposition -> AV ;
|
||||
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||
mkAS : A -> AS ;
|
||||
mkA2S : A -> Prep -> A2S ;
|
||||
mkAV : A -> Prep -> AV ;
|
||||
mkA2V : A -> Prep -> Prep -> A2V ;
|
||||
|
||||
-- Notice: categories $V2S, V2V, V2Q$ are in v 1.0 treated
|
||||
-- just as synonyms of $V2$, and the second argument is given
|
||||
-- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
|
||||
-- $V0$ is just $V$.
|
||||
|
||||
V0, V2S, V2V, V2Q : Type ;
|
||||
AS, A2S, AV, A2V : Type ;
|
||||
|
||||
|
||||
--2 Definitions of the paradigms
|
||||
--.
|
||||
--2 The definitions of the paradigms
|
||||
--
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
|
||||
Bool = Prelude.Bool ;
|
||||
Gender = SyntaxSpa.Gender ;
|
||||
Preposition = SyntaxSpa.Case * Str ;
|
||||
Number = SyntaxSpa.Number ;
|
||||
|
||||
Gender = MorphoSpa.Gender ;
|
||||
Number = MorphoSpa.Number ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
feminine = Fem ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
|
||||
accusative = <Types.accusative,[]> ;
|
||||
genitive = <Types.genitive,[]> ;
|
||||
dative = <Types.dative,[]> ;
|
||||
mkPreposition p = <Acc,p> ;
|
||||
Prep = Compl ;
|
||||
accusative = complAcc ;
|
||||
genitive = complGen ;
|
||||
dative = complDat ;
|
||||
mkPrep p = {s = p ; c = Acc ; isDir = False} ;
|
||||
|
||||
singular = Types.singular ;
|
||||
plural = Types.plural ;
|
||||
|
||||
mkN x y g = mkCNomIrreg x y g ** {lock_N = <>} ;
|
||||
mkN x y g = mkNounIrreg x y g ** {lock_N = <>} ;
|
||||
regN x = mkNomReg x ** {lock_N = <>} ;
|
||||
compN x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
|
||||
femN x = {s = x.s ; g = feminine ; lock_N = <>} ;
|
||||
mascN x = {s = x.s ; g = masculine ; lock_N = <>} ;
|
||||
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; c = p.p1 ; s2 = p.p2} ;
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
|
||||
deN2 n = mkN2 n genitive ;
|
||||
aN2 n = mkN2 n dative ;
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c = p.p1 ; s2 = p.p2 ; c3 = q.p1 ; s3 = q.p2} ;
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
|
||||
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||
mkNP x g n = let np = mkNameNounPhrase x g in
|
||||
{s = np.s ; g = np.g ; p = np.p ; c = np.c ; n = n ; lock_NP = <>} ;
|
||||
regPN x = mkPN x g where {
|
||||
g = case last x of {
|
||||
"a" => feminine ;
|
||||
_ => masculine
|
||||
}
|
||||
} ;
|
||||
|
||||
mkA a b c d e = mkAdj a b c d e ** {p = False ; lock_A = <>} ;
|
||||
regA a = mkAdjReg a ** {p = False ; lock_A = <>} ;
|
||||
prefA a = {s = a.s ; p = True ; lock_A = <>} ;
|
||||
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
|
||||
mkA a b c d e =
|
||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ;
|
||||
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
|
||||
|
||||
mkADeg a b = {s = table {Pos => a.s ; _ => b.s} ; p = a.p ; lock_ADeg = <>} ;
|
||||
compADeg a = {s = table {Pos => a.s ; _ => \\f => "mas" ++ a.s ! f} ; p = a.p ;
|
||||
lock_ADeg = <>} ;
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
|
||||
mkADeg a b =
|
||||
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
|
||||
isPre = a.isPre ; lock_A = <>} ;
|
||||
compADeg a =
|
||||
{s = table {Posit => a.s ! Posit ; _ => \\f => "más" ++ a.s ! Posit ! f} ;
|
||||
isPre = a.isPre ;
|
||||
lock_A = <>} ;
|
||||
regADeg a = compADeg (regA a) ;
|
||||
prefADeg a = {s = a.s ; p = True ; lock_ADeg = <>} ;
|
||||
|
||||
adegA a = {s = a.s ! Pos ; p = a.p ; lock_A = <>} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
@@ -326,9 +350,13 @@ oper
|
||||
_ => cortar_5 x
|
||||
}
|
||||
}
|
||||
in verbPres verb AHabere ** {lock_V = <>} ;
|
||||
in verbBesch verb ** {vtyp = VHabere ; lock_V = <>} ;
|
||||
|
||||
verboV ve = verbPres ve AHabere ** {lock_V = <>} ;
|
||||
reflV v = {s = v.s ; vtyp = VRefl ; lock_V = <>} ;
|
||||
|
||||
verboV ve = verbBesch ve ** {vtyp = VHabere ; lock_V = <>} ;
|
||||
|
||||
reflVerboV : Verbum -> V = \ve -> reflV (verboV ve) ;
|
||||
|
||||
special_ppV ve pa = {
|
||||
s = table {
|
||||
@@ -336,32 +364,37 @@ oper
|
||||
p => ve.s ! p
|
||||
} ;
|
||||
lock_V = <> ;
|
||||
aux = AHabere
|
||||
vtyp = VHabere
|
||||
} ;
|
||||
|
||||
mkV2 v p = {s = v.s ; aux = v.aux ; s2 = p.p2 ; c = p.p1 ; lock_V2 = <>} ;
|
||||
mkV2 v p = {s = v.s ; vtyp = v.vtyp ; c2 = p ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v accusative ;
|
||||
v2V v = v ** {lock_V = <>} ;
|
||||
|
||||
mkV3 v p q = {s = v.s ; aux = v.aux ;
|
||||
s2 = p.p2 ; s3 = q.p2 ; c = p.p1 ; c3 = q.p1 ; lock_V3 = <>} ;
|
||||
mkV3 v p q = {s = v.s ; vtyp = v.vtyp ;
|
||||
c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v accusative p ;
|
||||
dirdirV3 v = dirV3 v dative ;
|
||||
|
||||
V0 : Type = V ;
|
||||
V2S, V2V, V2Q : Type = V2 ;
|
||||
AS, AV : Type = A ;
|
||||
A2S, A2V : Type = A2 ;
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {mn,mp = Ind ; lock_VS = <>} ; ---- more moods
|
||||
mkV2S v p = mkV2 v p ** {mn,mp = Ind ; lock_V2S = <>} ;
|
||||
mkVV v = v ** {c = accusative.p1 ; lock_VV = <>} ;
|
||||
deVV v = v ** {c = genitive.p1 ; lock_VV = <>} ;
|
||||
aVV v = v ** {c = dative.p1 ; lock_VV = <>} ;
|
||||
mkVS v = v ** {m = \\_ => Indic ; lock_VS = <>} ; ---- more moods
|
||||
mkV2S v p = mkV2 v p ** {mn,mp = Indic ; lock_V2S = <>} ;
|
||||
mkVV v = v ** {c2 = complAcc ; lock_VV = <>} ;
|
||||
deVV v = v ** {c2 = complGen ; lock_VV = <>} ;
|
||||
aVV v = v ** {c2 = complDat ; lock_VV = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {c3 = t.p1 ; s3 = p.p2 ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkV2A v p q = mkV3 v p q ** {lock_V2A = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
|
||||
|
||||
mkAS v = v ** {mn,mp = Ind ; lock_AS = <>} ; ---- more moods
|
||||
mkA2S v p = mkA2 v p ** {mn,mp = Ind ; lock_A2S = <>} ;
|
||||
mkAS v = v ** {lock_AS = <>} ; ---- more moods
|
||||
mkA2S v p = mkA2 v p ** {lock_A2S = <>} ;
|
||||
mkAV v p = v ** {c = p.p1 ; s2 = p.p2 ; lock_AV = <>} ;
|
||||
mkA2V v p q = mkA2 v p ** {s3 = q.p2 ; c3 = q.p1 ; lock_A2V = <>} ;
|
||||
|
||||
|
||||
14
lib/resource/spanish/PhonoSpa.gf
Normal file
14
lib/resource/spanish/PhonoSpa.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
resource PhonoSpa = open Prelude in {
|
||||
|
||||
--3 Elision
|
||||
--
|
||||
-- The phonological rule of *elision* can be defined as follows in GF.
|
||||
-- In Spanish it includes both vowels and 'h'.
|
||||
|
||||
oper
|
||||
vocale : Strs = strs {
|
||||
"a" ; "e" ; "h" ; "i" ; "o" ; "u"
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
2
lib/resource/spanish/PhraseSpa.gf
Normal file
2
lib/resource/spanish/PhraseSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete PhraseSpa of Phrase = CatSpa ** PhraseRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
2
lib/resource/spanish/QuestionSpa.gf
Normal file
2
lib/resource/spanish/QuestionSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete QuestionSpa of Question = CatSpa ** QuestionRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
2
lib/resource/spanish/RelativeSpa.gf
Normal file
2
lib/resource/spanish/RelativeSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete RelativeSpa of Relative = CatSpa ** RelativeRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
13
lib/resource/spanish/ResSpa.gf
Normal file
13
lib/resource/spanish/ResSpa.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
--1 Spanish auxiliary operations.
|
||||
--
|
||||
---- This module contains operations that are needed to make the
|
||||
---- resource syntax work. To define everything that is needed to
|
||||
---- implement $Test$, it moreover contains regular lexical
|
||||
---- patterns needed for $Lex$.
|
||||
--
|
||||
|
||||
instance ResSpa of ResRomance = DiffSpa ** open CommonRomance, Prelude in {
|
||||
|
||||
flags optimize=noexpand ;
|
||||
|
||||
} ;
|
||||
@@ -1,3 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete ResourceSpa of Resource = RulesSpa, ClauseSpa, StructuralSpa ** {} ;
|
||||
@@ -1,4 +0,0 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
|
||||
concrete RulesSpa of Rules = CategoriesSpa **
|
||||
RulesRomance with (SyntaxRomance=SyntaxSpa) ;
|
||||
2
lib/resource/spanish/SentenceSpa.gf
Normal file
2
lib/resource/spanish/SentenceSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete SentenceSpa of Sentence = CatSpa ** SentenceRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
7
lib/resource/spanish/Spanish.gf
Normal file
7
lib/resource/spanish/Spanish.gf
Normal file
@@ -0,0 +1,7 @@
|
||||
--# -path=.:../romance:../abstract:../common:prelude
|
||||
|
||||
concrete Spanish of SpanishAbs =
|
||||
LangSpa,
|
||||
IrregSpa,
|
||||
ExtraSpa
|
||||
** {} ;
|
||||
5
lib/resource/spanish/SpanishAbs.gf
Normal file
5
lib/resource/spanish/SpanishAbs.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
abstract SpanishAbs =
|
||||
Lang,
|
||||
IrregSpaAbs,
|
||||
ExtraSpaAbs
|
||||
** {} ;
|
||||
@@ -1,95 +1,159 @@
|
||||
--# -path=.:../romance:../abstract:../../prelude
|
||||
concrete StructuralSpa of Structural = CatSpa **
|
||||
open PhonoSpa, MorphoSpa, ParadigmsSpa, BeschSpa, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
concrete StructuralSpa of Structural = CategoriesSpa, NumeralsSpa **
|
||||
open SyntaxSpa, MorphoSpa, BeschSpa, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
UseNumeral n = {s = \\g => n.s !g ; n = n.n ; isNo = False} ;
|
||||
|
||||
above_Prep = justPrep "sobre" ;
|
||||
after_Prep = {s = "después" ; c = genitive} ;
|
||||
all8mass_Det = mkDeterminer singular "todo" "toda" ;
|
||||
all_NDet = mkDeterminerNum ["todos los"] ["todas las"] ;
|
||||
almost_Adv = ss "casi" ;
|
||||
although_Subj = ss "benché" ** {m = Con} ;
|
||||
above_Prep = mkPrep "sobre" ;
|
||||
after_Prep = {s = ["despues"] ; c = MorphoSpa.genitive ; isDir = False} ;
|
||||
all_Predet = {
|
||||
s = \\a,c => prepCase c ++ aagrForms "todo" "toda" "todos" "todas" ! a ;
|
||||
c = Nom
|
||||
} ;
|
||||
almost_AdA, almost_AdN = ss "casi" ;
|
||||
always_AdV = ss "siempre" ;
|
||||
although_Subj = ss "benché" ** {m = Conjunct} ;
|
||||
and_Conj = etConj ;
|
||||
because_Subj = ss "porque" ** {m = Ind} ;
|
||||
before_Prep = {s = "antes" ; c = genitive} ;
|
||||
behind_Prep = {s = "detrás" ; c = genitive} ;
|
||||
between_Prep = justPrep "entre" ;
|
||||
both_AndConjD = etetConj ;
|
||||
by8agent_Prep = justPrep "por" ;
|
||||
by8means_Prep = justPrep "por" ;
|
||||
can8know_VV = mkVerbVerbDir (verbPres (saber_71 "saber") AHabere) ;
|
||||
can_VV = mkVerbVerbDir (verbPres (poder_58 "poder") AHabere) ; ----
|
||||
during_Prep = justPrep "durante" ; ----
|
||||
either8or_ConjD = ououConj ;
|
||||
everybody_NP = normalNounPhrase (\\c => prepCase c ++ "todos") Masc Pl ;
|
||||
every_Det = chaqueDet ;
|
||||
everything_NP = mkNameNounPhrase ["todo"] Masc ;
|
||||
because_Subj = ss "porque" ** {m = Indic} ;
|
||||
before_Prep = {s = "antes" ; c = MorphoSpa.genitive ; isDir = False} ;
|
||||
behind_Prep = {s = "detrás" ; c = MorphoSpa.genitive ; isDir = False} ;
|
||||
between_Prep = mkPrep "entre" ;
|
||||
both7and_DConj = {s1,s2 = etConj.s ; n = Pl} ;
|
||||
but_PConj = ss "pero" ;
|
||||
by8agent_Prep = mkPrep "por" ;
|
||||
by8means_Prep = mkPrep "por" ;
|
||||
can8know_VV = mkVV (verboV (saber_71 "saber")) ;
|
||||
can_VV = mkVV (verboV (poder_58 "poder")) ;
|
||||
during_Prep = mkPrep "durante" ; ----
|
||||
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
|
||||
everybody_NP = mkNP ["todos"] Masc Pl ;
|
||||
every_Det = {s = \\_,_ => "cada" ; n = Sg} ;
|
||||
everything_NP = pn2np (mkPN ["todo"] Masc) ;
|
||||
everywhere_Adv = ss ["en todas partes"] ;
|
||||
from_Prep = justCase (CPrep P_de) ;
|
||||
he_NP = pronNounPhrase pronIl ;
|
||||
how8many_IDet = mkDeterminer plural "cuántos" "cuántas" ;
|
||||
how_IAdv = commentAdv ;
|
||||
if_Subj = siSubj ;
|
||||
in8front_Prep = {s = "delante" ; c = genitive} ;
|
||||
i_NP = pronNounPhrase pronJe ;
|
||||
in_Prep = justPrep "en" ;
|
||||
it_NP = pronNounPhrase pronIl ;
|
||||
many_Det = mkDeterminer plural "muchos" "muchas" ;
|
||||
most8many_Det = plupartDet ;
|
||||
most_Det = mkDeterminer1 singular (["la mayor parte"] ++ elisDe) ; --- de
|
||||
much_Det = mkDeterminer1 singular "mucho" ;
|
||||
must_VV = mkVerbVerbDir (verbPres (deber_6 "deber") AHabere) ; ----
|
||||
no_Phr = nonPhr ;
|
||||
on_Prep = justPrep "sobre" ; ----
|
||||
or_Conj = ouConj ;
|
||||
otherwise_Adv = ss "otramente" ;
|
||||
part_Prep = justCase genitive ; ---
|
||||
possess_Prep = justCase genitive ;
|
||||
few_Det = {s = \\g,c => prepCase c ++ genForms "pocos" "pocas" ! g ; n = Pl} ;
|
||||
first_Ord = {s = \\ag => (regA "primero").s ! Posit ! AF ag.g ag.n} ;
|
||||
from_Prep = complGen ; ---
|
||||
he_Pron =
|
||||
mkPronoun
|
||||
"el" "lo" "le" "él"
|
||||
"su" "su" "sus" "sus"
|
||||
Masc Sg P3 ;
|
||||
here_Adv = mkAdv "aquí" ; -- acá
|
||||
here7to_Adv = mkAdv ["para acá"] ;
|
||||
here7from_Adv = mkAdv ["de acá"] ;
|
||||
how_IAdv = ss "como" ;
|
||||
how8many_IDet =
|
||||
{s = \\g,c => prepCase c ++ genForms "cuantos" "cuantas" ! g ; n = Pl} ;
|
||||
if_Subj = ss "si" ** {m = Indic} ;
|
||||
in8front_Prep = {s = "delante" ; c = MorphoSpa.genitive ; isDir = False} ;
|
||||
i_Pron =
|
||||
mkPronoun
|
||||
"yo" "me" "me" "mí"
|
||||
"mi" "mi" "mis" "mis"
|
||||
Masc Sg P1 ;
|
||||
in_Prep = mkPrep "en" ;
|
||||
it_Pron =
|
||||
mkPronoun
|
||||
"el" "lo" "le" "él"
|
||||
"su" "su" "sus" "sus"
|
||||
Masc Sg P3 ;
|
||||
less_CAdv = ss "meno" ; ----
|
||||
many_Det = {s = \\g,c => prepCase c ++ genForms "muchos" "muchas" ! g ; n = Pl} ;
|
||||
more_CAdv = ss "mas" ;
|
||||
most_Predet = {s = \\_,c => prepCase c ++ ["la mayor parte"] ; c = CPrep P_de} ;
|
||||
much_Det = {s = \\g,c => prepCase c ++ genForms "mucho" "mucha" ! g ; n = Sg} ;
|
||||
must_VV = mkVV (verboV (deber_6 "deber")) ;
|
||||
no_Phr = ss "no" ;
|
||||
on_Prep = mkPrep "sobre" ;
|
||||
one_Quant = {s = \\g,c => prepCase c ++ genForms "uno" "una" ! g} ;
|
||||
only_Predet = {s = \\_,c => prepCase c ++ "solamente" ; c = Nom} ;
|
||||
or_Conj = {s = "o" ; n = Sg} ;
|
||||
otherwise_PConj = ss "otramente" ;
|
||||
part_Prep = complGen ;
|
||||
please_Voc = ss ["por favor"] ;
|
||||
possess_Prep = complGen ;
|
||||
quite_Adv = ss "bastante" ;
|
||||
she_NP = pronNounPhrase pronElle ;
|
||||
so_Adv = ss "tanto" ; ----
|
||||
somebody_NP = mkNameNounPhrase ["algún"] Masc ;
|
||||
some_Det = mkDeterminer singular "algun" "alguna" ;
|
||||
some_NDet = mkDeterminerNum "algunos" "algunas" ;
|
||||
something_NP = mkNameNounPhrase ["algo"] Masc ;
|
||||
she_Pron =
|
||||
mkPronoun
|
||||
"ella" "la" "le" "ella"
|
||||
"su" "su" "sus" "sus"
|
||||
Fem Sg P3 ;
|
||||
so_AdA = ss "tanto" ;
|
||||
somebody_NP = pn2np (mkPN ["algún"] Masc) ;
|
||||
somePl_Det = {s = \\g,c => prepCase c ++ genForms "algunos" "algunas" ! g ; n = Pl} ;
|
||||
someSg_Det = {s = \\g,c => prepCase c ++ "algun" ; n = Sg} ;
|
||||
something_NP = pn2np (mkPN ["algo"] Masc) ;
|
||||
somewhere_Adv = ss ["en ninguna parte"] ;
|
||||
that_Det = mkDeterminer singular "ese" "esa" ;
|
||||
that_NP = mkNameNounPhrase ["eso"] Masc ;
|
||||
therefore_Adv = ss ["por eso"] ;
|
||||
these_NDet = mkDeterminerNum "estos" "estas" ;
|
||||
they8fem_NP = pronNounPhrase pronElles ;
|
||||
they_NP = pronNounPhrase pronIls ;
|
||||
this_Det = mkDeterminer singular "este" "esta" ;
|
||||
this_NP = mkNameNounPhrase ["esto"] Masc ;
|
||||
those_NDet = mkDeterminerNum "esos" "esas" ;
|
||||
thou_NP = pronNounPhrase pronTu ;
|
||||
through_Prep = justPrep "por" ;
|
||||
too_Adv = ss "demasiado" ;
|
||||
to_Prep = justCase dative ; ---
|
||||
under_Prep = justPrep "bajo" ;
|
||||
very_Adv = ss "muy" ;
|
||||
want_VV = mkVerbVerbDir (verbPres (querer_64 "querer") AHabere) ; ----
|
||||
we_NP = pronNounPhrase pronNous ;
|
||||
what8one_IP = intPronWhat singular ;
|
||||
what8many_IP = intPronWhat plural ;
|
||||
when_IAdv = quandAdv ;
|
||||
when_Subj = quandSubj ;
|
||||
where_IAdv = ouAdv ;
|
||||
which8many_IDet = mkDeterminerNum "cuales" "cuales" ** {n = Pl} ;
|
||||
which8one_IDet = quelDet ;
|
||||
who8one_IP = intPronWho singular ;
|
||||
who8many_IP = intPronWho plural ;
|
||||
why_IAdv = pourquoiAdv ;
|
||||
without_Prep = justPrep "sin" ;
|
||||
with_Prep = justPrep "con" ;
|
||||
ye_NP = pronNounPhrase pronVous ;
|
||||
yes_Phr = ouiPhr ;
|
||||
you_NP = pronNounPhrase pronVous ;
|
||||
that_Quant = {
|
||||
s = \\_ => table {
|
||||
Sg => \\g,c => prepCase c ++ genForms "ese" "esa" ! g ;
|
||||
Pl => \\g,c => prepCase c ++ genForms "esos" "esas" ! g
|
||||
}
|
||||
} ;
|
||||
that_NP = mkNP ["eso"] Masc Sg ;
|
||||
there_Adv = mkAdv "allí" ; -- allá
|
||||
there7to_Adv = mkAdv ["para allá"] ;
|
||||
there7from_Adv = mkAdv ["de allá"] ;
|
||||
therefore_PConj = ss ["por eso"] ;
|
||||
these_NP = mkNP ["estos"] Masc Pl ;
|
||||
they_Pron = mkPronoun
|
||||
"ellos" "los" "les" "ellos"
|
||||
"su" "su" "sus" "sus"
|
||||
Masc Pl P3 ;
|
||||
this_Quant = {
|
||||
s = \\_ => table {
|
||||
Sg => \\g,c => prepCase c ++ genForms "este" "esta" ! g ;
|
||||
Pl => \\g,c => prepCase c ++ genForms "estos" "estas" ! g
|
||||
}
|
||||
} ;
|
||||
this_NP = pn2np (mkPN ["esto"] Masc) ;
|
||||
those_NP = mkNP ["esos"] Masc Pl ;
|
||||
through_Prep = mkPrep "por" ;
|
||||
too_AdA = ss "demasiado" ;
|
||||
to_Prep = complDat ;
|
||||
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 ;
|
||||
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 "cuando" ;
|
||||
when_Subj = ss "cuando" ** {m = Indic} ;
|
||||
where_IAdv = ss "donde" ;
|
||||
whichSg_IDet = {s = \\g,c => prepCase c ++ "cuale" ; n = Sg} ;
|
||||
whichPl_IDet = {s = \\g,c => prepCase c ++ "cuales" ; n = Pl} ;
|
||||
whoPl_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Masc Pl} ;
|
||||
whoSg_IP = {s = \\c => prepCase c ++ "quién" ; a = aagr Masc Sg} ;
|
||||
why_IAdv = ss "porqué" ;
|
||||
without_Prep = mkPrep "sin" ;
|
||||
with_Prep = mkPrep "con" ;
|
||||
yes_Phr = ss "sí" ;
|
||||
youSg_Pron = mkPronoun
|
||||
"tu" "te" "te" "tí"
|
||||
"tu" "tu" "tus" "tus"
|
||||
Masc Sg P2 ;
|
||||
youPl_Pron =
|
||||
mkPronoun
|
||||
"vosotros" "vos" "vos" "vosotros"
|
||||
"vuestro" "vuestra" "vuestros" "vuestras"
|
||||
Masc Pl P2 ;
|
||||
youPol_Pron =
|
||||
mkPronoun
|
||||
"usted" "la" "le" "usted"
|
||||
"su" "su" "sus" "sus"
|
||||
Masc Pl P2 ;
|
||||
|
||||
oper
|
||||
etConj : {s : Str ; n : Number} = {s = pre {
|
||||
"y" ;
|
||||
"y" / strs {"ya" ; "ye" ; "yo" ; "yu"} ;
|
||||
"e" / strs {"i" ; "hi" ; "y"}
|
||||
}} ** {n = Pl} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
--# -path=.:../abstract:../../prelude:../romance
|
||||
|
||||
concrete SwadeshLexSpa of SwadeshLex = CategoriesSpa
|
||||
** open StructuralSpa, RulesSpa, SyntaxSpa, ParadigmsSpa,
|
||||
BasicSpa, BeschSpa, Prelude in {
|
||||
|
||||
-- words contributed by Ana Bove, May 2005
|
||||
|
||||
lin
|
||||
|
||||
-- Pronouns
|
||||
|
||||
i_NP = i_NP ;
|
||||
thou_NP = thou_NP ;
|
||||
he_NP = he_NP ;
|
||||
we_NP = we_NP ;
|
||||
you_NP = you_NP ;
|
||||
they_NP = they_NP ;
|
||||
who8many_IP = who8many_IP ;
|
||||
who8one_IP = who8one_IP ;
|
||||
what8many_IP = what8many_IP ;
|
||||
what8one_IP = what8one_IP ;
|
||||
|
||||
-- Determiners
|
||||
|
||||
this_Det = this_Det ;
|
||||
that_Det = that_Det ;
|
||||
all_NDet = all_NDet ;
|
||||
many_Det = many_Det ;
|
||||
some_Det = some_Det ;
|
||||
few_Det = mkDeterminer Pl "pocos" "pocas" ;
|
||||
other_Det = mkDeterminer Pl "otros" "otras" ;
|
||||
|
||||
|
||||
-- Adverbs
|
||||
|
||||
here_Adv = here_Adv;
|
||||
there_Adv = there_Adv;
|
||||
where_IAdv = where_IAdv;
|
||||
when_IAdv = when_IAdv;
|
||||
how_IAdv = how_IAdv;
|
||||
|
||||
-- not : Adv ; -- ?
|
||||
|
||||
-- Conjunctions
|
||||
|
||||
and_Conj = and_Conj ;
|
||||
|
||||
-- Prepositions
|
||||
|
||||
at_Prep = justCase dative.p1 ;
|
||||
in_Prep = StructuralSpa.in_Prep ;
|
||||
with_Prep = StructuralSpa.with_Prep ;
|
||||
|
||||
-- Numerals
|
||||
|
||||
one_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))) ;
|
||||
two_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))) ;
|
||||
three_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) ;
|
||||
four_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n4))))) ;
|
||||
five_Num = UseNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n5))))) ;
|
||||
|
||||
|
||||
-- Adjectives
|
||||
|
||||
bad_ADeg = bad_ADeg ;
|
||||
big_ADeg = big_ADeg ;
|
||||
black_ADeg = black_ADeg ;
|
||||
cold_ADeg = cold_ADeg ;
|
||||
correct_ADeg = regADeg "correcto" ;
|
||||
dirty_ADeg = dirty_ADeg ;
|
||||
dry_ADeg = regADeg "seco" ;
|
||||
dull_ADeg = regADeg "desafilado" ;
|
||||
far_ADeg = regADeg "lejos" ; ----?
|
||||
full_ADeg = regADeg "lleno" ;
|
||||
good_ADeg = good_ADeg ;
|
||||
green_ADeg = green_ADeg ;
|
||||
heavy_ADeg = regADeg "pesado" ;
|
||||
long_ADeg = long_ADeg ;
|
||||
narrow_ADeg = narrow_ADeg ;
|
||||
near_ADeg = regADeg "cerca" ;
|
||||
new_ADeg = new_ADeg ;
|
||||
old_ADeg = old_ADeg ;
|
||||
red_ADeg = red_ADeg ;
|
||||
rotten_ADeg = regADeg "podrido" ;
|
||||
round_ADeg = regADeg "redondo" ;
|
||||
sharp_ADeg = regADeg "filoso" ; -- afilado, puntiagudo
|
||||
short_ADeg = short_ADeg ;
|
||||
small_ADeg = small_ADeg ;
|
||||
smooth_ADeg = regADeg "liso" ; -- suave
|
||||
straight_ADeg = regADeg "directo" ;
|
||||
thick_ADeg = thick_ADeg ;
|
||||
thin_ADeg = thin_ADeg ;
|
||||
warm_ADeg = warm_ADeg ;
|
||||
wet_ADeg = regADeg "mojado" ;
|
||||
white_ADeg = white_ADeg ;
|
||||
wide_ADeg = regADeg "ancho" ; -- extenso
|
||||
yellow_ADeg = yellow_ADeg ;
|
||||
|
||||
left_A = regA "izquierda" ;
|
||||
right_A = regA "derecha" ;
|
||||
|
||||
-- Nouns
|
||||
|
||||
animal_N = regN "animal" ; -- masc (sometimes fem when adj)
|
||||
ashes_N = regN "ceniza" ;
|
||||
back_N = regN "espalda" ;
|
||||
bark_N = regN "corteza" ;
|
||||
belly_N = regN "panza" ; -- barriga
|
||||
bird_N = bird_N;
|
||||
blood_N = femN (regN "sangre") ;
|
||||
bone_N = regN "hueso" ;
|
||||
breast_N = regN "seno" ; -- pecho
|
||||
child_N = child_N ;
|
||||
cloud_N = femN (regN "nube") ;
|
||||
day_N = mascN (regN "día") ;
|
||||
dog_N = dog_N ;
|
||||
dust_N = regN "polvo" ;
|
||||
ear_N = regN "oreja" ;
|
||||
earth_N = regN "tierra" ;
|
||||
egg_N = regN "huevo" ;
|
||||
eye_N = regN "ojo" ;
|
||||
fat_N = regN "grasa" ;
|
||||
father_N = UseN2 father_N2 ;
|
||||
feather_N = regN "pluma" ;
|
||||
fingernail_N = regN "uña" ;
|
||||
fire_N = regN "fuego" ;
|
||||
fish_N = fish_N ;
|
||||
flower_N = femN (regN "flor") ;
|
||||
fog_N = regN "niebla" ;
|
||||
foot_N = regN "pie" ;
|
||||
forest_N = regN "bosque" ;
|
||||
fruit_N = fruit_N ;
|
||||
grass_N = regN "pasto" ; -- hierba, césped (masc)
|
||||
guts_N = regN "tripa" ; -- gut=intestino ---- pl.t. tripas
|
||||
hair_N = regN "cabello" ; -- pelo
|
||||
hand_N = femN (regN "mano") ;
|
||||
head_N = regN "cabeza" ;
|
||||
heart_N = mkN "corazón" "corazones" masculine ;
|
||||
horn_N = regN "cuerno" ;
|
||||
husband_N = regN "marido" ; -- esposo
|
||||
ice_N = regN "hielo" ;
|
||||
knee_N = regN "rodilla" ;
|
||||
lake_N = lake_N ;
|
||||
leaf_N = regN "hoja" ;
|
||||
leg_N = regN "pierna" ;
|
||||
liver_N = regN "hígado" ;
|
||||
louse_N = regN "piojo" ;
|
||||
man_N = man_N ;
|
||||
meat_N = meat_N ;
|
||||
moon_N = moon_N ;
|
||||
mother_N = UseN2 mother_N2 ;
|
||||
mountain_N = mountain_N ;
|
||||
mouth_N = regN "boca" ;
|
||||
name_N = regN "nombre" ;
|
||||
neck_N = regN "cuello" ;
|
||||
night_N = femN (regN "noche") ;
|
||||
nose_N = femN (regN "nariz") ;
|
||||
person_N = regN "persona" ;
|
||||
rain_N = regN "lluvia" ;
|
||||
river_N = river_N ;
|
||||
road_N = femN (regN "calle") ; -- camino
|
||||
root_N = femN (regN "raíz") ;
|
||||
rope_N = regN "cuerda" ;
|
||||
salt_N = femN (regN "sal") ;
|
||||
sand_N = regN "arena" ;
|
||||
sea_N = sea_N ;
|
||||
seed_N = regN "semilla" ;
|
||||
skin_N = femN (regN "piel") ; -- fem
|
||||
sky_N = regN "cielo" ;
|
||||
smoke_N = regN "humo" ;
|
||||
snake_N = snake_N ;
|
||||
snow_N = femN (regN "nieve") ; -- fem
|
||||
star_N = star_N ;
|
||||
stick_N = mkN "bastón" "bastones" masculine ; -- palo
|
||||
stone_N = stone_N ;
|
||||
sun_N = sun_N ;
|
||||
tail_N = regN "cola" ;
|
||||
tongue_N = regN "lengua" ;
|
||||
tooth_N = regN "diente" ;
|
||||
tree_N = tree_N ;
|
||||
water_N = water_N ;
|
||||
wife_N = regN "esposa" ;
|
||||
wind_N = regN "viento" ;
|
||||
wing_N = regN "ala" ;
|
||||
woman_N = woman_N ;
|
||||
worm_N = regN "gusano" ; -- lombriz (fem)
|
||||
year_N = regN "año" ;
|
||||
|
||||
-- Verbs
|
||||
|
||||
bite_V = verboV (morder_50b "morder") ;
|
||||
blow_V = regV "soplar" ;
|
||||
breathe_V = regV "respirar" ;
|
||||
burn_V = regV "quemar" ;
|
||||
come_V = BasicSpa.come_V ;
|
||||
count_V = verboV (contar_38b "contar") ;
|
||||
cut_V = regV "cortar" ;
|
||||
die_V = BasicSpa.die_V ;
|
||||
dig_V = regV "escarbar" ;
|
||||
drink_V = regV "tomar" ;
|
||||
eat_V = regV "comer" ;
|
||||
fall_V = verboV (caer_20 "caer") ;
|
||||
fear_V = fear_VS ;
|
||||
fight_V = regV "pelear" ;
|
||||
float_V = regV "flotar" ;
|
||||
flow_V = verboV (influir_45 "fluir") ; -- circular
|
||||
fly_V = regV "volar" ;
|
||||
freeze_V = regV "congelar" ;
|
||||
give_V = verboV (dar_27 "dar") ;
|
||||
hear_V = hear_V2 ;
|
||||
hit_V = regV "golpear" ; -- pegar
|
||||
hold_V = verboV (tener_4 "tener") ; -- agarrar
|
||||
hunt_V = regV "cazar" ;
|
||||
kill_V = regV "matar" ;
|
||||
know_V = know_V2 ;
|
||||
laugh_V = regV "reir" ; ----V reír_67
|
||||
lie_V = regV "mentir" ; -- "acostarse"
|
||||
live_V = live_V ;
|
||||
play_V = regV "jugar" ;
|
||||
pull_V = regV "tirar" ;
|
||||
push_V = regV "empujar" ;
|
||||
rub_V = regV "resfregar" ; -- frotar
|
||||
say_V = say_VS ;
|
||||
scratch_V = regV "rascar" ;
|
||||
see_V = see_V2 ;
|
||||
sew_V = regV "coser" ;
|
||||
sing_V = regV "cantar" ;
|
||||
sit_V = regV "sentar" ; ----V verboV (sedere_84 "sentarse") ;
|
||||
sleep_V = sleep_V ;
|
||||
smell_V = verboV (oler_52 "oler") ;
|
||||
spit_V = regV "escupir" ;
|
||||
split_V = regV "separar" ; -- dividir, partir
|
||||
squeeze_V = regV "exprimir" ;
|
||||
stab_V = regV "apuñalar" ;
|
||||
stand_V = verboV (estar_2 "estar") ; ---- "estar de pie" ;
|
||||
suck_V = regV "chupar" ;
|
||||
swell_V = regV "tragar" ;
|
||||
swim_V = regV "nadar" ;
|
||||
think_V = regV "pensar" ;
|
||||
throw_V = regV "tirar" ;
|
||||
tie_V = regV "atar" ;
|
||||
turn_V = regV "doblar" ;
|
||||
vomit_V = regV "vomitar" ;
|
||||
walk_V = regV "caminar" ;
|
||||
wash_V = regV "lavar" ;
|
||||
wipe_V = regV "secar" ;
|
||||
}
|
||||
@@ -1,381 +0,0 @@
|
||||
--# -path=.:../romance:../../prelude
|
||||
|
||||
instance SyntaxSpa of SyntaxRomance =
|
||||
TypesSpa ** open Prelude, (CO=Coordination), MorphoSpa, BeschSpa in {
|
||||
oper
|
||||
nameNounPhrase = \jean ->
|
||||
normalNounPhrase
|
||||
(\\c => prepCase c ++ jean.s)
|
||||
jean.g
|
||||
Sg ;
|
||||
|
||||
nounPhraseOn = mkNameNounPhrase "se" Masc ; --- can be plural dep. on object
|
||||
|
||||
pronImpers : NounPhrase = mkNameNounPhrase [] Masc ;
|
||||
|
||||
partitiveNounPhrase = \n,vino ->
|
||||
normalNounPhrase
|
||||
(table {
|
||||
CPrep P_de => elisDe ++ vino.s ! n ;
|
||||
c => prepCase c ++ artDef vino.g n (CPrep P_de) ++ vino.s ! n
|
||||
}
|
||||
)
|
||||
vino.g
|
||||
n ;
|
||||
|
||||
chaqueDet = mkDeterminer1 Sg "cada" ;
|
||||
tousDet = mkDeterminer Pl ["todos los"] ["todas las"] ; --- gli
|
||||
plupartDet = mkDeterminer1 Pl ["la mayor parte de"] ; --- dei, degli, delle
|
||||
unDet = mkDeterminer Sg artUno artUna ;
|
||||
plDet = mkDeterminer1 Pl [] ; --- dei, degli, delle
|
||||
|
||||
quelDet = mkDeterminer1 Sg "cuál" ; ----
|
||||
|
||||
npGenPoss = \n,ton,mec ->
|
||||
\\c => artDef mec.g n c ++ ton.s ! Poss n mec.g ++ mec.s ! n ; --- mia madre
|
||||
|
||||
npGenPossNum = \nu,ton,mec ->
|
||||
\\c => artDef mec.g Pl c ++ ton.s ! Poss Pl mec.g ++ nu.s ! mec.g ++ mec.s ! Pl ;
|
||||
|
||||
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 =>
|
||||
case m of {
|
||||
Ind => "hay" ;
|
||||
Con => "haya"
|
||||
} ++ delvino.s ! stressed accusative
|
||||
} ;
|
||||
-}
|
||||
|
||||
mkAdjSolo : Str -> Bool -> Adjective = \adj,p ->
|
||||
mkAdjective (adjSolo adj) p ;
|
||||
|
||||
mkAdjUtil : Str -> Str -> Bool -> Adjective = \adj,as,p ->
|
||||
mkAdjective (adjUtil adj as) p ;
|
||||
|
||||
mkAdjDegrSolo : Str -> Bool -> AdjDegr = \adj,p ->
|
||||
mkAdjDegrLong (adjSolo adj) p ;
|
||||
|
||||
mkAdjDegrUtil : Str -> Str -> Bool -> AdjDegr = \adj,as,p ->
|
||||
mkAdjDegrLong (adjUtil adj as) p ;
|
||||
|
||||
comparConj = "que" ;
|
||||
|
||||
-- The commonest case for functions is common noun + "de".
|
||||
|
||||
funGen : CommNounPhrase -> Function = \mere ->
|
||||
mere ** complementCas genitive ;
|
||||
|
||||
-- Chains of "cui" - "cui" do not arise.
|
||||
|
||||
funRelPron = \mere,lequel ->
|
||||
{s = table {
|
||||
RComplex g n c => variants {
|
||||
case mere.c of {
|
||||
CPrep P_de => artDef mere.g n c ++
|
||||
lequel.s ! RSimple dative ++ mere.s ! n ;
|
||||
_ => nonExist} ;
|
||||
artDef mere.g n c ++ mere.s ! n ++
|
||||
mere.s2 ++ lequel.s ! RComplex g n mere.c
|
||||
} ;
|
||||
_ => nonExist
|
||||
} ;
|
||||
g = RG mere.g
|
||||
} ;
|
||||
|
||||
-- Verbs
|
||||
|
||||
negVerb = \va -> "no" ++ va ;
|
||||
|
||||
copula = verbSer ;
|
||||
|
||||
isClitCase = \c -> case c of {
|
||||
Acc => True ;
|
||||
CPrep P_a => True ; -- dative
|
||||
_ => False
|
||||
} ;
|
||||
|
||||
-- Spanish only has one compound auxiliary.
|
||||
|
||||
auxVerb ve = verbHaber ;
|
||||
|
||||
-- The negation of a verb.
|
||||
|
||||
posNeg = \b,v,c ->
|
||||
if_then_else Str b
|
||||
(v ++ c)
|
||||
("no" ++ v ++ c) ;
|
||||
|
||||
embedConj = "que" ;
|
||||
|
||||
-- Relative pronouns
|
||||
|
||||
identRelPron = {
|
||||
s = table {
|
||||
RSimple c => relPronForms ! c ;
|
||||
RComplex g n c => composRelPron g n c
|
||||
} ;
|
||||
g = RNoGen
|
||||
} ;
|
||||
|
||||
suchPron = talPron ;
|
||||
|
||||
composRelPron = ilqualPron ;
|
||||
|
||||
allRelForms = \lequel,g,n,c ->
|
||||
variants {
|
||||
lequel.s ! RSimple c ;
|
||||
lequel.s ! RComplex g n c
|
||||
} ;
|
||||
|
||||
-- Interrogative pronouns
|
||||
|
||||
nounIntPron = \n, mec ->
|
||||
{s = \\c => prepCase c ++ qualPron mec.g n ++ mec.s ! n ;
|
||||
g = mec.g ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
intPronWho = \num -> {
|
||||
s = \\c => prepCase c ++ "quién" ;
|
||||
g = Masc ; --- can we decide this?
|
||||
n = num
|
||||
} ;
|
||||
|
||||
intPronWhat = \num -> {
|
||||
s = table {
|
||||
c => prepCase c ++ "qué"
|
||||
} ;
|
||||
g = Masc ; --- can we decide this?
|
||||
n = num
|
||||
} ;
|
||||
|
||||
-- Questions
|
||||
{- ----
|
||||
questVerbPhrase = \jean,dort ->
|
||||
{s = table {
|
||||
DirQ => (predVerbPhrase jean dort).s ! Ind ;
|
||||
IndirQ => "si" ++ (predVerbPhrase jean dort).s ! Ind
|
||||
}
|
||||
} ;
|
||||
|
||||
existNounPhraseQuest = \delvino ->
|
||||
let cedelvino = (existNounPhrase delvino).s ! Ind
|
||||
in {
|
||||
s = \\m => case m of {DirQ => [] ; _ => "si"} ++ cedelvino
|
||||
} ;
|
||||
|
||||
intSlash = \Qui, Tuvois ->
|
||||
let {qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ; tuvois = Tuvois.s ! Ind} in
|
||||
{s = table {
|
||||
DirQ => qui ++ tuvois ;
|
||||
IndirQ => qui ++ tuvois
|
||||
}
|
||||
} ;
|
||||
-}
|
||||
|
||||
intSlash = \Qui, Tuvois ->
|
||||
{s = \\b,cl =>
|
||||
let
|
||||
qui = Tuvois.s2 ++ Qui.s ! Tuvois.c ;
|
||||
tuvois = Tuvois.s ! b ! cl
|
||||
in
|
||||
table {
|
||||
DirQ => qui ++ tuvois ;
|
||||
IndirQ => qui ++ tuvois
|
||||
}
|
||||
} ;
|
||||
|
||||
---- moved from MorphoIta
|
||||
|
||||
-- A macro for defining gender-dependent tables will be useful.
|
||||
-- Its first application is in the indefinite article.
|
||||
|
||||
genForms = \matto, matta ->
|
||||
table {Masc => matto ; Fem => matta} ;
|
||||
|
||||
artUno : Str = "un" ;
|
||||
artUna : Str = "una" ;
|
||||
|
||||
artIndef = \g,n,c -> case n of {
|
||||
Sg => prepCase c ++ genForms artUno artUna ! g ;
|
||||
_ => prepCase c ++ []
|
||||
} ;
|
||||
|
||||
artDef = \g,n,c -> artDefTable ! g ! n ! c ;
|
||||
|
||||
-- The composable pronoun "il quale" is inflected by varying the definite
|
||||
-- article and the determiner "quale" in the expected way.
|
||||
|
||||
ilqualPron : Gender -> Number -> Case -> Str = \g,n,c ->
|
||||
artDef g n c ++ qualPron g n ;
|
||||
|
||||
pronJe = mkPronoun
|
||||
"yo" --- (variants {"yo" ; []}) etc
|
||||
"me"
|
||||
"me"
|
||||
"mí"
|
||||
"mi" "mi" "mis" "mis"
|
||||
PNoGen -- gender cannot be known from pronoun alone
|
||||
Sg
|
||||
P1
|
||||
Clit1 ;
|
||||
|
||||
pronTu = mkPronoun
|
||||
"tu"
|
||||
"te"
|
||||
"te"
|
||||
"tí"
|
||||
"tu" "tu" "tus" "tus"
|
||||
PNoGen
|
||||
Sg
|
||||
P2
|
||||
Clit1 ;
|
||||
|
||||
pronIl = mkPronoun
|
||||
"el"
|
||||
"lo"
|
||||
"le"
|
||||
"él"
|
||||
"su" "su" "sus" "sus"
|
||||
(PGen Masc)
|
||||
Sg
|
||||
P3
|
||||
Clit2 ;
|
||||
|
||||
pronElle = mkPronoun
|
||||
"ella"
|
||||
"la"
|
||||
"le"
|
||||
"ella"
|
||||
"su" "su" "sus" "sus"
|
||||
(PGen Fem)
|
||||
Sg
|
||||
P3
|
||||
Clit2 ;
|
||||
|
||||
pronNous = mkPronoun
|
||||
"nosotros" ---- nosotras
|
||||
"nos"
|
||||
"nos"
|
||||
"nosotros"
|
||||
"nuestro" "nuestra" "nuestros" "nuestras"
|
||||
(PGen Masc)
|
||||
Pl
|
||||
P1
|
||||
Clit3 ;
|
||||
|
||||
pronVous = mkPronoun
|
||||
"vosotros" ---- vosotras
|
||||
"vos"
|
||||
"vos"
|
||||
"vosotros"
|
||||
"vuestro" "vuestra" "vuestros" "vuestras"
|
||||
(PGen Masc)
|
||||
Pl
|
||||
P2
|
||||
Clit3 ;
|
||||
|
||||
pronIls = mkPronoun
|
||||
"ellos"
|
||||
"los"
|
||||
"les"
|
||||
"ellos"
|
||||
"su" "su" "sus" "sus"
|
||||
(PGen Masc)
|
||||
Pl
|
||||
P3
|
||||
Clit1 ;
|
||||
|
||||
pronElles = mkPronoun
|
||||
"ellas"
|
||||
"las"
|
||||
"les"
|
||||
"ellas"
|
||||
"su" "su" "sus" "sus"
|
||||
(PGen Fem)
|
||||
Pl
|
||||
P3
|
||||
Clit1 ;
|
||||
|
||||
commentAdv = ss "como" ;
|
||||
quandAdv = ss "cuando" ;
|
||||
ouAdv = ss "donde" ;
|
||||
pourquoiAdv = ss "porqué" ;
|
||||
|
||||
-- The forms of "y" and "o" depend on the prefix of the word that
|
||||
-- follows.
|
||||
|
||||
etConj = {s = pre {
|
||||
"y" ;
|
||||
"y" / strs {"ya" ; "ye" ; "yo" ; "yu"} ;
|
||||
"e" / strs {"i" ; "hi" ; "y"}
|
||||
}} ** {n = Pl} ;
|
||||
ouConj = {s = pre {"o" ; "u" / strs {"o" ; "ho"}}} ** {n = Sg} ;
|
||||
|
||||
etetConj = sd2 "y" "y" ** {n = Pl} ;
|
||||
ououConj = sd2 "o" "o" ** {n = Sg} ;
|
||||
niniConj = sd2 "no" "ni" ** {n = Sg} ; ----
|
||||
siSubj = ss "si" ** {m = Ind} ;
|
||||
quandSubj = ss "cuando" ** {m = Ind} ;
|
||||
|
||||
ouiPhr = ss ["Sí ."] ;
|
||||
nonPhr = ss ["No ."] ;
|
||||
|
||||
negNe = "no" ; negPas = [] ;
|
||||
|
||||
progressiveSats subj vp =
|
||||
mkSatsObject subj
|
||||
(mkTransVerbDir (verbPres (estar_2 "estar") AHabere)) --- hack to reuse
|
||||
(nameNounPhrase (mkProperName ( --- this function
|
||||
vp.s ! VIGerund ! (pgen2gen subj.g) ! subj.n ! subj.p) Masc)) ;
|
||||
|
||||
conjunctCase : CaseA -> CaseA = \c -> case c of {
|
||||
CPrep _ => accusative ;
|
||||
_ => c
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
11
lib/resource/spanish/TextSpa.gf
Normal file
11
lib/resource/spanish/TextSpa.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete TextSpa of Text = CommonX - [Tense,TPres,TPast,TFut,TCond] ** {
|
||||
|
||||
-- This works for the special punctuation marks of Spanish.
|
||||
|
||||
lin
|
||||
TEmpty = {s = []} ;
|
||||
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
|
||||
TQuestMark x xs = {s = "¿" ++ x.s ++ "?" ++ xs.s} ;
|
||||
TExclMark x xs = {s = "¡" ++ x.s ++ "!" ++ xs.s} ;
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
concrete TimeSpa of Time = NumeralsSpa **
|
||||
open Prelude, MorphoSpa, CategoriesSpa, ParadigmsSpa in {
|
||||
|
||||
lincat
|
||||
Date = SS ;
|
||||
Weekday = N ;
|
||||
Hour = SS ;
|
||||
Minute = SS ;
|
||||
Time = SS ;
|
||||
|
||||
lin
|
||||
DayDate day = ss (day.s ! singular) ;
|
||||
DayTimeDate day time = ss (day.s ! singular ++ ["a las"] ++ time.s) ; --- a la una
|
||||
|
||||
FormalTime h m = ss (["a las"] ++ h.s ++ "y" ++ m.s) ;
|
||||
PastTime h m = ss (["a las"] ++ h.s ++ "y" ++ h.s) ;
|
||||
ToTime h m = ss (["a las"] ++ h.s ++ "menos" ++ m.s) ;
|
||||
ExactTime h = ss (h.s ++ "exactamente") ;
|
||||
|
||||
NumHour n = ss (n.s ! feminine) ;
|
||||
NumMinute n = ss (n.s ! feminine) ;
|
||||
|
||||
monday = regN "lunes" ;
|
||||
tuesday = regN "martes" ;
|
||||
wednesday = regN "miércoles" ;
|
||||
thursday = regN "jueves" ;
|
||||
friday = regN "viernes" ;
|
||||
saturday = regN "sábado" ;
|
||||
sunday = regN "domingo" ;
|
||||
|
||||
|
||||
} ;
|
||||
@@ -1,161 +0,0 @@
|
||||
--1 Spanish Word Classes and Morphological Parameters
|
||||
--
|
||||
-- This is a resource module for Spanish morphology, defining the
|
||||
-- morphological parameters and word classes of Spanish.
|
||||
-- The morphology is so far only
|
||||
-- complete w.r.t. the syntax part of the resource grammar.
|
||||
-- It does not include those parameters that are not needed for
|
||||
-- analysing individual words: such parameters are defined in syntax modules.
|
||||
|
||||
instance TypesSpa of TypesRomance = {
|
||||
|
||||
-- First we give values to the abstract types.
|
||||
|
||||
param
|
||||
Case = Nom | Acc | CPrep Prep ;
|
||||
|
||||
Prep = P_de | P_a ;
|
||||
|
||||
NPForm = Ton Case | Aton Case | Poss Number Gender ;
|
||||
|
||||
--2 Prepositions
|
||||
--
|
||||
-- The type $Case$ in $types.Ita.gf$ has the dative and genitive
|
||||
-- cases, which are relevant for pronouns and the definite article,
|
||||
-- but which are otherwise expressed by prepositions.
|
||||
|
||||
oper
|
||||
prepCase = \c -> case c of {
|
||||
Nom => [] ;
|
||||
Acc => [] ;
|
||||
CPrep p => strPrep p
|
||||
} ;
|
||||
|
||||
strPrep : Prep -> Str = \p -> case p of {
|
||||
P_de => "de" ;
|
||||
P_a => "a"
|
||||
} ;
|
||||
|
||||
prepositional = accusative ;
|
||||
|
||||
oper
|
||||
CaseA = Case ;
|
||||
NPFormA = NPForm ;
|
||||
|
||||
nominative = Nom ;
|
||||
accusative = Acc ;
|
||||
genitive = CPrep P_de ;
|
||||
dative = CPrep P_a ;
|
||||
|
||||
stressed = Ton ;
|
||||
unstressed = Aton ;
|
||||
|
||||
oper
|
||||
pform2case = \p -> case p of {
|
||||
Ton x => x ;
|
||||
Aton x => x ;
|
||||
Poss _ _ => genitive
|
||||
} ;
|
||||
|
||||
case2pform = \c -> case c of {
|
||||
Nom => Aton Nom ;
|
||||
Acc => Aton Acc ;
|
||||
_ => 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).
|
||||
|
||||
mkAdjComp : (_,_ : AForm => Str) -> AdjComp =
|
||||
\buono, migliore ->
|
||||
{s = table {Pos => buono ; _ => migliore}} ;
|
||||
|
||||
-- Usually the comparison forms are built by prefixing the word
|
||||
-- "mas". The definite article needed in the superlative is provided in
|
||||
-- $syntax.Ita.gf$.
|
||||
|
||||
adjCompLong : Adj -> AdjComp = \caro ->
|
||||
mkAdjComp
|
||||
caro.s
|
||||
(\\gn => "mas" ++ caro.s ! gn) ;
|
||||
|
||||
|
||||
-- Relative pronouns: the case-dependent parameter type.
|
||||
|
||||
param RelForm = RSimple Case | RComplex Gender Number Case ;
|
||||
|
||||
oper RelFormA = RelForm ;
|
||||
|
||||
npRelForm : NPFormA -> RelFormA = \np -> case np of {
|
||||
Ton c => RSimple c ;
|
||||
Aton c => RSimple c ;
|
||||
Poss _ _ => RSimple genitive
|
||||
} ;
|
||||
|
||||
--2 Relative pronouns
|
||||
--
|
||||
-- The simple (atonic) relative pronoun shows genuine variation in all of the
|
||||
-- cases.
|
||||
|
||||
relPronForms = table {
|
||||
Nom | Acc => "que" ;
|
||||
CPrep P_a => "cuyo" ;
|
||||
CPrep p => strPrep p ++ "cuyo"
|
||||
} ;
|
||||
|
||||
-- Verbs: conversion from full verbs to present-tense verbs.
|
||||
|
||||
verbPres = \amare,a -> {s = table {
|
||||
VInfin => amare.s ! VI Infn ;
|
||||
VFin (VPres Ind) n p => amare.s ! VP (Pres Ind n p) ;
|
||||
VFin (VPres Sub) n p => amare.s ! VP (Pres Sub n p) ;
|
||||
VFin (VImperf Ind) n p => amare.s ! VP (Impf Ind n p) ;
|
||||
VFin (VImperf Sub) n p => amare.s ! VP (Impf Sub n p) ;
|
||||
VFin VPasse n p => amare.s ! VP (Pret n p) ;
|
||||
VFin VFut n p => amare.s ! VP (Fut Ind n p) ;
|
||||
VFin VCondit n p => amare.s ! VP (Cond n p) ;
|
||||
VImper SgP2 => amare.s ! VP (Imp Sg P2) ;
|
||||
VImper PlP1 => amare.s ! VP (Imp Pl P1) ;
|
||||
VImper PlP2 => amare.s ! VP (Imp Pl P2) ;
|
||||
VPart g n => amare.s ! VP (Pass n g) ;
|
||||
VGer => amare.s ! VI Ger
|
||||
} ;
|
||||
aux = a
|
||||
} ;
|
||||
|
||||
|
||||
-- The full conjunction is a table on $VForm$:
|
||||
|
||||
param
|
||||
VImpers =
|
||||
Infn
|
||||
| Ger
|
||||
| Part
|
||||
;
|
||||
|
||||
VPers =
|
||||
Pres Mode Number Person
|
||||
| Impf Mode Number Person
|
||||
| Pret Number Person
|
||||
| Fut Mode Number Person
|
||||
| Cond Number Person
|
||||
| Imp Number Person
|
||||
| Pass Number Gender
|
||||
;
|
||||
|
||||
VForm =
|
||||
VI VImpers
|
||||
| VP VPers
|
||||
;
|
||||
|
||||
-- This is the full verb type.
|
||||
|
||||
oper Verbum = {s : VForm => Str} ;
|
||||
}
|
||||
2
lib/resource/spanish/VerbSpa.gf
Normal file
2
lib/resource/spanish/VerbSpa.gf
Normal file
@@ -0,0 +1,2 @@
|
||||
concrete VerbSpa of Verb = CatSpa ** VerbRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user