|
Author | Topic: multiple matches? (Read 499 times) |
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | multiple matches? « Thread Started on Oct 17, 2011, 6:32pm » | |
whenever i use * as the first word in a pattern it will work but replies with both the specified response but it also includes the catchall response does anyone have a work around for this?
| |
|
Thunder ×[as]× member is offline
![[avatar] [avatar]](http://i1180.photobucket.com/albums/x414/AmyTheBot99/brain001.jpg)
Better living through reckless experimentation!
Joined: Sept 2005 Gender: Male  Posts: 3,547 Location: Pennsylvania, USA Karma: 18 |  | Re: multiple matches? « Reply #1 on Oct 18, 2011, 7:52am » | |
Of the two wildcards, * or <star/> and _ or underscore, underscore is the more powerful of the two and will replace anything, including an exact match. You want to be cautious using underscore because it can sometimes change the response to other patterns you didn't intend to alter.
|
|
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #2 on Oct 18, 2011, 1:35pm » | |
im using * for both though????
| |
|
Thunder ×[as]× member is offline
![[avatar] [avatar]](http://i1180.photobucket.com/albums/x414/AmyTheBot99/brain001.jpg)
Better living through reckless experimentation!
Joined: Sept 2005 Gender: Male  Posts: 3,547 Location: Pennsylvania, USA Karma: 18 |  | Re: multiple matches? « Reply #3 on Oct 18, 2011, 4:17pm » | |
Oct 18, 2011, 1:35pm, mceggy wrote:| im using * for both though???? |
|
If you'd post an example, it would help us to understand.
If you're using two wild cards in the same response, call the first one <star/> and the second one <star index="2"/>.
For example:
<category> <pattern>I * AND THOUGHT *</pattern>
<template>What made you think <star index="2"/>?</template> </category>
-or-
<category> <pattern>I * AND THOUGHT *</pattern>
<template>What about <star/> made you think <star index="2"/>?</template> </category>
-or-
<category> <pattern>I * AND THOUGHT *</pattern>
<template>What about <person/> made you think <star index="2"/>?</template> </category>
Do you understand the difference between <star/> and <person/>?
Does that help?
|
|
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #4 on Oct 18, 2011, 5:11pm » | |
i have a catchall one that is <pattern>*</pattern> and several others that are <pattern>* bla bla bla</pattern> but it responds with all of them to anything that starts with *
| |
|
Thunder ×[as]× member is offline
![[avatar] [avatar]](http://i1180.photobucket.com/albums/x414/AmyTheBot99/brain001.jpg)
Better living through reckless experimentation!
Joined: Sept 2005 Gender: Male  Posts: 3,547 Location: Pennsylvania, USA Karma: 18 |  | Re: multiple matches? « Reply #5 on Oct 18, 2011, 8:04pm » | |
Oct 18, 2011, 5:11pm, mceggy wrote:| i have a catchall one that is <pattern>*</pattern> and several others that are <pattern>* bla bla bla</pattern> but it responds with all of them to anything that starts with * |
|
What version are you using, or did you get the "No initial content" bot and you're starting from scratch?
|
|
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #6 on Oct 18, 2011, 8:06pm » | |
no initial content
| |
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #7 on Oct 18, 2011, 8:06pm » | |
its at http://mceggy.tk if you want to take a look
| |
|
Thunder ×[as]× member is offline
![[avatar] [avatar]](http://i1180.photobucket.com/albums/x414/AmyTheBot99/brain001.jpg)
Better living through reckless experimentation!
Joined: Sept 2005 Gender: Male  Posts: 3,547 Location: Pennsylvania, USA Karma: 18 |  | Re: multiple matches? « Reply #8 on Oct 18, 2011, 8:26pm » | |
One of the resident "wizards" may have an idea. Without seeing your files, I'd have a hard time guessing at what's causing the conflict.
|
|
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #9 on Oct 18, 2011, 8:31pm » | |
i just went and got rid of the catchall prob solved...kinda
| |
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #10 on Oct 18, 2011, 8:34pm » | |
lol i didnt mean literally * bla bla bla
| |
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #11 on Oct 18, 2011, 8:37pm » | |
unrelated: why did the folder icon catch fire
| |
|
mrmortimer ×[as]× member is offline
![[avatar] [avatar]](http://www.geekcavecreations.com/images/Oemlogo.jpg)
Comforting the Disturbed and Disturbing the Comfortable
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: May 2010 Gender: Male  Posts: 345 Location: Nevada, USA Karma: 2 |  | Re: multiple matches? « Reply #12 on Oct 19, 2011, 1:35am » | |
lol. That indicates a "hot topic", with more than ten posts in the thread.
|
Safe, Reliable Insanity, Since 1961! |
|
mrmortimer ×[as]× member is offline
![[avatar] [avatar]](http://www.geekcavecreations.com/images/Oemlogo.jpg)
Comforting the Disturbed and Disturbing the Comfortable
![[homepage] [homepage]](http://images.proboards.com/buttons/www_sm.gif) Joined: May 2010 Gender: Male  Posts: 345 Location: Nevada, USA Karma: 2 |  | Re: multiple matches? « Reply #13 on Oct 19, 2011, 1:46am » | |
The only problem with eliminating the catch-all category is that, if a user inputs something unexpected, then the bot won't return a response. When I tried to chat with Mc Eggy, I received several "blank" responses, which most users will find disappointing, and will cause them to leave the page. It's far better to have your bot give some sort of response to every input given, even if it's a simple "I don't understand".
If at all possible, please give us a specific example of the issue your bot is having, along with the category/categories that seem(s) to be triggering the problem. From there, we can probably find a solution.
|
Safe, Reliable Insanity, Since 1961! |
|
mceggy ×[]× member is offline
Joined: Oct 2011 Gender: Male  Posts: 30 Karma: 0 |  | Re: multiple matches? « Reply #14 on Oct 19, 2011, 4:07pm » | |
ex. from my test bot
<category> <pattern>*</pattern> <template>confusion statement</template> </category>
<category> <pattern>* something</pattern> <template>somthing <star/> else</template> </category>
human:* McEggy:confusion statement
human:* something McEggy:confusion statement? something * else.
| |
|
|