Enquirer Home Page | Twitter | Back to Improbable Island

 Forum Index > Legacy Forums: Season One > Season Two Planning Forum New Topic Post Reply
 Infamous Pain In The Arse Text Parser
 |  Printable Version
Aeridus
 Tuesday, February 10 2009 @ 12:12 AM UTC (Read 6499 times)  
Forum Badass
Badass

Status: offline

Registered: 08/14/08
Posts: 91

I recently found out from CMJ about the parser, after wondering why "Haha" gets converted to "That's funny ". I do think that it's probably a good idea for stuff like lol and rotfl to be converted to be more "in-game", though. Any thoughts on what conversions seem unnecessary?


 
Profile Email
Quote
Count Sessine
 Tuesday, February 10 2009 @ 01:50 AM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

Words that are perfectly good English when used by literate people certainly ought to be crossed off the list. Firmly. With a vengeance.

Such as, for instance: "sum."

Or "ne" as in, "je ne sais quoi." *
--
* Okay, so that's French.


 
Profile Email
Quote
K.K. Victoria
 Tuesday, February 10 2009 @ 10:54 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/08
Posts: 498

How 'bout we have a system of warnings that are given to people who do

-Shiver-

...Chatspeak...

And use that. Since trying to type M.R.E. for Meal, Ready to Eat. Those military instant meal things. Actually quite good...

Anyway. It comes up M. are. E.

I propose that we mark people who talk like they have no spelling ability and after enough marks, gets investigated and before long, unable to speak.

"An administrator has decided that that filth spewing out of your mouth isn't fit for Improbable Islands "classy" overtones. So he has taken a needle and thread and sewn your mouth shut. Good luck!"


"You saved Pineapple!"
 
Profile Email
Quote
CavemanJoe
 Tuesday, February 10 2009 @ 02:12 PM UTC  
Forum Admin
Admin

Status: offline

Registered: 02/24/08
Posts: 2281

Every now and then, when drama gets stirred up, I toy with the idea of letting players control the drama by using a Digg-style commentary system (comments with enough negative votes get cast down into obscurity). Mr Nipploff was created during an episode of The Drama.

However, then the drama dies down, and I realise that it happens so very rarely that my coding time would be much better suited towards, say, building robot armies.

Anyway. Here is the code of the text parser as it stands now:

PHP Formatted Code
<?php
function nicecomments_dohook_private($hookname,$args){
        global $session;
        switch($hookname){
        case "commentary":
                $text = $args['commentline'];
                $his = translate_inline("his");
                $her = translate_inline("her");
                $o = ($session['user']['sex']?$her:$his);
                if (get_module_setting("do_emotes")){
                        $full_emotes = array(
                                "hehe"=>":chuckles.",
                                "haha"=>":laughs.",
                                "lol"=>":laughs heartily!",
                                "gtg"=>":needs to depart.",
                                "bbiab"=>":will return momentarily.",
                                "bbias"=>":will return momentarily.",
                                "rot?fl"=>":plops right on the ground, laughing.",
                                "lmao|rot?flmao"=>":laughs so hard, $o posterior falls off.",
                                "wtf"=>":looks confused.",
                        );
                        $partial_emotes = array(
                                "hehe"=>"That's funny",
                                "haha"=>"That's funny",
                                "bbl"=>"I'll be back later.",
                                "omg"=>"Goodness!",
                                "gtg"=>"I need to leave.",
                                "wtf"=>"I'm confused",
                                "omfg"=>"Wow!",
                                "atm"=>"at the moment",
                                "wb"=>"Welcome back",
                                "omgwtf|wtfomg"=>"Oh my heavens!",
                                "brb"=>"I'll be right back.",
                                "bbias"=>"I'll be right back.",
                                "bbiab"=>"I'll be right back.",
                                "motd"=>"Message of the Day",
                                "dk"=>"Drive Kill",
                                "dks"=>"Drive Kills",
                                "ty"=>"thank you",
                                "rng"=>"random number generator",
                                "lvl"=>"level",
                                "g2g"=>"got to go",
                        );
                        foreach ($full_emotes as $pattern=>$replacement){
                                $text = preg_replace("/^($pattern)(one|eleven|[.!1])*$/i",$replacement,$text);
                        }
                        foreach ($partial_emotes as $pattern=>$replacement){
                                $text = preg_replace("/\\b($pattern)\\b/i","$replacement ",$text);
                        }
                }
                if (get_module_setting("do_aol")){
                        $partial_emotes = array(
                                "u"=>"you",
                                "r"=>"are",
                                "ur"=>"you are",
                                "ru"=>"are you",
                                "ne *1"=>"any one",
                                "ne"=>"any",
                                "(n[o0][o0]b|newb)"=>"new player",
                                "a\\/?s\\/?l"=>"Tell me about yourself.",
                                "(some?|sum) *(won|1)"=>"someone",
                                "(som|sum)"=>"some",
                                "wun"=>"one",
                        );
                        foreach ($partial_emotes as $pattern=>$replacement){
                                $text = preg_replace("/\\b($pattern)\\b/i","$replacement ",$text);
                        }
                }
                if (get_module_setting("do_caps")){
                        //we don't force small caps on short text strings.
                        if (strlen($text) > 5){
                                //test to see if there are too many caps:
                                $allletters = preg_replace("/[^a-zA-Z]/","",$text);
                                $allcaps = preg_replace("/[a-z]/","",$allletters);
                                if (strlen($allcaps) >= strlen($allletters)/2){
                                        //too many caps.
                                        $text = preg_replace("/\\b([a-zA-Z0-9])([a-zA-Z0-9]*)\\b/e","'\\1'.strtolower('\\2')",$text);
                                }
                        }
                }
                $args['commentline'] = $text;
                break;
        }
        return $args;
}
?>
 


Suggestions are much appreciated. Hell, I may even throw some Easter Eggs in there.


 
Profile Email Website
Quote
Count Sessine
 Tuesday, February 10 2009 @ 05:03 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

My two cents:

The real mischief comes from the do_aol module setting.

Also, what is gained by stopping people from talking about DKs and lvls? Especially inside clan halls! Maybe such talk initially confuses the occasional newbie in NewHome, but a) that's dwarfed by the persistent confusion induced by Island matters such as scavenging, and b) that confusion will not last. The culture on the Island is such that any question is instantly and generously answered.

Here's a wild thought. What would happen if you just turned it all off? Or reduced it to a bare minimum, starting with only a tiny handful of words (lol, rot?fl, lmao|rot?flmao, omg, and maybe wtf)? My guess is, nothing very bad.

Most of this is better handled with social pressure, anyway. A newbie posting comments filled with textspeak gibberish... or emoticons... or, as happened once in an excess of clan enthusiasm, filling an entire chat board with repeated shouts of 'NI!'... will usually stop if advised that this doesn't go over well. There are plenty of senior players more than willing to use their impressive powers of language to make that advice persuasive.

I do keep an eye on what's being posted; that's part of my job. If, against advice, someone persists in polluting, a tactful word from me as a mod is the next step up. As a last resort, I do have the {del} button. I don't think I'm likely to have to use it often.


 
Profile Email
Quote
SicPuess
 Tuesday, February 10 2009 @ 07:53 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/10/08
Posts: 327

So, now I also will throw in... nah. I have some suggestions.

First, and foremost, turn off the conversions "r" --> "are" and "u" --> "you" in cases they are preceded by colour codes, or fullstops (without a space in between). Or devise a special control code for that (hmm. Something that would hide just the next, and only the next letter from whatever parsers and filters active. It'd allow for spelling out colour codes. Describing the grave accent proved to be... interesting.). Nobody (except maybe for some role-players) will bother to specifically un-filter chatspeak. It wouldn't even save space.

Second, and maybe not worth the trouble, filter `8 and `9 - especially, but also `b, `n and `c - completely out of the boards. Or generally block every invalid control code. Another interesting idea would be to throw in one of these, or another unused one, to just randomly select a colour.

Third, and maybe fitting that number, change the filtered things to something more... interesting.
Such as, "brb" --> "I'll just fall over dead now." "rng" --> "pedantic pea counter"

However, I do agree with Sessine. Three-quarters of the words on the list (so, actually, their filtered counterparts) I don't think I have ever seen. But when the need arises, I think it's better to have most of them still on the list.

Words to maybe go on the list/get changed:
"lol" and "lol'd" --> "Just died a little inside." (No. "awesome" would fit better. Though not for the second case.)
"ni!? ni!? ni!?" --> "Look at my badge!" (Ahem. "FEAR US.", maybe more appropiate.)
"thx", "thxby" --> "thank you"
"dk" --> "Tea"
"wtf", "wth" --> "What the hell?" (Because this usually is used when there is a reason for it - no need for it to go off it's initial meaning. Replacing WTF by "I'm confused" --> more WTF.)

Words to fly off:
"lvl"
"ne". Not so sure about this one.
"motd". Really. Even /you/ are using that one. Maybe change to "MotD", though.
"haha", "hehe". Not sure. But those were bypassed often (not so much since there is LiveChat.)




 
Profile Email
Quote
CavemanJoe
 Tuesday, February 10 2009 @ 07:58 PM UTC  
Forum Admin
Admin

Status: offline

Registered: 02/24/08
Posts: 2281

I miss the days when typing DK produced "Dragon Kill." Possibly my biggest regret in this game was substituting it for "Drive Kill" and not "Dragon Kill I MEAN DRIVE KILL, DRIVE KILL. DRIVE."

(BTW, `c, `b and `n don't work in chat, and the stylesheet has been updated somewhat so that there are no more "semi-invisible" colour codes)


 
Profile Email Website
Quote
Drakonritter
 Tuesday, February 10 2009 @ 08:03 PM UTC  
Forum Newbie
Newbie

Status: offline

Registered: 02/02/09
Posts: 5

Quote by: Count+Sessine

Also, what is gained by stopping people from talking about DKs and lvls?


Looks like the parser merely replaces "dk(s)" with "Drive Kill(s)" and "lvl" with "level". They both seem like borderline chatspeak to me, so I'd say it's understandable.

Stricter LotGD servers actually do limit talk about 'game secrets' to hints, because it's a game of exploration.


Hermein can summarize, "Look at Windows, but don't touch. Recommend Windows only to your enemies."
 
Profile Email
Quote
Tor NaGoth
 Tuesday, February 10 2009 @ 08:18 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 11/14/08
Posts: 157

As a role player (at least part of the time) I'm in favor of shrinking the filter, if not removing it entirely. specific terms like 'lol' and 'rofl' and 'wtf' I can understand blocking, but the veteran players here are also quite capable of 'correcting' inappropriate behavior whether we are Moderators or not. (My preferred method is a comicial response in character, followed up with a gentle reminder in a distraction.)


 
Profile Email
Quote
Count Sessine
 Tuesday, February 10 2009 @ 09:54 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

What Tor said.

The text parser is a stupid netcop. It's not smart enough to know when it's making things worse. Moreover, when it substitutes a huge long string in place of something that didn't need to be replaced in the first place, it cuts off the end of what is often a very carefully calculated utterance, thus further destroying meaning.

This is not funny.

It doesn't matter how 'hilarious' the quip -- it's not funny. It is merely infuriating.

Repeat: there is absolutely no way to make it funny.

What problem does it solve, anyway, that can't better be solved by other players -- who aren't stupid?

An exceedingly cut-back version that only filtered out expressions that are a) very, very common, and b) truly undesirable... well. Might be useful. Slightly. As a labour-saving device.


 
Profile Email
Quote
Rosin
 Tuesday, February 10 2009 @ 11:40 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 05/26/08
Posts: 295

Why not just set an option in the preferences? People who are likely to just 'omgwtfbbq' the towns are just as likely to leave early and not mess with their preferences.


A magpie's work is never done.
 
Profile Email
Quote
paperrabbit
 Thursday, February 12 2009 @ 05:35 AM UTC  
Forum Newbie
Newbie

Status: offline

Registered: 02/04/09
Posts: 6

Quote by: Rosin

Why not just set an option in the preferences? People who are likely to just 'omgwtfbbq' the towns are just as likely to leave early and not mess with their preferences.



I quite like that idea. New players would have to promise nicely to speak proper English before anyone would tell them how to turn the filter off. Or they'd figure it out for themselves, but if they're around long enough to do that, they're generally around long enough to start fitting in with the community.

Alternatively, you could name the option to turn off the filter something completely undesirable such as "allow other players to take all your money by clicking on your name." That way nobody touches it until they are accepted into the fold and informed that it's a secret "word-filter off" button.


 
Profile Email
Quote
Max Dougwell
 Thursday, February 12 2009 @ 05:46 AM UTC  
Forum Badass
Badass

Status: offline

Registered: 08/28/08
Posts: 100


Alternatively, you could name the option to turn off the filter something completely undesirable such as "allow other players to take all your money by clicking on your name." That way nobody touches it until they are accepted into the fold and informed that it's a secret "word-filter off" button.



Not sure that would work. I can think of a few Newbie's who would click it because it said something like that.

I'd have to go with either the hidden preferences approach, or the donating approach. Maybe some combination of the two...


 
Profile Email
Quote
Tor NaGoth
 Thursday, February 12 2009 @ 06:56 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 11/14/08
Posts: 157

Is the Filter even something that can be set on a per player basis? From what I can tell, it's applied 'en masse to the chat area.


 
Profile Email
Quote
Bernard
 Thursday, February 12 2009 @ 03:24 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/26/08
Posts: 368

I'd take it away entirely.

I mean, it doesn't even recognise that the word cum isn't just a way in which you can join two ideas or entities as a conjunction, it's also a vile sexual term for spunk... I mean jissom... I mean man-cust...


 
Profile Email
Quote
Count Sessine
 Thursday, February 12 2009 @ 06:19 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

Excellent illustration of my point, there, Bernard. Confused


 
Profile Email
Quote
CavemanJoe
 Friday, February 13 2009 @ 12:40 AM UTC  
Forum Admin
Admin

Status: offline

Registered: 02/24/08
Posts: 2281

This is a problem that occurs everywhere that a computer program tries to understand a human - no matter how well-designed the computer program.

We've established elsewhere that the Infamous Pain In The Arse Text Parser will be bowing out for Season Two. Bearing in mind that the more time I have to spend dealing with drama, the less time I have to code new Awesome Shit, what would be an effective alternative - if, indeed, an alternative is required?

Some sort of Digg-style vote system for each commentary line? In addition to helping us combat drama, this would make it a trivial matter to return the funniest and most awesome lines, but could have social impacts - would the knowledge that everyone is a potential critic have a negative effect on the social dynamic?

Removing the parser entirely and leaving everything down to human intervention? This would be the most natural and logical step if Improbable Island were a pub and I was the landlord - but there are very few pubs with a thousand regulars and two barkeeps (aye, I reckon it's pretty much down to me and Sessine now). In a pub, unruly patrons can be literally hoisted up and thrown out the door by a majority rule even if the barkeep has nipped down to change the barrel - no such thing is possible on the Island until someone alerts me of the troublemaker.

Some other system for rewarding awesomeness and deterring crapness? Remember, this is not a forum but a whole game world we're talking about here, and any potential system can affect any variable within this game world. Will you have dramallamas fined a set Req amount? Will you tie in the poster's popularity to some sort of Karma scale that affects in-game actions? Is any of this even necessary?

Discuss. Mr. Green


 
Profile Email Website
Quote
bonnero
 Saturday, February 14 2009 @ 02:24 PM UTC  
Forum Newbie
Newbie

Status: offline

Registered: 12/07/08
Posts: 5

Apparently I speak good enough English to not have set off this text filter, I'd presume that many others haven't noticed it either, so in other words, would it matter? I'm sure it is a problem for people who have a much much wider vocabulary and know proper ways in which to use words which would otherwise be filtered, but plebs generally don't so they won't notice, I am considering myself a pleb of course. Oh and I hadn't failed to notice that the only other people who had an input on this thread are real veterans of the game, perhaps that's how they know about it then.


 
Profile Email
Quote
SicPuess
 Saturday, February 14 2009 @ 05:46 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/10/08
Posts: 327

Disregard what I wrote first, I su~ No dammit I don't.

Quote by: Count+Sessine

What would happen if you just turned it all off? Or reduced it to a bare minimum, starting with only a tiny handful of words (lol, rot?fl, lmao|rot?flmao, omg, and maybe wtf)? My guess is, nothing very bad.



Having read through what others had to say on this, I agree. And I think that the Digg thing is an interesting idea to replace it (save for the above words - those are worth being filtered out. Also single Us and Rs only in the case they do not have spaces preceding and following them). I however don't think that this should be something publically visible, not at all - but only to the writer (maybe a summarized value, on the NewDay screen?). Then again, not everybody should be able to rate (and if it is only a pref saying "Do you want to bother with what your fellow Contestants have to say?").

However, in the end, I don't think any of these solutions is going to change much. Probably the most effective measure, along with the Preference for deactivating the filter, would be to make a couple more Moderators or "Gods Of Your Speech" and entrust them with the ability to entirely mute players who Just Don't Listen, not only to delete their lines.


 
Profile Email
Quote
Count Sessine
 Saturday, February 14 2009 @ 08:15 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1402

Sicpuess:

make a couple more Moderators or "Gods Of Your Speech" and entrust them with the ability to entirely mute players who Just Don't Listen, not only to delete their lines.

Sic, there's a whole escalating range of options open to a mod. There is a mute, and a tempmute, though I've never tried them out... and some even more fearsome weaponry that I don't want to touch. I've only even used the delete-comment button on rare occasions.

Most player behavior problems are best solved by... hm... let's call them parenting techniques.


 
Profile Email
Quote
Content generated in: 1.76 seconds
New Topic Post Reply



 All times are UTC. The time is now 09:59 PM.

Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content