Noun phrase : singular specifier with plural noun issue

98 views
Skip to first unread message

Eli

unread,
Apr 25, 2016, 11:36:31 AM4/25/16
to simplenlg
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

Eli

unread,
Apr 25, 2016, 11:37:55 AM4/25/16
to simplenlg
Mea maxima culpa. This is fixed in 4.4.8 according to the changelog. o\
Reply all
Reply to author
Forward
0 new messages