-
Notifications
You must be signed in to change notification settings - Fork 487
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
22b、2bc、sbc这些都无法通过配置匹配到空 #59
Comments
试下这个: |
这个会有问题,就是要找到所有的纯字母和数字的敏感词,一个个手动加入到白名单,有点怪,而且如果敏感词库更新了,多了个类似的敏感词,就会导致不可预知的异常 |
期望能够设置,最长匹配连续的字母数字。比如abbcc 当中出现bc不会有问题,仅在 a bc d 这种情况会匹配到bc。从代码文字意义来说englishWordMatch 这个应该是需要符合这个规则的才对 |
因为中文词是连续的,所以匹配最长不太可行。
主流的做法就是先最短匹配,结果出来可以做二次筛选或者警告之类的。
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: guaxi ***@***.***>
发送时间: 2024年5月28日 11:09
收件人: houbb/sensitive-word ***@***.***>
抄送: 老马啸西风 ***@***.***>, Comment ***@***.***>
主题: Re: [houbb/sensitive-word] 22b、2bc、sbc这些都无法通过配置匹配到空 (Issue #59)
期望能够设置,最长匹配连续的字母数字。比如abbcc 当中出现bc不会有问题,仅在 a bc d 这种情况会匹配到bc。从代码文字意义来说englishWordMatch 这个应该是需要符合这个规则的才对
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
但是WordResultConditions.englishWordMatch配置这个之后,sbc这是一个单词,不应该匹配到sb才对。 |
这个ignoreRepeat(true)会出现22b,ignoreRepeat(false)会出现2b ,事实上我想匹配到的是空
这个englishWordMatch、以及alwaysTrue都会出现sb,事实上我想匹配到的是空
The text was updated successfully, but these errors were encountered: