JESS: Coding (writing rules) Backward Chaining in Java

2004-08-06 Thread calvin pevee
Hi, Using exampl from Jess In Action, I code the folloing in Java, but ios is not working, it throws null pointer exception of variable Result. PLease advice. //RULE merlinMain.r.clear(); merlinMain.r.executeCommand("(do-backward-chaining r-adv-type)");

JESS: How to match Pattern in Facts

2004-08-08 Thread calvin pevee
Hi, Assume I have 2 facts: (assert (adv-attribute radio-advertisement low-budget)) (assert (adv-attribute radio-advertisement control-message-frequency)) How can I extract these 2 facts out? I tried:- (assert (adv-attribute radio-advertisement ?x)) (defrule (adv-attribute radio-advertisement

Re: JESS: Coding (writing rules) Backward Chaining in Java

2004-08-08 Thread calvin pevee
Hi, Thanks for the advice, I took the code and compile it in JessTab in Protigi, and fix error from there. This is the Java code which can be compiled. Well, I am a beginner into Jess, as well as rule based programming. I wish that I have more time to study (which I should) more fundamental stuf

Re: AW: JESS: How to match Pattern in Facts

2004-08-09 Thread calvin pevee
Hi, I think is only a typo. I run the program in Protege and got the following output:- Jess> (batch test.clp) <== Activation: MAIN::print-adv-attributes-facts : f-1 <== Activation: MAIN::print-adv-attributes-facts : f-0 ==> Activation: MAIN::print-adv-attributes-facts : f-0 ==> Activation: M

Re: AW: JESS: How to match Pattern in Facts

2004-08-10 Thread calvin pevee
Hi, Need help here. I do not know how to get the facts out when it is embeded in Java. I ran the code in Java:- r.executeCommand("(deftemplate adv-attributes" + "(slot id)" + "(multislot attribs))"); r.executeCommand("(defrule show-adv-attributes" + //"?fact

Re: AW: JESS: How to match Pattern in Facts

2004-08-11 Thread calvin pevee
) f-1 (MAIN::adv-attributes (id 1) (attribs low-budget)) f-2 (MAIN::adv-attributes (id 2) (attribs control-message-frequency)) For a total of 3 facts. --- [EMAIL PROTECTED] wrote: > I think calvin pevee wrote: > > > > r.executeCommand("(defrule show-adv-attributes" +

RE: AW: JESS: How to match Pattern in Facts

2004-08-12 Thread calvin pevee
Hi, I am back, I tried out the store/fetch. BUT, it return me only the latest fired facts. Why? I need both (any) facts which is fired. Is like the variable (fact-in-java) is overwritten. How can I get the activated facts out, I mean all the fired facts? Please advice. merlinMain.r.executeComman

RE: AW: JESS: How to match Pattern in Facts [details]

2004-08-15 Thread calvin pevee
Hi, I have made significant progress in my task, thanks for the help, I really appreciate it. I might not have the most efficient coding, but things are working as expected now. One might come up with the answer I asked, but I think he has to read all the article carefully in JIA and online he

JESS: load-project is slow over the LAN

2004-10-18 Thread calvin pevee
Hi, My objective is to load Protege KB into Java and later display it. I am using the method as below to load:- r.addUserpackage(new JessTabFunctions()); r.executeCommand("(load-project http://10.18.50.87/upload/search.pprj)");} But, later on I found that the loading takes time, worse when laodi

RE: JESS: load-project is slow over the LAN

2004-10-20 Thread calvin pevee
Hi, Using your guidance, (1) I have change protege.jar to Protege 3.0 Beta. on local machine, it is faster by 200ms, I am sure this amount of time will be more significant when loading across network. (2) As for building KB into Java Beans, I am looking at beangenerator.jar, is this the plugin