-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<that> not working #16
Comments
Hey, I tried the code for
After changing this two, I'm able to get answer for some But one more issue is there. Like this if any of the messages with * is available both in the This issue occurs only if the Can you please tell me how to fix this issue. |
Just back from an overseas biz trip, let me write some tests and see what is happening |
@keiffster welcome back mate. A little change in the issue. There is no issue if the same pattern available in In the that.aiml file, we are using |
Check out the new release 0.5.0 which has a rewritten pattern matching parser which is much better at topic and that handling |
Hi @keiffster I tested the latest version. Still you didn't add '?' symbol at the end for some of the tag. So it is returning the wrong answer only. For my issue, I tested with the same message. Now it is returning the message from that tag. But when I checked the aiml files it seems like you removed the other category in the aiml file. Can't we use both the categories and get the answer from that tag? |
Hey
I’ve reverted the test code back to your original, I left it commented out by mistake while I was testing, and wanted to try a couple of combinations to see what is happening, so yes you can use both variants
I’ve corrected it and check in the reverted version
I’m not sure what you mean by the ?, can you give me an example
K
…On 16 Mar 2017, 16:17 +0000, newdev7 ***@***.***>, wrote:
Hi @keiffster I tested the latest version. Still you didn't add '?' symbol at the end for some of the tag. So it is returning the wrong answer only.
For my issue, I tested with the same message. Now it is returning the message from that tag. But when I checked the aiml files it seems like you removed the other category in the aiml file.
Can't we use both the categories and get the answer from that tag?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hey @keiffster check the following flow
In the that.aiml, we have one category with pattern And the second one is about ? symbol at the end of the text. Check the following example.
In the category for pattern |
In the first instance I think its all down to precedence, * is always treat as lower priority than actual word. For AIML 2 the priority is
$ - Does an exact word match
# - Zero or more
_ - 1 or more
word - Any word, set or bot
^ - Zero or more
* - 1 or more
So you see that * is the last thing that gets matched, change the pattern to _ YEARS and it will match first, and then leave 3 * to match anything else
In the second instance could you send me an example grammar you are using and I will look at it in detail
K
…On 20 Mar 2017, 13:36 +0000, newdev7 ***@***.***>, wrote:
Hey @keiffster check the following flow
Hi, how can i help you today?
>>> I'm married
How long have you been married ?
>>> 3 years
Just three?
>>>
In the that.aiml, we have one category with pattern * YEARS for <that> tag How long have you been married ?. It has the template Congratulations!. So if the user gives 3 years for the previous question like in the sample, it has to return Congratulations!. But it is returning Just three?. Because in other aiml file, we have one category with pattern 3 * and it has the template Just three?. Instead of returning Congratulations!, it is returning Just three?. I have tested in the latest version also. It is returning like this only.
And the second one is about ? symbol at the end of the text. Check the following example.
Hi, how can i help you today?
>>> zzz
Are you tired?
>>> yes
Hmmmm.
>>>
In the category for pattern zzz, it has the template Are you tired?. But in the that.aiml file, in the category with pattern yes for <that> tag Are you tired, it has template Maybe you should get some rest. I will still be here later.. But it is returning different answer. Because ? is missing in the <that> tag. If you add ? at the end in <that> tag, then it is returning correct message.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Just re-read your email and I think I understand, the parser doesn’t remove any punctuation, and I think it probably does
I’ve just check old documentation for AIML 1 parsers written years ago and all of them remove all punctuation marks like ? and !
I’ll work out a way of adding a basic punctuation remover into he processing, and write some tests before releasing. Probably take a couple of days
K
…On 20 Mar 2017, 13:36 +0000, newdev7 ***@***.***>, wrote:
Hey @keiffster check the following flow
Hi, how can i help you today?
>>> I'm married
How long have you been married ?
>>> 3 years
Just three?
>>>
In the that.aiml, we have one category with pattern * YEARS for <that> tag How long have you been married ?. It has the template Congratulations!. So if the user gives 3 years for the previous question like in the sample, it has to return Congratulations!. But it is returning Just three?. Because in other aiml file, we have one category with pattern 3 * and it has the template Just three?. Instead of returning Congratulations!, it is returning Just three?. I have tested in the latest version also. It is returning like this only.
And the second one is about ? symbol at the end of the text. Check the following example.
Hi, how can i help you today?
>>> zzz
Are you tired?
>>> yes
Hmmmm.
>>>
In the category for pattern zzz, it has the template Are you tired?. But in the that.aiml file, in the category with pattern yes for <that> tag Are you tired, it has template Maybe you should get some rest. I will still be here later.. But it is returning different answer. Because ? is missing in the <that> tag. If you add ? at the end in <that> tag, then it is returning correct message.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok, so I have worked out the issue with ? at the end of <that>, the fix is more generic, in that I remove all punctuation from <that> which makes the handling much cleaner
New release just gone to git hub
K
…On 20 Mar 2017, 13:36 +0000, newdev7 ***@***.***>, wrote:
Hey @keiffster check the following flow
Hi, how can i help you today?
>>> I'm married
How long have you been married ?
>>> 3 years
Just three?
>>>
In the that.aiml, we have one category with pattern * YEARS for <that> tag How long have you been married ?. It has the template Congratulations!. So if the user gives 3 years for the previous question like in the sample, it has to return Congratulations!. But it is returning Just three?. Because in other aiml file, we have one category with pattern 3 * and it has the template Just three?. Instead of returning Congratulations!, it is returning Just three?. I have tested in the latest version also. It is returning like this only.
And the second one is about ? symbol at the end of the text. Check the following example.
Hi, how can i help you today?
>>> zzz
Are you tired?
>>> yes
Hmmmm.
>>>
In the category for pattern zzz, it has the template Are you tired?. But in the that.aiml file, in the category with pattern yes for <that> tag Are you tired, it has template Maybe you should get some rest. I will still be here later.. But it is returning different answer. Because ? is missing in the <that> tag. If you add ? at the end in <that> tag, then it is returning correct message.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @keiffster In the AIML 2.0 specification, they mentioned that the removal of punctuation is not required. If you remove the punctuation. then you have to remove it in |
Hi,
I'm trying to use
<that>
tag for my project and it doesn't seem to work other than in the coffee.aiml in the tutorial.sh .Can you please guide me with the proper procedure to use
<that></that>
The text was updated successfully, but these errors were encountered: