in reply to Re: Robust Anti-Swear script
in thread Robust Anti-Swear script

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

Replies are listed 'Best First'.
Re: Re: Re: Robust Anti-Swear script
by Cubes (Pilgrim) on Jul 31, 2001 at 20:25 UTC
    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 //, ".-."