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
349 stars 136 forks source link

<learn> and <star> don't work together #292

Closed LazyRacc00n closed 3 years ago

LazyRacc00n commented 3 years ago

I'm implementing a chatbot which should use the ( and also ) and like in the following pattern:

* IS SYNONYM OF *

So if I define this simple pattern

<pattern>HI</pattern>
<template> Nice to meet you! </template>

and the user types hello is synonym of hi, then the hello should trigger the response Nice to meet you!. As matter of fact this doesn't work, even if it works properly on the online Pandorabot editor. It seems that the doesn't retrieve the related words.

Are there alternative ways to implement a pattern that behaves like I want?

keiffster commented 3 years ago

The way to do it in program-y is with set and get, so the grammar needs to be

* IS SYNONYM OF *

This is because the evaluation is in scope of the learnf clause, but set and get are wider scope

On 25 May 2021, at 12:17, LazyRac00n @.***> wrote:

I'm implementing a chatbot which should use the ( and also ) and like in the following pattern:

* IS SYNONYM OF *

So if I define this simple pattern

HI

and the user types hello is synonym of hi, then the hello should trigger the response Nice to meet you!. As matter of fact this doesn't work, even if it works properly on the online Pandorabot editor. It seems that the doesn't retrieve the related words.

Are there alternative ways to implement a pattern that behaves like I want?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/keiffster/program-y/issues/292, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCUFM4ZAZSD6RCIFUVZBDLTPOBM3ANCNFSM45PEAUYQ.