Skip to content

huuzkee-foundation/antispam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Redisbayes

RedisBayes Golang Version

What Is This?

It's a spam filter. I wrote this to filter spammy comments from a high traffic forum website and it worked pretty well. It can work for you too :) It's not tied to any particular format like email, it just deals with the raw text.

Installation

go get github.com/pengfei-xue/redisbayes

Basic Usage

::

package main

import (
	"fmt"
	"github.com/pengfei-xue/redisbayes"
)

// you should add a config file config.yaml in your working dir
// this will be changed to use the default config if not provided
func main() {
	redisbayes.Train("good", "sunshine drugs love sex lobster sloth")
	redisbayes.Train("bad", "fear death horror government zombie god")

	class := redisbayes.Classify("sloths are so cute i love them")
	fmt.Println(class)
	class = redisbayes.Classify("i fear god and love the government")
	fmt.Println(class)

	redisbayes.Untrain("good", "sunshine drugs love sex lobster sloth")
	redisbayes.Untrain("bad", "fear death horror government zombie god")
}

About

redis based bayes antispam implemenation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages