Go 文本关键词过滤库

miracle · January 25, 2016 · Last by ytet9292 replied at May 17, 2019 · 6720 hits

开发了一个文本关键词过滤的库,可以忽略关键词中间的特殊符号,可以设置过滤阀值和关键词的权重。 代码:https://github.com/miraclesu/keywords-filter

使用上只需准备一份关键词,一份需要忽略的特殊符号就行了,可以起一个 http 服务,有 api 接口:

curl -X POST -H "Content-Type: application/json" -d '{"Content":"test *xx**oo something"}' http://127.0.0.1:7520/filter
// result
{
   "Success": true,
   "Msg": "",
   "Result": {
      "Threshold": 100,
      "Rate": 100,
      "Keywords": [
         {
            "Rate": 100,
            "Index": 6,
            "Kind": "porn",
            "Word": "xx**oo"
         }
      ]
   }
}
No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.