areebbeigh / profanityfilter

A universal Python library for detecting and filtering profanity

Home Page:https://pypi.python.org/pypi/profanityfilter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework

brandonsturgeon opened this issue · comments

Hey @areebbeigh I was intending on just adding pluralization support, but I ended up reworking a lot of the logic. I won't make a PR until we have a chance to chat (and until I get it ironed out).

I converted the plugin to a class structure, so ideally you could do:

pf = ProfanityFilter()
pf.append_words(['more', 'profane', 'words'])

print pf.censor('some of these words are fucking profane')

>some of these ***** are ******* *******

Take a look at the changes I made in this commit (I didn't do it atomically because I wasn't expecting to do so much! I got caught up in it.): brandonsturgeon@8e34e92

Hi @brandonsturgeon I see you've made a lot of improvements. This is really great! Thanks! I request you to go ahead and finish up with the final touches, I'll be waiting for the final PR!

Sorry, as is typical of me, I sort of forgot about this. I'll add it to my list again :)

I don't think I could bring it all the way across the finish line, but I could get it to a mostly-working state and send you a pull request. What do you think about that?

Haha :)

I made the PR