in reply to Robust Anti-Swear script

There is no perfect solution, as the kiddies will always find ways around them. Let's face it, if it takes you 10 hours to think up something, it may take them 1000 hours to figure out a way around it, but if there's 10,000 people banging away at it, then it's over in 6 minutes.

Think of the problems you have with: shittake mushrooms, Fucking, Austria, "I scraped my knee", hockey players named Satan, and so many more that it makes conversation quite awkward.

If you want to do the "right" thing, then make sure you match on word-breaks (i.e. /\bcrap\b/) and that your list is fairly extensive. Even then, the context often determines the meaning of words.

Replies are listed 'Best First'.
Re: Re: Robust Anti-Swear script
by Azhrarn (Friar) on Jul 31, 2001 at 17:33 UTC
    I probably will make it use word breaks, (but as far as I'm concerned Fucking, Austria would be a match ;) ) I'll have to see how sensitive word breaks are. As I would want punctuation to count, but wouldn't want it to trigger on any shroom discussions. ;)

    Thanks for all the moral issues, but I will leave those dillemas up to the end users. I could also modify this once it is done to take ANY action, not just hostile.

    I could make it trigger on key words like "Azhrarn" or "help" to alert me, and have it work out bad spellers and such. ;) This can be expanded quite a bit once it is completed, but it will be nice to have a base word-matching script that I can feed a list into. You guys just can't get past the basic premise of the script to other uses can you? :p
      For me, at least, the issues I raised have less to do with morality than practicality (sorry to all you upvoters who thought I was making a grand anti-censorship speech :-) Parsing the English language is an extremely difficult task to automate, regardless of your motive or objective.

      Unless you are using key words that are unlikely to be used in conversation unrelated to what you're trying to capture, you'll end up with bogus results unless you can also analyze and interpret context. Even humans don't do so well at that -- hence the use of "magic words" like "mayday" or "I am declaring an emergency" instead of "help" in situations where it really matters.

      Trying to code this sort of understanding into a perl regex without resorting to predefined magic words would be quite a trick. Automating action based on anything a perl regex could identify simply won't do you much good in the long run.

        Even humans don't do so well at that -- hence the use of "magic words" like "mayday" or "I am declaring an emergency" instead of "help" in situations where it really matters.

        <pedantry> Unless you're French </pedantry>

        You've got a good point though, really - the mayday call as a whole is quite formalised. "x souls on board" and so on.

        Recall, though, the recent US air crash where the pilot ran out of fuel but didn't declare an emergency - in spite of the tower asking him if he wanted to! Having such a specific form of words acted in this case as a disincentive - he didn't want to be seen to be in serious trouble.

        andy.

        ObPerl: erm, print map {$_ x3} split //, ".-."