You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Screenshots
If applicable, add screenshots to help explain your problem.
Java version
Tested with JDK 8 and 13.
Additional context
It seems that in the original SimpleNLG there is a test in which it selects the appropriate verb. See the method testWhatObjectInterrogative() at line 814. The same goes for a Dutch sentence, configured like this:
Lexicon lexicon = new simplenlg.lexicon.dutch.XMLLexicon();
NLGFactory nlg = new NLGFactory(lexicon);
Realiser realiser = new Realiser();
SPhraseSpec phrase = nlg.createClause();
NPPhraseSpec subject = nlg.createNounPhrase("Jij");
subject.setFeature(Feature.PRONOMINAL, true);
subject.setFeature(Feature.PERSON, Person.SECOND);
phrase.setSubject(subject);
phrase.setVerb("doen");
phrase.setObject("dat");
phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHY);
phrase.setFeature(Feature.TENSE, Tense.PRESENT);
String result = realiser.realiseSentence(phrase);
The result: Waarom doet jij dat?, the expected result is Waarom doe jij dat?
For the What do you think about John? sentence, the contents of the realization:
Describe the bug
When creating an interrogative type question, the verb does not pick the correct form.
To Reproduce
Steps to reproduce the behavior:
The result is:
Expected behavior
The result should be:
Screenshots
If applicable, add screenshots to help explain your problem.
Java version
Tested with JDK 8 and 13.
Additional context
It seems that in the original SimpleNLG there is a test in which it selects the appropriate verb. See the method
testWhatObjectInterrogative()
at line 814. The same goes for a Dutch sentence, configured like this:The result:
Waarom doet jij dat?
, the expected result isWaarom doe jij dat?
For the
What do you think about John?
sentence, the contents of the realization:SimpleNLG NL:
{realisation=null, category=SENTENCE, features={interrogative=true, textComponents=[InflectedWordElement[what:NOUN], [InflectedWordElement[do:VERB]], [InflectedWordElement[you:PRONOUN]], [InflectedWordElement[think:VERB], [[InflectedWordElement[about:PREPOSITION], [InflectedWordElement[John:ANY]]]]]]}}
Debug: link
Original
{realisation=null, category=SENTENCE, features={interrogative=true, textComponents=[InflectedWordElement[what:PRONOUN], InflectedWordElement[do:VERB], InflectedWordElement[you:PRONOUN], [InflectedWordElement[think:VERB], [[InflectedWordElement[about:PREPOSITION], InflectedWordElement[John:ANY]]]]]}}
Debug: link
It could have to do with that
What
is a pronoun in the one case, and a noun in the other case?The text was updated successfully, but these errors were encountered: