There are many issues with censorship, that'll try to avoid here, and I'd liek to extend the ideas already discussed in how to remove profanity

I think you'd get a lot of false matches on perfectly harmless language, so you need to gaurd against a lot of these without annoying people (IMHO, you'd annoy more people by punishing innocent than not stopping profanity)

The classic example I always use is my friend Dick from Scunthorpe. He has a pet Ass (as in donkey).

Now there are (at least) three false trigers in that paragraph (although some things like "c ex" might trigger more), and leads on to dialect; In UK English, an Ass is nothing but a donkey. You sit on your Arse, but getting drunk is being rat-arsed.

Perhaps on alternative is to match against bad, then match against that bad word's "safe" list (with words like Scunthorpe)

Ultimately there are going to be mistakes, and the only perfect way to do it would be human; although I'd be interested in developing an AI engine that could be taught...

--
RatArsed


In reply to Re (2): Robust Anti-Swear script by RatArsed
in thread Robust Anti-Swear script by Azhrarn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.