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

allow词无效 #19

Open
tanranuncle opened this issue Mar 24, 2022 · 1 comment
Open

allow词无效 #19

tanranuncle opened this issue Mar 24, 2022 · 1 comment

Comments

@tanranuncle
Copy link

tanranuncle commented Mar 24, 2022

我测试的敏感词为:政府,国家,共产。白名单为:共产党。
执行:sensitiveWordBs.contains(“共产党是白名单不会被检测”)的结果是true。
执行:sensitiveWordBs.findAll(“共产党是白名单不会被检测”)的结果是 共产。
我的期望应该是返回false才对。

附config如下:
SensitiveWordBs sensitiveWordBs = SensitiveWordBs.newInstance()
.wordAllow(WordAllows.chains(WordAllows.system(), myWordAllow))
.wordDeny(myWordDeny)
.init();

---------我上次自己的回复好像被吃掉了
经查看源码,疑问已解决。白名单中只有跟敏感词一模一样的才会放过,只是包含的话不会放过。
虽然明白了原因,但是这个白名单实现方式不能解决我的问题。。。

@bocaiJs
Copy link

bocaiJs commented Apr 7, 2022

老哥你问题解决没,我遇到的问题是deny无效

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

2 participants