The easiest way is to simply use regular expression for some of the most offensive words.
There are services offered on the Internet that will allow you to request a word to find out if he is a layman. These are good options if you really want to be sure.
Unfortunately, there is no sure bet for any of them. One person - profanity - another general conversation (see Santorum, very very vulgar, but most of them are not offended.) And each group has its own language. Ballax is not so bad in America, but he is pretty bad in Britain.
You may make a clbuttic error. Even if you eliminate everything, I can still write a terribly insulting story using the kindest language.
A short blacklist or one of the services is a transition method depending on the filtering level you want.
Joshd source
share