I use jpl libraries to connect prolog and java. In prolog, I can execute query :
?- meaning_forms([apple,is,fruit],X).
output is : X = [is_a(x1, x2), objectx(x1, apple), objectx(x2, fruit)].
But in java, I can’t see output of this query. I tried some code in java :
Variable X = new Variable("X");
Query q4 = new Query("meaning_forms", new Term[]{new Atom("apple,is,fruit"),X});
while ( q4.hasMoreElements() ) {
java.util.Hashtable solution = (Hashtable) q4.nextElement();
System.out.println( "X = " + (Term) solution.get("X"));
}
There is no output in java . Any solution to this case?