-
Notifications
You must be signed in to change notification settings - Fork 145
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
wildcards failing for Japanese #253
Comments
@alecl we've noticed these same problems for Chinese, there are some tickets #147 interested in your format above - is that for some type of testing? |
@dcsan The test format is from https://github.com/aichaos/rsts Thank you for the pointers. |
I tried your version with the JS and the matches seem to be not reliable:
|
@dcsan right. I think that's what @kirsle had mentioned in aichaos/rivescript-wd#6 that different language Regex engines had different behavior. It didn't work for me in the JS engine either but I'm focused on the Java one so I might be OK there. Longer term would be great to consider fixing for all languages. |
I have the same problem on Arabic language, and I noticed when the optional is wrapped between the unicode text then it shows different results. // hi [*] universe
+ السلام [*] والرحمة
- Matched all rules, but <star>, <star1> are undefined
// name [foo|boo] today
+ اسمي [احمد|محمد] اليوم
- Matched all rules, but <star>, <star1> are undefined Where in my case if the trigger starts or ends by optional [*] it never matched. // hello [*]
+ مرحبا [*]
- NEVER Matched
// [*] world
+ [*] عليكم
- NEVER Matched |
English test case works with just [*]dog[*] to match any sentence with the substring dog but in Japanese this fails. Adding extra wildcard permutations of required/optional makes it work but that shouldn't be necessary.
UPDATE: Actually even the workaround doesn't work in the Javascript test runner for rsts though the workaround does work for the Java version. Even stranger.
this works in Japanese for the Java but not the Javascript interpreter to match the character for dog anywhere in the string (start, middle, end)
this doesn't work though it should
Test cases below
The text was updated successfully, but these errors were encountered: