Skip to content

Conversation

@iabw
Copy link

@iabw iabw commented Feb 7, 2016

This gives the option of blacklisting a bunch of scatological words at once, but doesn't add them by default. The "addScatologicalWords" method was added to js, python, and php and "add_scatological_words" to the ruby. Unit tests were added for all languages.

I don't personally care about scatological words either, but when building a tool targeted to children this option might be wanted without having to manually build a list oneself. I couldn't find a nice list online somewhere already (which is why I think this PR is useful), so I just combed through http://www.noswearing.com/dictionary and added the words that weren't already in badwords.json

@hugovk
Copy link
Contributor

hugovk commented Feb 7, 2016

One option would be to take one of the list of "bad words" linked here and feed them into wordfilter.

Perhaps a more general solution would be to add a function to wordfilter similar to addWords called something like addWordsFromFile, but instead of a list of words, you give it the name of a file containing words (one per line) and it'll open it and add all those words.

@iabw
Copy link
Author

iabw commented Feb 7, 2016

That sounds like a good suggestion, although I still think there should be an even more simple way of 'filter as much as possible' - which is what I was reaching for here. I'm sure the lists you link to are better than the list I threw together.

If that's not a goal of wordfilter and there's a more full-featured filter lib, I wouldn't mind a reference to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants