实现 SensitiveWord API 实现类

This commit is contained in:
YunaiV
2022-04-09 10:48:47 +08:00
parent 3f7d7c3bfa
commit 696756b3c8
16 changed files with 9171 additions and 8253 deletions

View File

@ -1,16 +1,30 @@
package cn.iocoder.yudao.module.system.api.sensitiveword;
import java.util.List;
import java.util.Set;
/**
* 大佬,别偷懒:代码千万行,注释第一行!
* 敏感词 API 接口
*
* @author: 永不言败 <向国足学习永不言败>
* @since: 2022/3/23 17:00
* @description:
* @modification:
* @author 永不言败
*/
public interface SensitiveWordApi {
/**
* 获得文本所包含的不合法的敏感词数组
*
* @param text 文本
* @param tags 标签数组
* @return 不合法的敏感词数组
*/
List<String> validateText(String text, List<String> tags);
/**
* 判断文本是否包含敏感词
*
* @param text 文本
* @param tags 表述数组
* @return 是否包含
*/
boolean isTextValid(String text, List<String> tags);
}