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.

grammatical namevaluesexamples
gendermasculineel puerto azul
(the blue port)
femininela casa azul
(the blue house)
numbersingularuna casa roja
(a red house)
pluraldos casas rojas
(two red houses)
cases (noun)nominativeel perro (the dog)
cases (pronoun)nominativeMario está construyendo una casa. Él está construyendo una casa.
(Mario is building a house. He is building a house.)
accusativeMaría está construyendo una casa. María la construye.
(Maria is building a house. Maria builds it.)
genitivesalirse con la suya (to get one's way)
dativeMarí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-nounel teléfono negro (the black phone)
before-nounel excelente producto (the excellent product)
verb tensespresentescribe (He writes)
past (preterite)escribió (He wrote)
imperfectescribía (He wrote)
futureescribirá (He will write)
gerundescribiendo (writing)

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.

Container settings


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.

textnueve días
(nine days)
el noveno día
(the ninth day)
digit9 días
(9 days)
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 a and de are contracted with the definite determiner el:

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 a.


Determiner switch

Determiners can be switched depending on the noun.

In the sentence

Viajaban de Berlín a los Estados Unidos.
(They were traveling from Berlin to the US.)

the settings for the container for Estados Unidos are: determiner="None", and case="nominative". Here a determiner switch happens from none to definite.

Language Variants

The AX NLG platform offers 12 variants of the Spanish language:

  • Spain (Standard)
  • Argentina
  • Bolivia
  • Chile
  • Colombia
  • Costa Rica
  • Ecuador
  • Guatemala
  • Mexico
  • Panama
  • Peru
  • Uruguay

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 and its verbal forms.

Defaults: Some best practices for Spanish nouns with switches

  • If there are definite determiners (e.g., for country names) possible for a noun phrase they should be activated for the container and then the determiner is removed via the lexicon where appropriate. This assumes "with definite article" is the default.