keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
350 stars 135 forks source link

Another behaviour with wildcard "_" #196

Closed gianfrasoft closed 5 years ago

gianfrasoft commented 5 years ago

We are trying to make this code work:

    <category>
        <pattern>_ STOPWORD</pattern>
        <template><star index="1"></star> SEPARATOR1</template>
    </category>

    <category>
        <pattern># STOPWORD _</pattern>
        <template><star index="1"></star> SEPARATOR2 <star index="2"></star></template>
    </category>

but when we send the input hello STOPWORD the response is: Hello STOPWORD SEPARATOR1 I think it should be: Hello SEPARATOR1

gianfrasoft commented 5 years ago

When I remove the second category everything works fine. The two rules seem to conflict.

keiffster commented 5 years ago

Hi there, yes that looks like an issue in the matcher

I’ll review tonight and see what’s happening

K

On 28 Mar 2019, at 09:07, Gianfranco notifications@github.com wrote:

We are trying to make this code work:

_ STOPWORD

but when we send the input hello STOPWORD the response is: Hello STOPWORD SEPARATOR1 I think it should be: Hello SEPARATOR1

Version of Python: 3 Operating System ( inc Version ): Ubuntu 16 Sanic — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

keiffster commented 5 years ago

Found the problem. How urgent is fix as I could get a release by Monday or just roll it into the next release in a week or so

gianfrasoft commented 5 years ago

By next week it would be great for me, but... No problem!

Anyway, thanks for your time!!!

keiffster commented 5 years ago

New version pushed to master with single fix for this issue. Let me know how you get on

Just pull the file from master

gianfrasoft commented 5 years ago

Great! Thank you.