Skip to content

Support profanity levels #1

@TwiN

Description

@TwiN

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions