Google has inadvertently created an API that third-party developers can use to check whether a word entered by a user is likely to be offensive or not. This is now closed and was part of the Googles What Do You Love? site. So I scrapped this before it was closed and its now in a node module for people to use in projects. Hope you enjoy!!
Installation
$ npm install --save google-profanity-words
Usage
const googleProfanityWords = require('google-profanity-words');
googleProfanityWords.list(); // [ '5h1t','5hit','a55','anal','anus',etc.....] Returns a array of Profanity. 350
You can follow me on here and on the following for more code and projects.
Top comments (10)
I'd love to see a script that would transform my source code variables into words from this list.
inb4
babel-plugin-profanity
lol. I actually checked npm to see if this package exists!
I'm wondering why some of those patterns have whitespace at the end. Is that how they came from Google or is it an artifact of your scraping process? Matching would fail if a sentence ended in something like (ahem) "listplucking."
I'm terribly unfond of these sorts of measures though in general :)
This is great! I've been working on a Google Chrome plugin that removes profanity from web pages. My grandmother felt strongly about the issue.
That's why bobs and vegana has become a meme: It's not in the list. :'D
How does that work?
Is that list being updated when google adds a new word to their swear list or is it static?
It returns an array, stored in plain text: github.com/RobertJGabriel/google-p...
Is it a parse-and-lookup for words or does it analyze natural language and sentence semantics?
Nice, did not know this was a thing and will be good for sites with public chat. Thanks for sharing