I'm trying to support queries on my facts with boolean operators. In a
simplified example, if someone asked me to search for
(dog AND cat) OR rabbit)
I want to search for facts that take either of the following two forms
(contains $?c&:(subsetp (create$ dog cat) $?c)
(contains $?c&:(subsetp (c
hi ,
thanks a ton.
The code is working fine and my problem is solved.
Regards,
Mahesh G.
[EMAIL PROTECTED] wrote:
From Java you should use new Value(RU.ATOM, "TRUE")for true, and new Value(RU.ATOM, "FALSE")for false. As a shortcut, there are constants Funcall.TRUE andFuncall.FALSE in the jess.F
SS Value objects.
>
> Ernest, any chance for RU.BOOLEAN and a BooleanValue class?
>
> Good luck!
>
> alan
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Mahesh Gandhe
> Sent: Tuesday, November 27, 2001 12:51
ECTED]]On
Behalf Of Mahesh Gandhe
Sent: Tuesday, November 27, 2001 12:51 PM
To: [EMAIL PROTECTED]
Subject: JESS: java.lang.Boolean to Jess Boolean
hi ,
I am writing the java code for the method so that
the method could be invoked in the command line in jess.
The code is as follows
import jess.*;
i
>From Java you should use
new Value(RU.ATOM, "TRUE")
for true, and
new Value(RU.ATOM, "FALSE")
for false. As a shortcut, there are constants Funcall.TRUE and
Funcall.FALSE in the jess.Funcall class.
Note also that String constants in Java (and in Jess) use double
quotes, no
hi ,
I am writing the java code for the method so that
the method could be invoked in the command line in jess.
The code is as follows
import jess.*;import java.lang.*;
public class GreaterThan implements Userfunction { public String getName() { return "my-upcase";} public Value call (ValueVec
The boolean values in Jess are the atoms TRUE and FALSE. There are
boolean constants you can use in the Funcall class --
jess.Funcall.TRUE and Jess.Funcall.FALSE and public static Value
objects with the appropriate values, or just use new Value("TRUE", RU.ATOM).
I think [EMAIL PROTECTED] wrote:
[
Hi Guys,
I'm trying to write a few userfunctions that return boolean. Class Value does not have
a constructor that takes boolean, and RU does not have a boolean field. Is there
anyway around this?
Thanks
Dheeraj
__
Your favorite
Sometimes I think that a short course in Boolean Logic might be applicable
BEFORE one engages in the task of writing a rulebased routine. Remember,
"Boole was no foole." :-)
--
ttfn
IHN
Jim
-
James C. Owen
Knowledge-Based Systems Corporation
4817 Buckskin Driv