Chikau Go Reference https://img.shields.io/github/v/release/awodehe/chikau?style=flat-square

Chikau is a simple and fast profanity detection and censorship library.

Installation

go get github.com/awodehe/chikau

Example

package main

import (
	"github.com/awodehe/chikau"
)

func main() {
	d := chikau.NewDetector()

	d.IsProfane("hello world")             //=> false
	d.IsProfane("go fuck yourself")        //=> true
	d.ExtractProfanity("hello world")      //=> ""
	d.ExtractProfanity("go fu<k yourself") //=> "fuck"
	d.Censor("hello world")                //=> "hello world"
	d.Censor("go fu<k yourself")           //=> "go **** yourself"
}

License

Chikau is licensed under the terms of the MIT License.

GitHub

View Github