AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

difference between <set> and <srai> to create synonyms in AIML2 on Pandorabots?
 
 

I was hoping to use <set> as a way to anticipate synonyms.  For example, the following pattern would be a match for all values in the yes.set file {yeah, yah, y, yep}

<category>
    <
pattern><set>yes</set></pattern>
 <
that>ANYTHING ELSE</that

However, this doesn’t work.  I get a response that interprets my input with the word INTERJECTION instead of a “yes.”

This seems like an appropriate use of <set> from examples (e.g. if I created colors.set with a bunch of colors, one of those colors as an input should come up as a match.)

But I’m not getting the expected behavior.  Am I doing something wrong with this application of <set>?

Should I create <srai>YES</srai> categories instead?  If so, what’s the difference?

 

 
  [ # 1 ]

You can use that method instead of the <srai> perfectly fine for trying to do what you achieve. There is no difference and the end result is the same.

Unfortunately, you didn’t post a complete category so at best guess, I am assuming you are using the ALICE AIML files which contain this for the input of YES:

<category>
<
pattern>YES</pattern>
<
template>
<
srai>INTERJECTION</srai>
</
template>
</
category

This would match what you are seeing. Without seeing the other categories, I can only assume the category which sets your <that> to ANYTHING ELSE is wrong and so your above pattern is not being called.

To investigate it further, I would need to see the full category plus the one that sets <that> to ANYTHING ELSE.

 

 
  [ # 2 ]

Yeah….I realized that I had the Alice AIML files which was probably messing it up….trying to clear the files now to see if I can get the right result….thanks!

 

 
  [ # 3 ]

No problem Tim. If you still struggle though, post back here and I will try to help.

 

 
  login or register to react