A Haxe library used to check and filter texts.
Right now it only supports checking phrases, features will eventually be added
To use profanity-tools, you can install it directly from Haxelib.
haxelib install profanity-toolsFirstly, you need to import the Phrase class from profanity package to get these examples working.
import profanity.Phrase;To check a phrase if it contains profanity, use Phrase.check function.
If profanity is detected, it will return true, otherwise false.
class Main {
static function main() {
trace(Phrase.check("Hello")); // false
trace(Phrase.check("Fuck")); // true
}
}This library contains and processes strong language and slurs for moderation purposes. All included terms are used only to detect inappropriate content.