Characteristics of the Spanish language in AX Semantics
In Spanish, you need to know the gender of the noun in order to form the accompanying determiners, adjectives, and numerals correctly.
Spanish has two genders for nouns: masculine and feminine. There are two numbers: singular and plural. Additionally, it only has 1 case for nouns: nominative. But for personal pronouns Spanish has additionally accusative, genitive and dative.
|gender||masculine||el puerto azul |
(the blue port)
|feminine||la casa azul |
(the blue house)
|number||singular||una casa roja |
(a red house)
|plural||dos casas rojas |
(two red houses)
|cases (noun)||nominative||el perro (the dog)|
|cases (pronoun)||nominative||Mario está construyendo una casa. Él está construyendo una casa.|
(Mario is building a house. He is building a house.)
|accusative||María está construyendo una casa. María la construye.|
(Maria is building a house. Maria builds it.)
|genitive||salirse con la suya (to get one's way)|
|dative||María le da a Luigi un libro. María le da un libro.|
(Maria gives Luigi a book. Maria gives him a book.)
|adjectives (noun)||after-noun||el teléfono negro (the black phone)|
|before-noun||el excelente producto (the excellent product)|
|verb tenses||present||escribe (He writes)|
|past (preterite)||escribió (He wrote)|
|imperfect||escribía (He wrote)|
|future||escribirá (He will write)|
The standard order of a noun phrase in Spanish is the following:
preposition + determiner + numeral + noun + adjective.
See for example:
con estos tres libros populares with these three books[pl] popular PREP DET NUM NOUN ADJ "with these three popular books"
For Spanish nouns the lexicon needs to encode gender and determiner changes. If the lexicon entry is missing, the NLG platform tries to find the most probable gender based on heuristics. The plural forms should be added to the lexicon if they are not regular.
Lexicon entries for nouns may also be necessary for inflecting determiners, adjectives and pronouns correctly. They are omitted, if a lexicon entry is required, but missing.
The basic lexicon entry for casa (house) contains:
- gender: f
- inflection table for case and number:
If you need lexicon entries for countries, write to the support about that and you will get them for Spanish with automatic handling of determiners.
In the lexicon the inflection table for gender and number can be encoded, as well as the adjective position (before the noun or after the noun).
For adjective position, the default is "after noun". Certain adjectives should stay before the noun. In that case, "before noun" has to be selected in the lexicon. For instance, limiting adjectives which define a number or amount of a noun:
Hay pocas naranjas. (There are few oranges.) Tengo menos dinero. (I have less money.)
The most common verbs are encoded in our software. If a verb inflects the wrong way, you should add it to the lexicon.
The AX NLG platform supports the following determiners for Spanish: definite, indefinite, demonstrative, distal, medial, and possessive.
The noun will automatically agree with the numeral number when a numeral variable is used. Four types of numerals are possible on the AX NLG platform: cardinal, cardinal as digit, ordinal, and ordinal as digit.
|el noveno día|
(the ninth day)
|el 9º día|
(the 9th day)
For Spanish, both cardinal and ordinal numerals are written out until 100, otherwise (above 100) the output is in digit form. Take cardinal numerals for example:
cien coches (one hundred cars) 101 coches (101 cars)
Prepositions and determiners: contractions
If users configure prepositions and determiners in the container, they are automatically adapted, when phonetic assimilation needs to happen. For instance, the prepositions
de are contracted with the definite determiner
al/del cine (to/of the cinema)
Another example, where only the determiner is adapted would be:
un agua (a water)
Here the determiner
una is changed to
un, because the noun
agua starts with a stressed
Determiners can be switched according to lexical information. If you set the determiner switch for a specific noun in the lexicon, it will automatically switch to another determiner when you add the determiner you intend to switch in the container. The container setting for
Alemania in the first example is:
preposition="a", determiner is unset (blank), and
a Alemania (to Germany)
In the second example, the container settings for
Estados Unidos (United States) are still:
preposition="a", determiner is unset (blank), and
case="nominative". However, the determiner switches from
definite, because it is configured in the lexicon entry for
Estados Unidos. As the result, the definite determiner (i.e.
los) is added to
a los Estados Unidos (to the United States)
If the lexicon entry of a country includes a switch from none to definite, there is still a way to use the country without the article (e.g., just "United States"). The determiner will always remain
None by setting
determiner=None in the container. Only an
unset determiner (blank) triggers the switch from
none to another determiner.
The AX NLG platform offers 12 variants of the Spanish language:
- Spain (Standard)
- Costa Rica
The differences between these variants are mostly lexical. In some Spanish language variants (Argentina, Guatemala and Uruguay) voseo - the use of vos as a second-person singular pronoun, along with its associated verbal forms - replaces tuteo, i.e. the use of the pronoun tú and its verbal forms.