I think [EMAIL PROTECTED] wrote:
>
>
> > Following up my previous message...
> >
> > My system works by asserting a "query" and then letting the rules take
> > over. Strictly within the context of jess, it ends up looking like this:
> >
> > (deftemplate query
> > (slot words))
> >
> > (assert (query (words (create$ Tell me what is in my 401k))))
> >
> > My question is, if I'm in raw Java to collect my input and tokenize it,
> > how do I then assert this template? I tried calling Funcall("assert", ...)
> > with my list, but it seems like I would need to have a nested list in
> > order to do that. I tried this:
> <snip>
> > Why not just use
>
> executeCommand("(assert (...))");
>
> --Sidney
He wants to avoid having Jess re-parse what he's asserting (note that
tricky '401k' token.) As I wrote to him under separate cover, the
following would work:
ValueVector vv = (the multifield you want to parse specially);
Value v = new Value(vv, RU.LIST);
engine.store("myTempValue", v);
engine.executeCommand("(assert (query (words (fetch myTempValue))))");
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (510) 294-2154
Sandia National Labs FAX: (510) 294-2234
Org. 8920, MS 9214 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------