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
348 stars 138 forks source link

The bot removes parenthesis #263

Closed EdvinJakobsson closed 3 years ago

EdvinJakobsson commented 4 years ago

Hi. I am trying to use the y-bot to catch specific patterns and return the matched wildcards unchanged, however the bot seems determined to alter the text before returning it, for example removing parenthesis.

Expected Behavior

For example, if I use a pattern like this: `

REPEAT_THIS #

` and when I say: 'REPEAT_THIS install (optional)' I want the bot to return: 'install (optional)'

but instead I get: ''Install optional.'

I have tried commenting out all the postprocessors and preprocessors, but that didn't change anything. Is there a simple solution to this? I want to be sure that the bot always return the whole string exactly as it came in.

Kind regards, Edvin

keiffster commented 4 years ago

That’s because the grammar needs to be in denormalised for at and replace () with LPAREN and RPAREN and the bot will replace them with ()

SunilGudivada commented 4 years ago

@EdvinJakobsson you can find all the denormalized list in the ~/storage/lookups/denormal.txt