I am using simpleNLG to find the actual tense of a verb. But i cannot seem to be doing it right, instead of giving the tense of the verb it converts it to present tense :/
public class TenseWas
{
public static void main(String[] args)
{
String word = "ate";
Lexicon lexicon=Lexicon.getDefaultLexicon();
NLGFactory nlgFactory=new NLGFactory(lexicon);
Realiser realiser=new Realiser(lexicon);
SPhraseSpec p=nlgFactory.createClause();
p.setVerb(word);
if(p.getVerb().getFeature(Feature.TENSE) == (Tense.PAST))
{
System.out.println("past");
}
if(p.getVerb().getFeature(Feature.TENSE) == (Tense.FUTURE))
{
System.out.println("future");
}
if(p.getVerb().getFeature(Feature.TENSE) == (Tense.PRESENT))
{
System.out.println("Present");
}
String output=realiser.realiseSentence(p);
System.out.println(output);
}
}
This is what appears in the console:
Eats.