项目地址: https://github.com/repong/hope_word
关于项目
这是一个基于 sego 的屏蔽字过滤器
用法
go get -u github.com/repong/hope_word
hope_word -port 8000
例子(请把测试看看改为dict/assets/文件夹中的屏蔽字)
curl -XPOST http://localhost:8000/validate -d "message=测试看看"
{"result":"false"}
curl -XPOST http://localhost:8000/filter -d "message=测试看看"
{"result":"**看看"}
更新字典
make update_dict
PS
用 travis 自动编译并提交到 Github 上,在 Releases 标签中选择版本即可使用,支持 linux 系统。
使用了 go-bindata 把 txt 文件一起打包了,方便部署。
游戏审核要用,没办法,我也不想搞屏蔽字的 : (