BadWords
All credit goes to Maurice Butler, this project is copied from his work at https://github.com/MauriceButler/badwords
A highly consumable list of bad (profanity) English words based on the nice short and simple list found in Google's "what do you love" project made accessible by Jamie Wilkinsonhere
This data has been exposed as
- an array
- functions
depending on what is required for your purposes.
Installation
Available in Hex, the package can be installed
by adding bad_words to your list of dependencies in mix.exs:
def deps do
[
{:bad_words, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/bad_words.
Usage
true = BadWords.bad_word?("a55")
false = BadWords.phrase_contains_bad_word?("Mr. Rogers")Note
"Bad words" implementations are frequently prone to the Scunthorpe problem
These kind of lists can be used for flagging things, but being used as a basis for outright blocking can cause issues.