Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support profanity levels #1

Open
TwiN opened this issue Nov 11, 2018 · 1 comment
Open

Support profanity levels #1

TwiN opened this issue Nov 11, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@TwiN
Copy link
Owner

TwiN commented Nov 11, 2018

Add support for multiple level of profanity detection.

e.g.

func IdProfane(s string, level int) bool {
    // ...
}

func IsProfane(s string) bool {
    return IsProfane(s, 1)
}

Where

level description example
1 low filter fuck, bitch
2 moderate filter boobs, ass
3 strict filter adult, blood, period

* Level 2 inherits from level 1 and level 3 inherits from level 2

Note that the strict filter would have a lot of false positive, but its goal would be to prevent as much bad things from getting by as possible, even at the cost of those false positives.

The point here is that by default, the level 1 filter should be used, but if you don't trust where the strings are coming from at all, then you can scale the filter's strictness based on the level of trust.

@TwiN TwiN added enhancement New feature or request help wanted Extra attention is needed labels Nov 11, 2018
@TwiN TwiN removed the help wanted Extra attention is needed label Oct 18, 2019
@quackduck
Copy link

You could even let users censor based on the kind of profanity: hateful speech, simple vulgarity, etc. like https://github.com/finnbear/rustrict/blob/master/src/profanity.csv does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants