Skip to content

03 – Nouns & Articles

Kira edited this page Apr 14, 2019 · 8 revisions

Articles

Articles must be specified inside a noun phrase or as a determiner, in order to de inflected correctly. Examples:

NPPhraseSpec subject1 = nlgFactory.createNounPhrase("das haus");

NPPhraseSpec subject2 = nlgFactory.createNounPhrase("ein haus");

NPPhraseSpec subject3 = nlgFactory.createNounPhrase("haus");

`subject3.setDeterminer("der");

Plural

For setting a noun to plural, you have 2 options. Either set

setFeature(NumberAgreement.PLURAL, true);

or set

setPlural(true);

to the noun.

Nouns in genitive, dative and accusative

Please refer to chapter 07 – Setting the grammatical case in this tutorial to see how the grammatical case can be set.

Proper nouns

For all proper nouns, as for example company names, please set the corresponding feature to the noun phrase:

setFeature(LexicalFeature.PROPER, true)

Then, the proper noun won't be inflected.