Greetings,
I'm going for "the most detailed approach" (as the wiki says) to get a noun phrase like "his pets".
NPPhraseSpec specifier = this.phraseFactory.createNounPhrase("Johny");
specifier.setFeature(Feature.NUMBER, NumberAgreement.SINGULAR);
specifier.setFeature(LexicalFeature.GENDER, Gender.MASCULINE);
specifier.setFeature(Feature.PRONOMINAL, true);
specifier.setFeature(Feature.POSSESSIVE, true);
NPPhraseSpec thing = this.phraseFactory.createNounPhrase("pet");
thing.setFeature(Feature.NUMBER, NumberAgreement.PLURAL);
thing.setDeterminer(specifier);
ps(thing, false);
This generates "their pets". Removing the PLURAL feature on 'thing' generates "his pet".
The SINGULAR feature on the specifier appears to be useless, adding it doesn't change anything.
Is this a legitimate bug or is there another way to generate "his pets" ?
Hardcoding "his" is a scary solution for me, this would be duplicating the pronoun realization parts of SimpleNLG inside my codebase.
Best regards,
Eli