-
Notifications
You must be signed in to change notification settings - Fork 1
07 – Setting the grammatical case
As in German, words are inflected differently according to their grammatical case, the case can be set by the user.
-
Nominative: Default case
-
Genitive:
noun.setFeature(InternalFeature.CASE, DiscourseFunction.GENITIVE);
to aNounPhrase
-
Dative: For dative, you have 2 options:
- Either, you set the
NounPhrase
which should be in dative as an indirect object to the whole sentence:sentence.setIndirectObject(noun);
- Or, you set, analogously to genitive, dative as a feature to a
NounPhrase
:noun.setFeature(InternalFeature.CASE, DiscourseFunction.INDIRECT_OBJECT);
- Either, you set the
-
Accusative: The same 2 options as for dative are also given for genitive:
- Either, you set the
NounPhrase
which should be in accusative as an direct object to the whole sentence:sentence.setObject(noun);
- Or, you set, analogously to genitive, accusative as a feature to a
NounPhrase
:noun.setFeature(InternalFeature.CASE, DiscourseFunction.OBJECT);
- Either, you set the
Generally, the dative object is placed before the accusative object, and thus in SimpleNLG German, it is implemented like this as well. Even though, there are cases when the accusative object has to be set before the dative object. This is currently not covered by SimpleNLG German. Nevertheless, sentences with such structure can be realised with a workaround. If an accusative object before the dative object is needed, INDIRECT_OBJECT
can be set as a CASE
feature to the dative object, and after that, the dative object can be set as a post-modifier to the accusative object-