If you want to develop a badwords-filter for a commenting-system or such, I'm afraid I made the experience that there is no automatic filter that can stop people from using unwanted language. I found moderation/approvement easying functions much more successful.
Ordinary morality is for ordinary people. -- Aleister Crowley