Versions in this module Expand all Collapse all v1 v1.0.0 Aug 7, 2026 Changes in this version + func Censor(text string) string + func ContainsProfanity(text string) bool + func DefaultWords() []string + type Option func(*config) + func WithPhoneticNormalization() Option + func WithSeparatorCollapse() Option + func WithWhitelist(words ...string) Option + func WithWordListFile(path string) Option + func WithWords(words ...string) Option + type Profanity struct + func MustNew(opts ...Option) *Profanity + func New(opts ...Option) (*Profanity, error) + func (p *Profanity) AddCensorWords(words ...string) + func (p *Profanity) Censor(text string) string + func (p *Profanity) CensorWith(text string, censorChar rune) string + func (p *Profanity) ContainsProfanity(text string) bool + func (p *Profanity) FeedWords(ch <-chan string) + func (p *Profanity) Len() int + func (p *Profanity) LoadCensorWords(words []string, opts ...Option) + func (p *Profanity) LoadCensorWordsFromFile(path string, opts ...Option) error + func (p *Profanity) LoadDefaultCensorWords(opts ...Option) + func (p *Profanity) NewWordFeed(buffer int) chan<- string