Look, this works, but...

REBOL[]

catx: false
dogx: false

dog: [["black" "mutt"]["mangy" "dog"]]
cat: [["fat" "cat"] ["furry" "feline"]]

foo: "My tiger has swallowed a mangy dog and a fat
cat."

words: parse foo "." 
foreach val cat [if found? find words val [catx:
true]]
foreach val dog [if found? find words val [dogx:
true]]

if dogx = true and catx = true [print "OK"]

unfortunately, you cant use AND on a string, so i need
to create non string values (catx and dogx)... i just
thought there  must be some tighter code.  Also, if i
have 100,000 catx and dogx values, do i need to give
them all a initial value of 'false' first?
TB
--- [EMAIL PROTECTED] wrote:
> > > and I need an expression that will come back as
> TRUE
> > > for foo: "Old yeller done gone and ate my fluffy
> > > kitty." or.. if found dog: "old yeller" AND if
> found
> > > "ate" AND if found cat: "fluffy kitty" then
> > > dog-ate-cat: true
> 
> It seems to me you're taking them all for a walk! =)
> 
> I've just followed a course on natural language
> processing, where the
> professor showed us a system he had helped develop
> that interpreted
> sentences and converted them to propositional logic.
> It took about two years
> to make and was very impressive. Your questions make
> it seem as if you want
> the Rebol Mailing list guru's to solve all your
> problems for you.
> 
> Do you have a system you would like to implement in
> Rebol, or are you
> starting from scratch?
> 
> In short: what is your purpose?
> 
> Regards,
> Rachid
> 
> 

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Reply via email to