I see from this documentation that we can apply the method addComplement on an NLGElement, but when I try this code:
Lexicon lexicon= new XMLLexicon();
NLGFactory factory = new NLGFactory(lexicon);
NLGElement s1 = factory.createSentence("my dog is happy");
s1.addComplement("with me");
I got the following error:
The method addComplement() is undefined for the type NLGElement
So can anyone explain and help if there is an other alternative to add complement on an NLGElement
It seems that the doc is wrong, so what I want to do is not possible. But there is another possibility to add complement from this post