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

Problem with [*] for non English #254

Closed
kimmanlui opened this issue Feb 21, 2018 · 1 comment
Closed

Problem with [*] for non English #254

kimmanlui opened this issue Feb 21, 2018 · 1 comment

Comments

@kimmanlui
Copy link

kimmanlui commented Feb 21, 2018

hi
if I type [*]出国[*]留学 , it is expected to accept 出国留学 or 要出国要留学. Unfortunately, it is not.

My workaround is to have four statements *出国*留学 , 出国留学 , *出国留学 , 出国*留学

It does not look nice.
Thanks,

@kirsle
Copy link
Member

kirsle commented Feb 21, 2018

This is a known bug, the root cause of which is the \b word-boundary metacharacter in the JavaScript regular expression engine. Python's regexps have the same problem, but other languages can handle it fine.

Other related issues: #147, #253 and aichaos/rivescript-python#78

My best idea for a future workaround is to allow users to write raw regular expressions in RiveScript for these cases instead of the standard "simplified regexps" of the +Trigger. The discussion about that is over at aichaos/rivescript-wd#6.

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

No branches or pull requests

2 participants