Git Product home page Git Product logo

spamcheck's Introduction

spamcheck

检测聊天信息中潜在的发广告卖星币等言论,后续也可以对违禁词以及暴恐词的检测进行支持


DEPENDENCY

所需第三方依赖,可以通过 go get -u 的方式进行安装

EXPLAINATION

  • config.json 服务运行配置文件

    • SOCK_FILE: 服务以Unix Domain Socket 方式运行的时候sock文件的存放位置
    • WORKSPACE: 代码根目录,spamcheck.go文件的位置
    • CLASSES: 分类类别,至少2个。每个分类需要有对应的先验概率词典文件,示例:分类为adwords,则同级目录下需要有adwords.txt,字典越大,服务的分类结果越准确。
    • DICTIONARYFILEsego库分类字典,需要手动指定,文件路径为绝对路径;分词准确度可以通过自定义字典进行替换。
    • SOCKET_BUFFER_SIZE:服务以Unix Domain Socket的方式运行的时候,缓冲区大小,可以根据数据量的大小进行调试。
  • spamcheck.go: 垃圾词检测主文件

  • README.md:服务介绍文件

  • requirements.txt: 项目依赖第三方库列表

  • *.txt: 根据config.jsonCLASSES 指定的分类的先验概率字典。格式:一行一个,每行一个词汇

USAGE

  • Run as 'Unix Domain Socket'
go run spamcheck.go -c ./config.json -a sock
  • Run as RPC
TODO

spamcheck's People

Contributors

guoruibiao avatar

Stargazers

 avatar  avatar xuehe avatar  avatar  avatar  avatar 巴八灵 avatar ZhenYangze avatar Michael avatar sansiro avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.