49 Unstar Star 154 Fork 58

bryan31 / liteBanner

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

liteBanner

liteBanner是一个轻量级的本地违禁词检测(素材引用github),整句过滤的Jar包

  • 自带违禁词词库,整包只有100多K,包含1w多的违禁词
  • 可以输出过滤后的字符串
  • 可以自动检测出带空格,加分隔符的违禁词
  • 1秒可以过滤30w条的词句

	// 加载默认词典
	BannerFilter filter = BannerFilter.DEFAULT;
	// 向过滤器增加一个词,额外造个词
	filter.put("AB违禁词");
	
	String sentence = "我是一个T M D(他妈的) 法轮功AB违禁词,追杀本拉登";
	BannerResp resp = filter.process(sentence);
	System.out.println(resp);

返回

	BannerResp [hasSensitiveWords=true, sensitiveWords=[TMD, 他妈的, 法轮功, AB违禁词, 本拉登], filterStr=我是一个***(***)********追杀***]

Comments ( 5 )

Sign in for post a comment

About

liteBanner是一个轻量级的本地违禁词检测,整句过滤的Jar包 spread retract
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Java
1
https://gitee.com/bryan31/liteBanner.git
git@gitee.com:bryan31/liteBanner.git
bryan31
liteBanner
liteBanner
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542