saibu / simplenlg

Automatically exported from code.google.com/p/simplenlg
0 stars 0 forks source link

Possessive specifier of NP gets pluralized too when NP is pluralized #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

NPPhraseSpec sisterNP = nlgFactory.createNounPhrase("sister");
NLGElement word = nlgFactory.createInflectedWord("Albert Einstein", 
LexicalCategory.NOUN);
word.setFeature(LexicalFeature.PROPER, true);
NPPhraseSpec possNP = nlgFactory.createNounPhrase(word);
possNP.setFeature(Feature.POSSESSIVE, true);
sisterNP.setSpecifier(possNP);
System.out.println(realiser.realise(sisterNP));//Albert Einstein's sister
sisterNP.setPlural(true);
System.out.println(realiser.realise(sisterNP));"Albert Einsteins' sisters" 
instead of "Albert Einstein's sisters"
sisterNP.setPlural(false);
possNP.setFeature(LexicalFeature.GENDER, Gender.MASCULINE);
possNP.setFeature(Feature.PRONOMINAL, true);
System.out.println(realiser.realise(sisterNP));//his sister
sisterNP.setPlural(true);
System.out.println(realiser.realise(sisterNP));//"their sisters" instead of 
"his sisters"

What is the expected output? What do you see instead?
a)Albert Einstein's sisters instead of Albert Einsteins' sisters
b)his sisters instead of their sisters

What version of the product are you using? On what operating system?
Latest SVN version on Ubuntu 14.04 with Java 7

Original issue reported on code.google.com by CoNPComp...@googlemail.com on 12 Jul 2014 at 5:43