How to get subject pronoun with SimpleNLG?

98 Views Asked by At
val lexicon: Lexicon = Lexicon.getDefaultLexicon()
val realised: Realiser = Realiser(lexicon)
val word: WordElement = lexicon.getWord("I", LexicalCategory.PRONOUN)
val inflected = InflectedWordElement(word)
inflected.setFeature(Feature.PERSON, Person.THIRD)
inflected.setFeature(Feature.NUMBER, NumberAgreement.PLURAL)
realised.realise(inflected).realisation

I want to get "they" but I get "them". I tried to find some feature "SUBJECT" or "OBJECT" but I found only "POSSESIVE" and "REFLEXIVE". How can I clarify my condition for according only subject pronoun?

1

There are 1 best solutions below

0
On
inflected.setFeature(
    InternalFeature.DISCOURSE_FUNCTION,
    DiscourseFunction.SUBJECT
)

This string before last one resolves my problem. Unfortunately, the documentation doesn't include it.