/persian-swear-detector

simple high performance Persian swear word detector for golang.

Primary LanguageGoMIT LicenseMIT

Persian Swear Detector

A very simple, high performance, ready to go Persian swear detector for golang. also support some, not very complicated, normalization specially for persian

Installation

go get github.com/harispy/persian-swear-detector

Usage

use with custom list of swear words

swearDetector := detector.NewCustomSwearWordDetector([]string{"fuck","احمق"})
hasSwear := swearDetector.ContainsSwearWord("تو احمق هستی") // returns true
hasSwear := swearDetector.ContainsSwearWord("عالی بود") // returns false
hasSwear := swearDetector.ContainsSwearWord("f*u*c*k you") // returns true