> It's very unlikely that it's this rule that's causing the problem. I
> wonder if this is yet another case of the unbound-variable problem
> that's been reported lately. If you have a rule that uses the value
> of
> a variable before it's defined, Jess will *usually* notice. But
> sometimes it doe
Hi,
I'm having a few problems with getting results from a query that I have
defined:
session.executeCommand("(defquery all-triples " +
"(declare (variables ?sub))" +
"(triple (predicate ?pred)" +
"(subject ?sub)" +
"(object ?obj)))");
I want to get all the predicates and objects for one partic
I think Steffen Luypaert wrote:
>
> I replicated my error to a simple version that can immediately be saved
> to a Jess batch file for execution:
This doesn't give any errors when I run it with Jess 6.1p7, either as
you show it, or modified as I explain below.
> (definstance loan (new Loan foo
I think Rowland Watkins wrote:
>
> try {
> while (res.hasNext())
> {
> Token token = (Token) res.next();
> System.out.println(res.next());
Here you're calling res.next() twice for each iteration of the loop --
i.e., you're throwing half of the matches away without printing
them. Note that 6 is
>
> The reason for the loan is given as "alles", or "any" in German.
>
I translated the complete code to English when I mailed it, but I
missed those it seems. Sorry.
> This doesn't happen for me. I wonder if you're using the latest
> patch
> level (6.1p7) or if you've modified your copy?
>
Hi,
I have been using Jess for a couple of weeks now. I am stuck with some
pattern matching problems. Basically I do this at the jess prompt
> (deftemplate commitment (slot debtor) (slot creditor) (slot cond))
> (assert (commitment (debot Amit) (creditor Jane) (cond money))
> (assert (money))
Ever
Title: RE: JESS: Newbie Question: Pattern Matching ordered facts
Try:
(deftemplate commitment
(slot debtor)
(slot creditor)
(slot cond)
)
(assert (commitment (debtor Amit) (creditor Jane) (cond money)))
(defrule resolve-commitment
(commitment (cond ?x))
=>
(printout t "re
I think Amit Chopra wrote:
>
> > defrule resolve-commitment
>(and (?x) (commitment (cond ?x))) => (printout t "resolved" crlf))
>
> Basically I'm trying to match a condition of the commitment (money)
> with an event (money). If such an event is found, the commitment is
> said to be resol
Thanks for the clarification. That was very prompt.
amit.
[EMAIL PROTECTED] wrote:
I think Amit Chopra wrote:
> defrule resolve-commitment
(and (?x) (commitment (cond ?x))) => (printout t "resolved" crlf))
Basically I'm trying to match a condition of the commitment (money)
with an event (m