Containers
Containers render dynamic parts of a statement. This could be a variable you defined, or a grammatical construct like a verb or pronoun.
Containers are defined areas within statements whose contents come from a specific source (variables) or are further grammatically processed as a unit.
Creating Containers
To create a container select the words you want to put into a container and click on [...] = create container. Now choose the container type and put in the settings.
Using Suggestions
Our software will automatically create suggestions for containers by analyzing the grammatical structures of a text unit and also comparing it with existing or suggested variable nodes. As a result, you will see suggestions for containers, including suggested configuration for variables and grammatical classifications. To convert these suggestions into actual containers you click on create container in the suggestion card.
Container suggestions are currently available for the following languages: Bulgarian (bg-BG), Catalan (ca-ES), Chinese (zh-*), Croatian (hr-*), Czech (cs-*), Danish (da-DK), Dutch (nl-*), English (en-*), Finnish (fi-FI), French (fr-*), German (de-*), Greek (el-GR), Hungarian (hu-HU), Italian (it-IT), Japanese (ja-JP), Korean (ko-KO), Latin (la-VA), Lithuanian (lt-LT), Macedonian (mk-MK), Norwegian Bokmål (nb-NO), Polish (pl-PL), Portuguese (pt-*), Romanian (ro-RO), Russian (ru-RU), Serbian (sr-RS), Slovak (sk-*), Slovenian (sl-SI), Spanish (es-*), Swedish (sv-SE), Ukrainian (uk-UA).
Suggestions are displayed in the branches in which the cursor is currently located.
Changing Container Type
Container types can be changed after creating.
Deleting Containers
With the remove button, you can delete the container without deleting the text in the statement.
Noun Containers
You create a noun container when the main part of the container is a noun. However, the container is not limited to the single noun itself, but you can add the group of words (noun phrases) that directly accompany a noun: prepositions, determiners, numerals, adjectives and the noun itself. These words can either be set in directly or can be generated from data (variables). Each part of speech then has its separate form to add specifications.
Examples of Noun Phrases
The words in a noun container are grammatically adjusted when changes occur in the data that require such modifications. In each language, these dependencies look different, so the changes will have different effects.
- EN
- The sweater is available [in(prep) all(det) five(numeral) beautiful(adjective) colors(noun)]. (!cardinal num affects noun)
- DE
- Die Schwestern räumen die neuen Bücher [in ihr Zimmer].
- Der Kellner räumt die Teller [von seinem Tisch](!possessive determiner adapts to subject and object)
- FR
- La chemise est disponible [en ces cinq couleurs différentes]. (!adj behind noun, gender) (= The shirt is available in these five different colors)
- RU
- Рубашка доступна [во всех пяти разных цветах]. (!preposition adapts to next word and case=prep) (= The shirt is available in all five different colors)
- SV
- Skjortan finns [i dessa fem olika färger]. (!det affects noun) (=The shirt is available in these five different colors.)
- ZH
- [有五种不同的衬衫] (!的 between noun and adj) (= with 5 different shirts)
Parameter for Container Settings in the Tab Noun
Lemma The uninflected form of noun.
- Edit head In the lemma field, the
edit head
icon in the upper right corner helps to define a compound noun's grammar and lexicon. Take "Wartezimmer (waiting room)" for example, if you click onedit head
and hover over "zimmer" (i.e., set "zimmer" as the head), then "Wartezimmer" will share the grammar and lexicon of "zimmer". (see also Language Reference)
- Edit head In the lemma field, the
Role Every container has a grammatical role for the statement. Such a role could be, for example, that this noun is the subject or an object in this sentence. If you name this container you can refer to its grammatical role within the statement (and in some cases also across branches) so that you do not have to set the grammar parameters all over again. Example: In "The shirts are very cheap." the noun phrase "The shirts" is the subject of the sentence and controls the verb. (see also Language Reference)
grammatical case The grammatical case of the container defines its role in a statement. The options differ according to the language.
- EN: nominative (the text) or genitive (the text's); [accusative (them), dative (them) only for pronouns]
- DE: nominative (der Name), genitive (des Namens), accusative (den Namen), dative (dem Namen) [the name]
- FR: nominative (le voiture) [the car]; [accusative (le), dative (lui) only for pronouns]
- RU: nominative (девушка), genitive (девушки), accusative (девушку), dative (девушке), instrumental (девушкой), prepositional (девушке) [woman]
- SV: nominative (tröja), genitive (tröjas) [shirt]; [accusative (honom), dative (honom) only for pronouns]
- ZH: nominative (朋友) [friend]
Is named entity A named entity is a real-world object, such as persons, locations, organizations, products, etc., that can be denoted with a proper name. The marked noun is not added to the missing lexicon entries and disables inflection via grammar prediction or rules. In contrast to the raw-parameter it does look up the lemma in the lexicon and inflects, if an entry exists.
Copy grammar from role With this you can apply the same grammatical settings as in a different container.
number In this field you define whether the noun will appear in singular or plural form.
- EN: singular (the text) or plural (the texts)
- DE: singular (der Text) or plural (die Texte)
- FR: singular (la voiture) or plural (les voitures)
- SL: singular (hiša) or plural (hiše) or dual (hiši) [house]
- SV: singular (tröja) or plural (tröjor)
- ZH: singular (朋友) or plural (朋友们) (rare pluralization)
gender Also the gender of the noun is noted (female, neutral, male, common)
- EN: masculine (he), female (she), neutral (it) (in EN only for pronouns/possessive determiners relevant)
- DE: masculine (der Text), female (die Redaktion), neutral (das Ergebnis)
- FR: masculine (le texte), female (la voiture)
- RU: masculine (этот текст), female (эта женщина), neutral (это дело)
- SV: common (en tröja), neutral (ett äpple), masculine (han), female (hon) (fem + masc merged to common, "natural" gender masc/fem only used for pronouns)
- ZH: masculine (他), female (她), neutral (它) (only relevant for pronouns)
Parameter for Container Settings in the Tab Adjective
Adjectives describe nouns and therefore are part of the noun container.
- Use Adjectives from Phrase Variable If you already have built a phrase node in the Transform area you can use it as a source.
- Adjective Conjunctions If you have got more than one adjective what conjunction (or punctuation) should be used for the listing and the last part of the adjective.
Examples for Conjunctions
- EN: The green, embroidered, and knitted sweater. (The use of the serial comma depending on the style guide)
- DE: Wählen Sie eine grüne, gelbe oder blaue Tasche aus!
- FR: les pulls verts, jaunes et bleus
- RU: зеленые, желтые и синие сумки
- SV: de gröna, gula och blå handväskorna
- ZH: 绿色,黄色和蓝色的手袋
You can put words in the list part field, too. Example: If you set in and in the list part and the last part you will get: red and green and yellow and blue. :::
Parameter for Container Settings in the Tab Numeral
The source of the numeral is always a variable node, that has to be delivered as a digit. You can choose between ordinal (position) or cardinal (quantity) representations and if the numerals should be written out (ordinal, cardinal) or rendered as a digit (ordinal digit, cardinal digit).
written out: He buys two cokes. / [...]one coke. / ... his third coke.
as a digit: He buys 2 cokes. / He buys 1 coke. / He buys his 3rd coke.
FI: Numerals inflect (for case and number) kaksi omenaa (two apples) / kahden omenan (of two apples)
Numeral Type ordinal or cardinal
ordinal | cardinal | |
---|---|---|
digit | 3rd | 3 |
text | third | three |
text | dritte/dritter/drittes | drei |
text | troisième(s) | trois |
text | третий/третья/третье | три |
text | tredje | tre |
text | 第三 | 三 |
Parameter for Container Settings in the Tab Determiner
A determiner is used to show which thing is being referred to. A determiner is a word that is usually set before a noun (depends on language) and that often is the first of the noun group. There are different types of determiners, e.g. articles, demonstratives, possessives or numerals.
You can choose the type of determiner
- Definite determiner the text (DE: der Text, FR: le texte, SV: den intressanta texten)
- Demonstrative determiner this text (DE: dieser Text, FR: ce texte, RU: этот текст, SV: denna text, ZH: 该文本)
- Indefinite a text (DE: ein Text, FR: un texte, SV: en text)
- Not no text (DE: kein Text, RU: никакой текст)
- Every every text (DE: jeder Text, RU: каждый текст)
- Which which text (DE: welcher Text)
- Both both texts (DE: beide Texte)
- Some some texts (DE: einige Texte)
- Any any text
- Many many texts (DE: viele Texte)
- Personal 2nd Plural your text
- Possessive: 1st Singular or Plural my/our text, 2nd Singular or Plural your/your text, 3rd Masculine/Feminine/Neutral for Singular and Plural nouns: his/her/its/their text
- Distal RU тот текст
- Medial ES ese texto
- All RU весь текст
- Possessive_reflexive RU свой текст
Possessive Target Possessive determiners need two references, since they indicate both the person who possesses and the object that belongs to the person. At this position, you can define for the 3rd person's determiner to which container the possessive target refers and therefore where the grammatical information comes from by setting the appropriate role name.
Examples of Possessive Determiners
- EN: The man (possessive target) takes his bike. The woman takes her bike. The children do their homework.
- DE: Der Mann (possessive target) nimmt seinen Rucksack. Der Mann nimmt seine Tasche. Die Frau nimmt ihren Rucksack. Die Frau nimmt ihre Tasche.
- FR: L'homme prend son vélo.
- RU: Девушка ворует его велосипед.
- SV: Mannen tar sin cykel.
- ZH: 该名男子骑着他的自行车。
Parameter for Container Settings in the Tab Preposition
This is just static text you have to fill out with a suitable preposition (e.g. in, at, for, ...).
Verb Containers
In verb containers, the (finite) verb in a sentence is managed. This kind of container has only grammatical functions: It is not possible to insert content from data for this type of container.
Parameter for Container Settings in the Tab Verb
Lemma: At this point, the form of the verb is stored, which is used in a dictionary. The software can look up the lemma with the annotate feature or you can enter it yourself.
Role: cf Noun container
Copy grammar from role A verb gets grammar information (number, but depending on language also gender) from the subject. You can select the noun container that represents the subject in this statement. If you leave this field empty you have to fill out the specifications below.
number singular or plural
gender In some languages the form of the verb depends also on the gender of the subject. (e.g. RU "делал/делала/делало" = he/she/it did)
person 1st person (I or we), 2nd person (you) and 3rd person (she/it/he and they)
tense
- EN: Present (they have), Past (they had), Past Participle (they have had), Gerund (having)
- DE: Present (er/sie geht), Past (er/sie ging)
- FR: Present (Il/Elle/On va), Past (Il/Elle/On alla), Imperfect (Il/Elle/On allait)
- RU: Present (он/она/оно делает), Past (он делал), Future (он/она/оно будет делать)
- SV: Present (kallar), Past (kallade)
- ZH: Present (他/她 找到), Past (他/她 找到了)
Pronoun Containers
In a pronoun container it is set that a noun (in form of single words or groups) or the content of a variable is represented by a pronoun (personal or demonstrative pronoun). The nouns can be taken from the data via a variable (From variable), directly entered (From noun) or derived from a different container (From role).
Parameter for Container Settings
- Personal pronouns (he/she/it), (DE: er/sie/es, FR: il/elle/on, RU: он/она/оно, SV: han/hon/det/den, ZH: 他/她/它)
- Demonstrative pronouns (this), (DE: dieser/diese/dieses, FR: celui-ci/celle-ci, ZH: 该, RU: который/которая/которое [actually rather interrogative/relative])
- Demonstrative pronouns 2 DE: der/die/das, FR: lequel/laquelle, SV: som, ZH: 谁
- Indefinite pronouns DE: einer/eine/eines
- Which (Interrogative) (DE: welcher/welche/welches, RU: какой/какая/какое, ZH: 哪)
- Medial FR: celui/celle
- Reflexive pronoun RU: себя
- there are some more for certain languages
Grammar Prediction
You will find how a container was rendered, when you hover over the container parts at the top of the container. There are 3 possibilities: lexicon, statistical model, and rules. First, the AX NLG platform looks up a noun, adjective or verb in the lexicon. If it is not found in the lexicon (both project-specific and global), the lemma is either rendered via rules or statistics. Statistics means that the feature Grammar Prediction is used. It can be enabled in the Project Settings and covers all aspects of a word that are dependent on grammatical information: gender, animacy (where relevant), number, and inflection. Therefore, it reduces the need of creating lexicon entries or having to use head nouns. If Grammar Prediction is activated for a project, it is the first fallback, if no lexicon entry exists. Then if no rendering via statistics is possible or necessary, the platform fallbacks to rule-based rendering (e.g. English is so regular that no grammar prediction is needed and rules are sufficient). Noun inflection via Grammar Prediction or rules can be disabled on container-level by marking the noun as a named entity. Other predicted grammatical information like gender, animacy, and number (which may be needed for example for rendering the corresponding determiner) is still used.
Method | Description | Usage |
---|---|---|
Lexicon | The first attempt is to look up the word (noun, adjective, or verb) in the lexicon (project-specific and global). | When a lexicon entry for the word exists. |
Statistics | Uses Grammar Prediction for predicting gender, animacy, number, and inflection. | When the word is not in the lexicon and Grammar Prediction is enabled in the settings and supported for the language and POS. |
Rules | If the word is not found in the lexicon or through statistics, the platform uses rules. For languages with regular grammar (e.g. English), rules are sufficient. | When the word is not in the lexicon, or Grammar Prediction isn’t activated or available/necessary. |
Configuring all Types of Containers in the General Settings
You can add formatting to each container in the tab general settings. From the menu Output Text Formatting, you can choose whether the container will just transfer the formatting of the variable (or of the statement text entered) (auto), will capitalize the first word of the container (Capitalize), output all text in the container in Uppercase or Lower Case or just leave out all formatting and inflection (raw).
You can also decide here if a branch should be skipped if this container is empty. This way you can ensure that a container without value does not create an incorrect phrase.
Referring to Containers
Roles are defined to serve as references for the settings in containers. As a general rule, a container can reference any other container in the record via the role, as long as it also occurs in the rendered statement. If you cannot refer to a container at a certain point, this is automatically blocked in the user interface.
The exact rules for this
- A role can be used both upwards and downwards in the branching hierarchy. Only in sibling branches of the defining container can a role not be used (since these containers are never rendered simultaneously).
- If a container of a branching defines a role and this role is used outside the branch, all branches of the branching must contain a container that defines this role.