Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 622 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 622 Bytes

swear-free: A Go library for detecting and filtering swear words.

Installation

go get github.com/ohhhthatvarun/swear-free

Languages/Locale supported

  • English (En)

Usage

  • To get censored version of the text.
censoredText = swearFree.CensorWord("Your bitch ass text here")
fmt.Println(censoredText) // Your ***** *** text here
  • To change the censor character
swearFree.SetReplaceCharacter("#")
censoredText = swearFree.CensorWord("Your bitch ass text here")
fmt.Println(censoredText) // Your ##### ### text here
  • To change the locale (Future)
swearFree.SetLocale("Es")