forked from GitHub/gf-core
updated ParadigmsSpa
This commit is contained in:
@@ -273,6 +273,75 @@ oper tener_4 : Str -> Verbum = \tener ->
|
|||||||
VP (Pass Pl Fem) => t_ + "enidas"
|
VP (Pass Pl Fem) => t_ + "enidas"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
oper cortar_5 : Str -> Verbum = \cortar ->
|
||||||
|
let cort_ = Predef.tk 2 cortar in
|
||||||
|
{s = table {
|
||||||
|
VI Infn => cort_ + "ar" ;
|
||||||
|
VI Ger => cort_ + "ando" ;
|
||||||
|
VI Part => cort_ + "ado" ;
|
||||||
|
VP (Pres Ind Sg P1) => cort_ + "o" ;
|
||||||
|
VP (Pres Ind Sg P2) => cort_ + "as" ;
|
||||||
|
VP (Pres Ind Sg P3) => cort_ + "a" ;
|
||||||
|
VP (Pres Ind Pl P1) => cort_ + "amos" ;
|
||||||
|
VP (Pres Ind Pl P2) => cort_ + "áis" ;
|
||||||
|
VP (Pres Ind Pl P3) => cort_ + "an" ;
|
||||||
|
VP (Pres Subj Sg P1) => cort_ + "e" ;
|
||||||
|
VP (Pres Subj Sg P2) => cort_ + "es" ;
|
||||||
|
VP (Pres Subj Sg P3) => cort_ + "e" ;
|
||||||
|
VP (Pres Subj Pl P1) => cort_ + "emos" ;
|
||||||
|
VP (Pres Subj Pl P2) => cort_ + "éis" ;
|
||||||
|
VP (Pres Subj Pl P3) => cort_ + "en" ;
|
||||||
|
VP (Impf Ind Sg P1) => cort_ + "aba" ;
|
||||||
|
VP (Impf Ind Sg P2) => cort_ + "abas" ;
|
||||||
|
VP (Impf Ind Sg P3) => cort_ + "aba" ;
|
||||||
|
VP (Impf Ind Pl P1) => cort_ + "ábamos" ;
|
||||||
|
VP (Impf Ind Pl P2) => cort_ + "abais" ;
|
||||||
|
VP (Impf Ind Pl P3) => cort_ + "aban" ;
|
||||||
|
VP (Impf Subj Sg P1) => variants {cort_ + "ara" ; cort_ + "ase"} ;
|
||||||
|
VP (Impf Subj Sg P2) => variants {cort_ + "aras" ; cort_ + "ases"} ;
|
||||||
|
VP (Impf Subj Sg P3) => variants {cort_ + "ara" ; cort_ + "ase"} ;
|
||||||
|
VP (Impf Subj Pl P1) => variants {cort_ + "áramos" ; cort_ + "ásemos"} ;
|
||||||
|
VP (Impf Subj Pl P2) => variants {cort_ + "arais" ; cort_ + "aseis"} ;
|
||||||
|
VP (Impf Subj Pl P3) => variants {cort_ + "aran" ; cort_ + "asen"} ;
|
||||||
|
VP (Pret Sg P1) => cort_ + "é" ;
|
||||||
|
VP (Pret Sg P2) => cort_ + "aste" ;
|
||||||
|
VP (Pret Sg P3) => cort_ + "ó" ;
|
||||||
|
VP (Pret Pl P1) => cort_ + "amos" ;
|
||||||
|
VP (Pret Pl P2) => cort_ + "asteis" ;
|
||||||
|
VP (Pret Pl P3) => cort_ + "aron" ;
|
||||||
|
VP (Fut Ind Sg P1) => cort_ + "aré" ;
|
||||||
|
VP (Fut Ind Sg P2) => cort_ + "arás" ;
|
||||||
|
VP (Fut Ind Sg P3) => cort_ + "ará" ;
|
||||||
|
VP (Fut Ind Pl P1) => cort_ + "aremos" ;
|
||||||
|
VP (Fut Ind Pl P2) => cort_ + "aréis" ;
|
||||||
|
VP (Fut Ind Pl P3) => cort_ + "arán" ;
|
||||||
|
VP (Fut Subj Sg P1) => cort_ + "are" ;
|
||||||
|
VP (Fut Subj Sg P2) => cort_ + "ares" ;
|
||||||
|
VP (Fut Subj Sg P3) => cort_ + "are" ;
|
||||||
|
VP (Fut Subj Pl P1) => cort_ + "áremos" ;
|
||||||
|
VP (Fut Subj Pl P2) => cort_ + "areis" ;
|
||||||
|
VP (Fut Subj Pl P3) => cort_ + "aren" ;
|
||||||
|
VP (Cond Sg P1) => cort_ + "aría" ;
|
||||||
|
VP (Cond Sg P2) => cort_ + "arías" ;
|
||||||
|
VP (Cond Sg P3) => cort_ + "aría" ;
|
||||||
|
VP (Cond Pl P1) => cort_ + "aríamos" ;
|
||||||
|
VP (Cond Pl P2) => cort_ + "aríais" ;
|
||||||
|
VP (Cond Pl P3) => cort_ + "arían" ;
|
||||||
|
VP (Imp Sg P1) => variants {} ;
|
||||||
|
VP (Imp Sg P2) => cort_ + "a" ;
|
||||||
|
VP (Imp Sg P3) => cort_ + "e" ;
|
||||||
|
VP (Imp Pl P1) => cort_ + "emos" ;
|
||||||
|
VP (Imp Pl P2) => cort_ + "ad" ;
|
||||||
|
VP (Imp Pl P3) => cort_ + "en" ;
|
||||||
|
VP (Pass Sg Masc) => cort_ + "ado" ;
|
||||||
|
VP (Pass Sg Fem) => cort_ + "ada" ;
|
||||||
|
VP (Pass Pl Masc) => cort_ + "ados" ;
|
||||||
|
VP (Pass Pl Fem) => cort_ + "adas"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
oper deber_6 : Str -> Verbum = \deber ->
|
oper deber_6 : Str -> Verbum = \deber ->
|
||||||
let deb_ = Predef.tk 2 deber in
|
let deb_ = Predef.tk 2 deber in
|
||||||
{s = table {
|
{s = table {
|
||||||
|
|||||||
@@ -55,7 +55,13 @@ oper
|
|||||||
mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs ->
|
mkCNomIrreg : Str -> Str -> Gender -> CNom = \mec,mecs ->
|
||||||
mkCNom (numForms mec mecs) ;
|
mkCNom (numForms mec mecs) ;
|
||||||
|
|
||||||
|
mkNomReg : Str -> CNom = \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
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
--
|
--
|
||||||
@@ -84,6 +90,13 @@ oper
|
|||||||
adjBlu : Str -> Adj = \blu ->
|
adjBlu : Str -> Adj = \blu ->
|
||||||
mkAdj blu blu blu blu blu ; ---
|
mkAdj blu blu blu blu blu ; ---
|
||||||
|
|
||||||
|
mkAdjReg : Str -> Adj = \solo ->
|
||||||
|
case last solo of {
|
||||||
|
"o" => adjSolo solo ;
|
||||||
|
"e" => adjUtil solo (solo + "s") ;
|
||||||
|
_ => adjUtil solo (solo + "es")
|
||||||
|
---- _ => adjBlu solo
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Personal pronouns
|
--2 Personal pronouns
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
--1 Spanish Lexical Paradigms
|
--1 Spanish Lexical Paradigms
|
||||||
--
|
--
|
||||||
-- Aarne Ranta 2003
|
-- Aarne Ranta 2005
|
||||||
--
|
--
|
||||||
-- This is an API to the user of the resource grammar
|
-- This is an API to the user of the resource grammar
|
||||||
-- for adding lexical items. It give shortcuts for forming
|
-- for adding lexical items. It give shortcuts for forming
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
resource ParadigmsSpa =
|
resource ParadigmsSpa =
|
||||||
open Prelude, (Types = TypesSpa), SyntaxSpa, MorphoSpa,
|
open Prelude, (Types = TypesSpa), SyntaxSpa, MorphoSpa, BeschSpa,
|
||||||
ResourceSpa in {
|
RulesSpa in {
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
--
|
--
|
||||||
@@ -40,21 +40,18 @@ oper
|
|||||||
singular : Number ;
|
singular : Number ;
|
||||||
plural : Number ;
|
plural : Number ;
|
||||||
|
|
||||||
-- To abstract over case names, we define the following. (Except for
|
-- Prepositions used in many-argument functions are either strings
|
||||||
-- some pronouns, the accusative is equal to the nominative, the
|
-- (including the 'accusative' empty string) or strings that
|
||||||
-- dative is formed by the preposition "a", and the genitive by the
|
-- amalgamate with the following word (the 'genitive' "de" and the
|
||||||
-- preposition "di".)
|
-- 'dative' "à").
|
||||||
|
|
||||||
Case : Type ;
|
Preposition : Type ;
|
||||||
|
|
||||||
nominative : Case ;
|
accusative : Preposition ;
|
||||||
accusative : Case ;
|
dative : Preposition ;
|
||||||
dative : Case ;
|
genitive : Preposition ;
|
||||||
genitive : Case ;
|
|
||||||
|
|
||||||
prep_a : Case ;
|
|
||||||
prep_de : Case ;
|
|
||||||
|
|
||||||
|
mkPreposition : Str -> Preposition ;
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
@@ -63,176 +60,288 @@ oper
|
|||||||
|
|
||||||
mkN : (_,_ : Str) -> Gender -> N ; -- uomo, uomini, masculine
|
mkN : (_,_ : Str) -> Gender -> N ; -- uomo, uomini, masculine
|
||||||
|
|
||||||
-- Often it is enough with one form. If it ends with
|
-- The regular function takes the singular form and the gender,
|
||||||
-- "o" or "a", no gender is needed; if with something else,
|
-- and computes the plural and the gender by a heuristic.
|
||||||
-- the gender must be given.
|
-- The heuristic says that the gender is feminine for nouns
|
||||||
|
-- ending with "a" or "z", and masculine for all other words.
|
||||||
|
-- Nouns ending with "a", "o", "e" have the plural with "s",
|
||||||
|
-- those ending with "z" have "ces" in plural; all other nouns
|
||||||
|
-- have "es" as plural ending. The accent is not dealt with.
|
||||||
|
|
||||||
nVino : Str -> N ; -- vino (, vinos, masculine)
|
regN : Str -> N ;
|
||||||
nRana : Str -> N ; -- rana (, ranas, feminine)
|
|
||||||
nPilar : Str -> Gender -> N ; -- pilar (, pilares), masculine
|
|
||||||
nTram : Str -> Gender -> N ; -- tram (, tram), masculine
|
|
||||||
|
|
||||||
-- Nouns used as functions need a case and a preposition. The most common is "di".
|
-- To force a different gender, use one of the following functions.
|
||||||
-- Recall that the prepositions "a", "di", "da", "in", "su", "con" are treated
|
|
||||||
-- as part of the case (cf. above).
|
|
||||||
|
|
||||||
funPrep : N -> Preposition -> N2 ;
|
mascN : N -> N ;
|
||||||
funCase : N -> Case -> N2 ;
|
femN : N -> N ;
|
||||||
funDe : N -> N2 ;
|
|
||||||
|
|
||||||
-- Proper names, with their gender.
|
--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".
|
||||||
|
-- They could be formed in syntax, but we give a shortcut here since
|
||||||
|
-- they are frequent in lexica.
|
||||||
|
|
||||||
mkPN : Str -> Gender -> PN ; -- Giovanni, masculine
|
compN : N -> Str -> N ;
|
||||||
|
|
||||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
|
||||||
-- $NP$ rather than $PN$.
|
|
||||||
|
|
||||||
mkCN : N -> CN ;
|
--3 Relational nouns
|
||||||
mkNP : Str -> Gender -> NP ;
|
--
|
||||||
|
-- Relational nouns ("fille de x") need a case and a preposition.
|
||||||
|
|
||||||
|
mkN2 : N -> Preposition -> N2 ;
|
||||||
|
|
||||||
|
-- The most common cases are the genitive "de" and the dative "a",
|
||||||
|
-- with the empty preposition.
|
||||||
|
|
||||||
|
deN2 : N -> N2 ;
|
||||||
|
aN2 : N -> N2 ;
|
||||||
|
|
||||||
|
-- Three-place relational nouns ("la connessione di x a y") need two prepositions.
|
||||||
|
|
||||||
|
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||||
|
|
||||||
|
|
||||||
|
--3 Relational common noun phrases
|
||||||
|
--
|
||||||
|
-- In some cases, you may want to make a complex $CN$ into a
|
||||||
|
-- relational noun (e.g. "the old town hall of"). However, $N2$ and
|
||||||
|
-- $N3$ are purely lexical categories. But you can use the $AdvCN$
|
||||||
|
-- and $PrepNP$ constructions to build phrases like this.
|
||||||
|
|
||||||
|
--
|
||||||
|
--3 Proper names and noun phrases
|
||||||
|
--
|
||||||
|
-- Proper names need a string and a gender.
|
||||||
|
|
||||||
|
mkPN : Str -> Gender -> PN ; -- Jean
|
||||||
|
|
||||||
|
-- To form a noun phrase that can also be plural,
|
||||||
|
-- you can use the worst-case function.
|
||||||
|
|
||||||
|
mkNP : Str -> Gender -> Number -> NP ;
|
||||||
|
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
|
|
||||||
-- Non-comparison one-place adjectives need four forms in the worst case.
|
-- Non-comparison one-place adjectives need five forms in the worst
|
||||||
-- A parameter tells if they are pre- or postpositions in modification.
|
-- case (masc and fem singular, masc plural, adverbial).
|
||||||
|
|
||||||
Position : Type ;
|
mkA : (solo,sola,soli,sole, solamente : Str) -> A ;
|
||||||
prepos : Position ;
|
|
||||||
postpos : Position ;
|
|
||||||
|
|
||||||
mkA1 : (solo,sola,soli,sole,solamente : Str) -> Position -> A1 ;
|
-- For regular adjectives, all other forms are derived from the
|
||||||
|
-- masculine singular. The types of adjectives that are recognized are
|
||||||
|
-- "alto", "fuerte", "util".
|
||||||
|
|
||||||
-- Adjectives ending with "o" and "e", and invariable adjectives,
|
regA : Str -> A ;
|
||||||
-- are the most important regular patterns.
|
|
||||||
|
|
||||||
adj1Solo : (solo : Str) -> Bool -> A1 ;
|
-- These functions create postfix adjectives. To switch
|
||||||
adj1Util : (a,b : Str) -> Bool -> A1 ;
|
-- them to prefix ones (i.e. ones placed before the noun in
|
||||||
adj1Blu : (blu : Str) -> Bool -> A1 ;
|
-- modification, as in "petite maison"), the following function is
|
||||||
|
-- provided.
|
||||||
|
|
||||||
|
prefA : A -> A ;
|
||||||
|
|
||||||
-- Two-place adjectives need a preposition and a case as extra arguments.
|
--3 Two-place adjectives
|
||||||
|
--
|
||||||
|
-- Two-place adjectives need a preposition for their second argument.
|
||||||
|
|
||||||
mkA2 : A1 -> Preposition -> Case -> A2 ; -- divisibile per
|
mkA2 : A -> Preposition -> A2 ;
|
||||||
|
|
||||||
-- Comparison adjectives may need two adjectives, corresponding to the
|
--3 Comparison adjectives
|
||||||
-- positive and other forms.
|
|
||||||
|
|
||||||
mkADeg : (buono, migliore : A1) -> ADeg ;
|
-- Comparison adjectives are in the worst case put up from two
|
||||||
|
-- adjectives: the positive ("bueno"), and the comparative ("mejor").
|
||||||
|
|
||||||
-- In the completely regular case, the comparison forms are constructed by
|
mkADeg : A -> A -> ADeg ;
|
||||||
-- the particle "più".
|
|
||||||
|
|
||||||
aSolo : Str -> Position -> ADeg ; -- lento (, più lento)
|
-- If comparison is formed by "mas", as usual in Spanish,
|
||||||
aUtil : Str -> Str -> Position -> ADeg ; -- grave (, più grave)
|
-- the following pattern is used:
|
||||||
aBlu : Str -> Position -> ADeg ; -- blu (, più blu)
|
|
||||||
|
|
||||||
-- On top level, there are adjectival phrases. The most common case is
|
compADeg : A -> ADeg ;
|
||||||
-- just to use a one-place adjective.
|
|
||||||
|
|
||||||
apSolo : Str -> Position -> AP ;
|
-- The regular pattern is the same as $regA$ for plain adjectives,
|
||||||
apUtil : Str -> Str -> Position -> AP ;
|
-- with comparison by "mas".
|
||||||
apBlu : Str -> Position -> AP ;
|
|
||||||
|
regADeg : Str -> ADeg ;
|
||||||
|
|
||||||
|
-- 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
|
||||||
|
|
||||||
|
-- Adverbs are not inflected. Most lexical ones have position
|
||||||
|
-- after the verb.
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv ;
|
||||||
|
|
||||||
|
-- Some appear next to the verb (e.g. "siempre").
|
||||||
|
|
||||||
|
mkAdV : Str -> AdV ;
|
||||||
|
|
||||||
|
-- Adverbs modifying adjectives and sentences can also be formed.
|
||||||
|
|
||||||
|
mkAdA : Str -> AdA ;
|
||||||
|
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
--
|
--
|
||||||
-- The fragment only has present tense so far, but in all persons.
|
-- Regular verbs are ones inflected like "cortar", "deber", or "vivir".
|
||||||
-- The worst case needs nine forms (and is not very user-friendly).
|
-- The regular verb function is the first conjugation ("ar") recognizes
|
||||||
|
-- the variations corresponding to the patterns
|
||||||
|
-- "actuar, cazar, guiar, pagar, sacar". The module $BeschSpa$ gives
|
||||||
|
-- the complete set of "Bescherelle" conjugations.
|
||||||
|
|
||||||
---- mkV : (_,_,_,_,_,_,_,_,_ : Str) -> V ;
|
regV : Str -> V ;
|
||||||
|
|
||||||
-- These are examples of standard conjugations. Other conjugations
|
--3 Two-place verbs
|
||||||
-- can be extracted from the Italian functional morphology, which has full
|
--
|
||||||
-- "Bescherelle" tables.
|
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||||
|
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||||
|
|
||||||
vAmar : Str -> V ;
|
mkV2 : V -> Preposition -> V2 ;
|
||||||
vVender : Str -> V ;
|
|
||||||
---- vFinire : Str -> V ;
|
|
||||||
---- vCorrere : (_,_ : Str) -> V ;
|
|
||||||
|
|
||||||
-- The verbs 'be' and 'have' are special.
|
dirV2 : V -> V2 ;
|
||||||
|
|
||||||
vSer : V ;
|
-- You can reuse a $V2$ verb in $V$.
|
||||||
vHaber : V ;
|
|
||||||
|
|
||||||
-- Two-place verbs, and the special case with direct object. Notice that
|
v2V : V2 -> V ;
|
||||||
-- a particle can be included in a $V$.
|
|
||||||
|
|
||||||
mkV2 : V -> Preposition -> Case -> V2 ;
|
--3 Three-place verbs
|
||||||
tvDir : V -> V2 ;
|
--
|
||||||
|
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||||
|
-- the first one or both can be absent.
|
||||||
|
|
||||||
-- The idiom with "avere" and an invariable noun, such as "paura", "fame",
|
mkV3 : V -> Preposition -> Preposition -> V3 ; -- parler, à, de
|
||||||
-- and a two-place variant with "di" + complement.
|
dirV3 : V -> Preposition -> V3 ; -- donner,_,à
|
||||||
|
dirdirV3 : V -> V3 ; -- donner,_,_
|
||||||
|
|
||||||
averCosa : Str -> V ;
|
--3 Other complement patterns
|
||||||
averCosaDe : Str -> V2 ;
|
--
|
||||||
|
-- Verbs and adjectives can take complements such as sentences,
|
||||||
|
-- questions, verb phrases, and adjectives.
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
mkVA : V -> VA ;
|
||||||
|
mkV2A : V -> Preposition -> V2A ;
|
||||||
|
mkVQ : V -> VQ ;
|
||||||
|
mkV2Q : V -> Preposition -> V2Q ;
|
||||||
|
|
||||||
|
mkAS : A -> AS ;
|
||||||
|
subjAS : A -> AS ;
|
||||||
|
mkA2S : A -> Preposition -> A2S ;
|
||||||
|
mkAV : A -> Preposition -> AV ;
|
||||||
|
mkA2V : A -> Preposition -> Preposition -> A2V ;
|
||||||
|
|
||||||
|
|
||||||
|
--2 Definitions of the paradigms
|
||||||
|
--
|
||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
--.
|
--.
|
||||||
|
|
||||||
Bool = Prelude.Bool ;
|
Bool = Prelude.Bool ;
|
||||||
Gender = SyntaxSpa.Gender ;
|
Gender = SyntaxSpa.Gender ;
|
||||||
Case = SyntaxSpa.Case ;
|
Preposition = SyntaxSpa.Case * Str ;
|
||||||
Number = SyntaxSpa.Number ;
|
Number = SyntaxSpa.Number ;
|
||||||
|
|
||||||
masculine = Masc ;
|
masculine = Masc ;
|
||||||
feminine = Fem ;
|
feminine = Fem ;
|
||||||
nominative = Types.nominative ;
|
|
||||||
accusative = Types.accusative ;
|
|
||||||
genitive = Types.genitive ;
|
|
||||||
dative = Types.dative ;
|
|
||||||
|
|
||||||
singular = Types.singular ;
|
accusative = <Types.accusative,[]> ;
|
||||||
plural = Types.plural ;
|
genitive = <Types.genitive,[]> ;
|
||||||
prep_a = Types.CPrep P_a ;
|
dative = <Types.dative,[]> ;
|
||||||
prep_de = Types.CPrep Types.P_de ;
|
mkPreposition p = <Acc,p> ;
|
||||||
|
|
||||||
singular = Types.singular ;
|
singular = Types.singular ;
|
||||||
plural = Types.plural ;
|
plural = Types.plural ;
|
||||||
|
|
||||||
mkN a b g = mkCNomIrreg a b g ** {lock_N = <>} ;
|
mkN x y g = mkCNomIrreg 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 = <>} ;
|
||||||
|
|
||||||
nVino = \vino -> mkCNom (nomVino vino) masculine ** {lock_N = <>} ;
|
mkN2 = \n,p -> n ** {lock_N2 = <> ; c = p.p1 ; s2 = p.p2} ;
|
||||||
nRana = \rana -> mkCNom (nomVino rana) feminine ** {lock_N = <>} ;
|
deN2 n = mkN2 n genitive ;
|
||||||
nPilar = \x,g -> mkCNom (nomPilar x) g ** {lock_N = <>} ;
|
aN2 n = mkN2 n dative ;
|
||||||
nTram = \tram,g -> mkCNom (nomTram tram) g ** {lock_N = <>} ;
|
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c = p.p1 ; s2 = p.p2 ; c3 = q.p1 ; s3 = q.p2} ;
|
||||||
|
|
||||||
funPrep = \n,p -> n ** complement p ** {lock_N2 = <>} ;
|
|
||||||
funCase = \n,p -> n ** complementCas p ** {lock_N2 = <>} ;
|
|
||||||
funDe a = funGen a ** {lock_N2 = <>} ;
|
|
||||||
mkPN s g = mkProperName s g ** {lock_PN = <>} ;
|
|
||||||
mkCN = UseN ;
|
|
||||||
mkNP s g = UsePN (mkPN s g) ;
|
|
||||||
|
|
||||||
Position = Bool ;
|
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||||
prepos = adjPre ;
|
mkNP x g n = let np = mkNameNounPhrase x g in
|
||||||
postpos = adjPost ;
|
{s = np.s ; g = np.g ; p = np.p ; c = np.c ; n = n ; lock_NP = <>} ;
|
||||||
mkA1 = \x,y,z,u,v,p -> mkAdjective (mkAdj x y z u v) p ** {lock_A1 = <>} ;
|
|
||||||
adj1Solo = \a,p -> mkAdjective (adjSolo a) p ** {lock_A1 = <>} ;
|
|
||||||
adj1Util = \a,b,p -> mkAdjective (adjUtil a b) p ** {lock_A1 = <>} ;
|
|
||||||
adj1Blu = \a,p -> mkAdjective (adjBlu a) p ** {lock_A1 = <>} ;
|
|
||||||
mkA2 = \a,p,c -> mkAdjCompl a postpos {s2 = p ; c = c} ** {lock_A2 = <>} ;
|
|
||||||
mkADeg = \b,m -> mkAdjDegr (mkAdjComp b.s m.s) b.p ** {lock_ADeg = <>} ;
|
|
||||||
aSolo = \a,p -> mkAdjDegrLong (adjSolo a) p ** {lock_ADeg = <>} ;
|
|
||||||
aUtil = \a,b,p -> mkAdjDegrLong (adjUtil a b) p ** {lock_ADeg = <>} ;
|
|
||||||
aBlu = \a,p -> mkAdjDegrLong (adjBlu a) p ** {lock_ADeg = <>} ;
|
|
||||||
apSolo a p = adj1Solo a p ** {lock_AP = <>} ;
|
|
||||||
apUtil a b p = adj1Util a b p ** {lock_AP = <>} ;
|
|
||||||
apBlu a p = adj1Blu a p ** {lock_AP = <>} ;
|
|
||||||
|
|
||||||
-- mkV a b c d e f g h i = mkVerbPres a b c d e f g h i ** {lock_V = <>} ;
|
mkA a b c d e = mkAdj a b c d e ** {p = False ; lock_A = <>} ;
|
||||||
vAmar x = verbPres (zurrar_3 x) AHabere ** {lock_V = <>} ;
|
regA a = mkAdjReg a ** {p = False ; lock_A = <>} ;
|
||||||
vVender x = verbPres (vender_4 x) AHabere ** {lock_V = <>} ;
|
prefA a = {s = a.s ; p = True ; lock_A = <>} ;
|
||||||
-- vFinire x = verbFinire x ** {lock_V = <>} ;
|
|
||||||
-- vCorrere x y = verbCorrere x y ** {lock_V = <>} ;
|
|
||||||
vSer = verbSer ** {lock_V = <>} ;
|
|
||||||
vHaber = verbHaber ** {lock_V = <>} ;
|
|
||||||
mkV2 a b c = mkTransVerb a b c ** {lock_V2 = <>} ;
|
|
||||||
tvDir c = mkTransVerbDir c ** {lock_V2 = <>} ;
|
|
||||||
|
|
||||||
averCosa = \fame ->
|
mkA2 a p = a ** {c = p.p1 ; s2 = p.p2 ; lock_A2 = <>} ;
|
||||||
{s = let {aver = vHaber.s} in \\v => aver ! v ++ fame} **
|
|
||||||
{aux=AHabere ; lock_V = <>} ;
|
|
||||||
averCosaDe = \fame -> mkV2 (averCosa fame) [] prep_de ** {lock_TV = <>} ;
|
|
||||||
|
|
||||||
}
|
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 = <>} ;
|
||||||
|
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 = <>} ;
|
||||||
|
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||||
|
|
||||||
|
regV x = -- cortar actuar cazar guiar pagar sacar
|
||||||
|
let
|
||||||
|
ar = Predef.dp 2 x ;
|
||||||
|
z = Predef.dp 1 (Predef.tk 2 x) ;
|
||||||
|
verb = case ar of {
|
||||||
|
"ir" => vivir_7 x ;
|
||||||
|
"er" => deber_6 x ;
|
||||||
|
_ => case z of {
|
||||||
|
"u" => actuar_9 x ;
|
||||||
|
"z" => cazar_21 x ;
|
||||||
|
"i" => guiar_43 x ;
|
||||||
|
"g" => pagar_53 x ;
|
||||||
|
"c" => sacar_72 x ;
|
||||||
|
_ => cortar_5 x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in verbPres verb AHabere ** {lock_V = <>} ;
|
||||||
|
|
||||||
|
mkV2 v p = {s = v.s ; aux = v.aux ; s2 = p.p2 ; c = p.p1 ; 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 = <>} ;
|
||||||
|
dirV3 v p = mkV3 v accusative p ;
|
||||||
|
dirdirV3 v = dirV3 v dative ;
|
||||||
|
|
||||||
|
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 ; lock_VV = <>} ;
|
||||||
|
deVV v = v ** {c = genitive.p1 ; lock_VV = <>} ;
|
||||||
|
aVV v = v ** {c = dative.p1 ; 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 = <>} ;
|
||||||
|
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 = <>} ;
|
||||||
|
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 = <>} ;
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|||||||
Reference in New Issue
Block a user