Characteristics of the Portuguese language in AX Semantics
In Portuguese, you need to know the gender of the noun in order to form the accompanying determiners, adjectives, and numerals correctly.
Portuguese 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, Portuguese has additionally accusative and dative.
|gender||masculine||o porto azul (the blue port)|
|feminine||a cadeira azul (the blue chair)|
|number||singular||uma casa vermelha (a red house)|
|plural||duas casas vermelhas (two red houses)|
|cases (noun)||nominative||o cão (the dog)|
|cases (pronoun)||nominative||Mário constrói uma casa. Ele constrói uma casa. |
(Mario builds a house. He builds a house.)
|accusative||Mario constrói uma casa. Mario la constrói. |
(Maria builds a house. Maria builds it.)
|dative||Maria dá um livro a Luigi. Maria lhe dá um livro. |
(Maria gives Luigi a book. Maria gives him a book.)
|adjectives (noun)||after-noun||o telefone preto (the black phone)|
|before-noun||o excelente produto (the excellent product)|
|verb tenses||present||ele escreve (he writes)|
|past (preterite)||ele escreveu (He wrote)|
|imperfect||ele escrevia (He wrote)|
|future||ele escreverá (He will write)|
The standard order of a noun phrase in Portuguese is the following:
preposition + determiner + numeral + noun + adjective.
See for example:
com estes três livros populares with these three books[pl] popular PREP DET NUM NOUN ADJ "with these three popular books"
For Portuguese 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 Portuguese 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, some adjectives like bom ("good") or belo ("nice") often precede the noun:
o bom livro (the good book)
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 Portuguese: definite, indefinite, demonstrative, distal, proximal, possessive, and quantifier (every).
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.
|o nono dia|
(the ninth day)
|o 9º dia|
(the 9th day)
For Portuguese, both cardinal and ordinal numerals are written out until 100 on the platform, otherwise (above 100) the output is in digit form. Take cardinal numerals for example:
cem automóveis (one hundred cars) 101 automóveis (101 cars)
If users configure prepositions and determiners in the container, they are automatically adapted, when phonetic assimilation needs to happen. For instance, the preposition
em is contracted with the definite determiner
na cozinha (in the kitchen)
Additionally, if users configure prepositions with demonstrative pronouns or third-person personal pronouns, they will also be automatically adjusted if contractions are applicable. Take the preposition
de for example,
destas [de + estas] (of these) dele [de + ele] (of him)
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
Berlim in the first example is:
preposition="para", determiner is unset (blank), and
para Berlim (to Berlin)
In the second example, the container setting for
preposition="para", determiner is unset (blank), and
case="nominative". However, the determiner switches from
definite, because it is configured in the lexicon entry for
Holanda. As the result, the definite determiner (i.e.
a) is added to
para a Holanda (to the Netherlands)
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 "Netherlands"). 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 2 variants of the Portuguese language:
- Portugal (Standard)
The differences between these variants are mostly lexical. The grammatical difference shows in the forms of the possessive determiners: for example
my book is
o meu livro in Portugal, but
meu livro in Brazil.