Git Product home page Git Product logo

Comments (11)

newdev7 avatar newdev7 commented on June 20, 2024

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.

  1. 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.
  2. 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.

keiffster avatar keiffster commented on June 20, 2024

Just back from an overseas biz trip, let me write some tests and see what is happening

from program-y.

newdev7 avatar newdev7 commented on June 20, 2024

@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.

keiffster avatar keiffster commented on June 20, 2024

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.

newdev7 avatar newdev7 commented on June 20, 2024

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.

keiffster avatar keiffster commented on June 20, 2024

from program-y.

newdev7 avatar newdev7 commented on June 20, 2024

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.

keiffster avatar keiffster commented on June 20, 2024

from program-y.

keiffster avatar keiffster commented on June 20, 2024

from program-y.

keiffster avatar keiffster commented on June 20, 2024

from program-y.

newdev7 avatar newdev7 commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.