« Return to Thread: Help about ALICE pattern matching

Re: Help about ALICE pattern matching

by mehri :: Rate this Message:

Reply to Author | View in Thread

Look at the pandora tutorial at:

http://www.pandorabots.com/botmaster/en/tutorial?ch=1

That shows some concrete examples with graphs that
help out when looking at the pattern matching
algorithm.

> "Try all remaining
> suffixes of the input
> following "X" to see if one matches".

It states in the document that X is:
(a) an input starting with word "X"

So X is just a word that's part of the user's input.

So if you read as part of the algorithm:
----
Does the Nodemapper contain the key "_"? If so, search
the subgraph rooted at the child node linked by "_".
Try all remaining suffixes of the input following "X"
to see if one matches. If no match was found, try:
----

That means start with the first word following "_" and
continue.

If you find in your tree "_" you start with that and
continue with the rest of your user's input to see if
one matches a <pattern>.

For example if you had:

<category>
<pattern>_ how are you</pattern>
<template>
good
</template>
</category>

And the input was:

"Hello how are you"

You would start at "_" and try and match "how" then
"are" and finally "you" and spit out "good"

If the input was:

"Hello how are me"

It would start at "_" and try and match "how" then
"are" but not match "me" to "you" and not match at
all.

It's difficult but read through it a few times and
it'll eventually gel.

--- musky <muskvar@...> wrote:

>
> hello,
>
> i am a bit confused as to how ALICE does her pattern
> matching.
> I went through the pattern matching page in
> alicebot.org where the matching
> process is compared to searching for a file in the
> file system,i did not
> understand what is meant by:"Try all remaining
> suffixes of the input
> following "X" to see if one matches".
>
> can someone explain the matching will an example.
>
> also why is alice's brain like a spiral.it says that
> the root itself is the
> spiral but isnt the root supposed to be just one
> node?
>
> please help.
>
> thank you in advance.
>
> --
> View this message in context:
>
http://www.nabble.com/Help-about-ALICE-pattern-matching-tp15492938p15492938.html
> Sent from the Alicebot General mailing list archive
> at Nabble.com.
>
> _______________________________________________
> This is the alicebot-general mailing list
> Reply to alicebot-general@...
> Unsubscribe and change preferences at
>
http://list.alicebot.org/mailman/listinfo/alicebot-general
> Learn netiquette at
> http://www.dtcc.edu/cs/rfc1855.html
> Learn to read at http://www.literacy.org/
>



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

_______________________________________________
This is the alicebot-general mailing list
Reply to alicebot-general@...
Unsubscribe and change preferences at http://list.alicebot.org/mailman/listinfo/alicebot-general
Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
Learn to read at http://www.literacy.org/

 « Return to Thread: Help about ALICE pattern matching