Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Fix documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Dec 30, 2020
1 parent 5043ef3 commit 0b5528b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moderation.go
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ var replacements = [...]string{

var removeAccentsTransform = transform.Chain(norm.NFD, runes.Remove(runes.In(unicode.Mn)), norm.NFC)

// Analyze analyzes a given phrase for moderation purposes
// IsInappropriate returns whether a phrase contains enough inappropriate words to meet or exceed InappropriateThreshold
func IsInappropriate(text string) bool {
buf := make([]byte, 0, len(text))
_, n, _ := transform.Append(removeAccentsTransform, buf, []byte(text))

0 comments on commit 0b5528b

Please sign in to comment.