Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot use special charactor in the name ? #26

Open
RonnSanji opened this issue Apr 10, 2019 · 2 comments
Open

cannot use special charactor in the name ? #26

RonnSanji opened this issue Apr 10, 2019 · 2 comments
Assignees

Comments

@RonnSanji
Copy link

I use some special charactor like "?" in the name . the bot cannot reply and just hang there, how to solve this ?

@kurenn
Copy link
Member

kurenn commented Apr 10, 2019

@CharlieIGG can you take a look into this?

@CharlieIGG CharlieIGG self-assigned this Apr 11, 2019
@CharlieIGG CharlieIGG pinned this issue Apr 11, 2019
@CharlieIGG CharlieIGG unpinned this issue Apr 11, 2019
@CharlieIGG
Copy link
Contributor

The current basic implementation for Alpha is not hooked up to DialogFlow or any other kind of NLP @kurenn @RonnSanji.

Instead of that it tests against pre-defined patterns, such as the following:

 /My\s+name\s+is\s+([A-zÁ-ÿ]+)/i,
      /I\s+am\s+([A-zÁ-ÿ]+)/i,
      /I'm\s+([A-zÁ-ÿ]+)/i,
      /Im\s+([A-zÁ-ÿ]+)/i,
      /This\s+is\s+([A-zÁ-ÿ]+)/i,
      /(hello|hi|hey)\W?\s+My\s+name\s+is\s+([A-zÁ-ÿ]+)/i,
      /(hello|hi|hey)\W?\s+I\s+am\s+([A-zÁ-ÿ]+)/i,
      /(hello|hi|hey)\W?\s+I'm\s+([A-zÁ-ÿ]+)/i,
      /(hello|hi|hey)\W?\s+Im\s+([A-zÁ-ÿ]+)/i,
      /(hello|hi|hey)\W?\s+This\s+is\s+([A-zÁ-ÿ]+)/i,
      /(?!^hello$|^hi$|^hey$)\s*([A-zÁ-ÿ]+)/i,

We might need to add some escape routes so it doesn't get stuck. But I'm unsure as to what other RegEx patterns might be better suited.

If you want something more sophisticated, you can plug in an NLP service using the ReduxSagas included in the project, but you'll have to do some tinkering.

Thoughts @kurenn ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants