title: How do you implement a good profanity filter?
body: <p>Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out.</p>
  
  <p>Where can one find a good list of swear words in various languages and dialects? </p>
  
  <p>Are there APIs available to sources that contain good lists? Or maybe an API that simply says "yes this is clean" or "no this is dirty" with some parameters?</p>
  
  <p>What are some good methods for catching folks trying to trick the system, like a$$, azz, or a55?</p>
  
  <p>Bonus points if you offer solutions for PHP. :)</p>
  
  <h2><em>Edit: Response to answers that say simply avoid the programmatic issue:</em></h2>
  
  <p>I think there is a place for this kind of filter when, for instance, a user can use public image search to find pictures that get added to a sensitive community pool. If they can search for "penis", then they will likely get many pictures of, yep. If we don't want pictures of that, then preventing the word as a search term is a good gatekeeper, though admittedly not a foolproof method. Getting the list of words in the first place is the real question.</p>
  
  <p>So I'm really referring to a way to figure out of a single token is dirty or not and then simply disallow it. I'd not bother preventing a sentiment like the totally hilarious "long necked giraffe" reference. Nothing you can do there. :)</p>