arthurfiddich / simplenlg

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

"there" as StringElement #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Below produces "there is data dropouts" instead of "there are data dropouts", 
because "there" is a StringElement.  Probably should be fixed to avoid 
frustrating users

        NLGElement dataDropout2 = nlgFactory.createNLGElement("data dropouts");
        dataDropout2.setPlural(true);
        SPhraseSpec sentence2 = nlgFactory.createClause();
        sentence2.setSubject(nlgFactory.createStringElement("there"));
        sentence2.setVerb("be");
        sentence2.setObject(dataDropout2);

Original issue reported on code.google.com by ehud.rei...@gmail.com on 25 Mar 2011 at 9:10

GoogleCodeExporter commented 8 years ago
someone (Albert?) has fixed this, so above test runs

Original comment by ehud.rei...@gmail.com on 28 Mar 2011 at 9:55

GoogleCodeExporter commented 8 years ago
Mistake on my part, had not been fixed.  Changed NLGFactory.createNLGElement so 
that if a StringElement is specified, the factory checks if the string is a 
word, and if so runs it through the lexicon

Original comment by ehud.rei...@gmail.com on 28 Mar 2011 at 10:27