Comments (11)
Hey,
I tried the code for <that>
tag. After checking the python code and aiml code for <that>
, I fixed some of the issues related to this one.
- In the
<template>
tag, the message is given in the lowercase. But in the<that>
tag, the same messages are given in uppercase. So while sending for parsing, I changed the messages to uppercase. - Some of the questions in the
<template>
tag ends with '?'. But in the<that>
, the '?' is missing for those messages. I added '?' in<that>
tag.
After changing this two, I'm able to get answer for some <that>
tags.
But one more issue is there.
In the that.aiml file, we are using '* YEARS' for one question. Also in other aiml file, there is one category with <pattern>
as '* YEARS'. Here the conflict occurs. It has to return the message present in the that.aiml but it returned the answer in the other aiml file pattern.
Like this if any of the messages with * is available both in the <that>
tag and other <category>
tag, then it returns the answer in the other <category>
tag instead of <that>
tag.
This issue occurs only if the <pattern>
tag has * in the message. Otherwise it returns the correct answer.
Can you please tell me how to fix this issue.
from program-y.
Just back from an overseas biz trip, let me write some tests and see what is happening
from program-y.
@keiffster welcome back mate. A little change in the issue. There is no issue if the same pattern available in <that>
tag and other <category>
tag. It returned the message from <that>
tag only. The issue is different here.
In the that.aiml file, we are using '* YEARS'
for one question. In another aiml file, there is one category with <pattern>
as '3 *'
. Here the issue occurs. If I send '3 years', it responded with the <template>
present in the '3 *' <pattern>
instead of '* YEARS'
.
from program-y.
Check out the new release 0.5.0 which has a rewritten pattern matching parser which is much better at topic and that handling
from program-y.
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?
from program-y.
from program-y.
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.
from program-y.
from program-y.
from program-y.
from program-y.
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 <that>
tag also. So we have to remove all punctuations like '.'
, ','
, '?'
, '!'
, etc., in <that>
tag.
from program-y.
Related Issues (20)
- Programy on PythonAnywhere HOT 1
- Program-Y is alive.... again HOT 2
- <system> tag in aiml doesn't work HOT 1
- scheduling extension doesn't print message
- Error when trying to save data from 'learnf' elements to MongoDB HOT 2
- Wikipedia doesn't seam to work HOT 1
- <learn> and <star> don't work together HOT 1
- How to get a variable value outside of aiml files inside python code?
- Setting SentenceSplitter on an embedded bot HOT 4
- Whenever I install program y, cryptography fails to install and the whole installation stops.
- Bug in pattern parser where the star index of the words will change
- WARNING:root:[Console] [bot] [brain] [testuser] - System command node disabled in config
- ModuleNotFoundError: No module named 'sqlalchemy'
- Pattern matching not work in a right way
- image not displaying in telegram
- GUI for my bot (Not a feature request I was just unsure where to ask) HOT 1
- Change Default Response
- AttributeError: module 'collections' has no attribute 'MutableSet' HOT 3
- module apscheduler not found
- Thoughts about ChatGPT service for ProgramY
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from program-y.