The Switched ON Phrase Generator
October 23, 2009
Category: News & Announcements | by: Version3
Another of these little project ideas that has come on the show, is now yours to enjoy or confuse others. The Switched ON Show Phrase generator was created to give you something to say in every situation. Just hit generate, and you’ll be able to compare the beauty of a woman in public to something anyone can relate to: “Did you see her? She’s as hot as a gynecologist with down syndrome!” You’ll amaze your friends and they’ll be as envious as a gallon of accountants at a Six Flags theme park or as confused as an army of bionic wookies at an adult film shoot; either way you are likely to be given the key to the city, be the benefactor of a virgin sacrifice, and be elected the king of words.
By submitting a comment here you grant The Switched ON Show a perpetual license to reproduce your words and name/web site in attribution. You additionally submit to public ridicule, finger pointing or childish name calling. Inappropriate comments will be rewarded or removed at admin's discretion.

This will keep me "as busy as a few stupid toothless librarians in a theme park". I approve.
as busy as a group of hermaphrodites in a barrel of hopes
Niiiiiice. But I don't know if it's because I'm as lost as a briefcase of lesbian hobbits in a Ronald McDonald costume, but the generate button doesn't work, I can only get new phrases by refreshing. I still think it's as impressive as a basket of treasure hunters with a rash though.
now that is "as slick as a shrunken file clerk at a rock concert"
Anyone else having the problem that Bucho mentioned? Bucho, are you using IE?
It's weird, the only browser I never test when doing SOS updates (well of the major three) is IE. I do it on all other projects, but totally skip it here. Interesting.
Here are my findings.
Mac OS X 10.4.11
Firefox 3.5.2: Doesn't work
Safari 4.03: Works
PC - XP Service Pack 3
IE 8.0.6001.18702: Works - message appears in an input box
Firefox 3.5.3: Doesn't work
Safari 4.0.3: Works
Chrome 3.0.195.27: Works
Opera 10.00: Works
Netscape 8.0.2: Doesn't work
Hmmm, thanks for bothering to do it there Newman. I have the same ver of FF on my machine, and it does work. Well, it took me two weeks to get around to building the page, let us now see how long it will take me to getting around to debugging it.
I also use the Fox Of Fire.
I borrowed access to a Mac OS X 10.5.6 and tried it in Firefox. No luck.
I'm on the snowy kitten....
I'll test it on one of the other Macs at home tonight, and figure out what the issue is. MS is just dumb.
OS X 10.6.1 with firefox 3.5.3 (and safari 4.0.3) works fine for me.
Yeah, so take that shit!!!
I'll find out why other configs are not happy though. Probably JavaScript poopies.
just fired up the wife's laptop. works fine with vista sp2 using:
firefox 3.5.3
ie 8
opera 9.5
java is SE 6 (i assume the most recent update, 15? 16?) on OS X and 1.6.0 on vista (i assume these are equivalent. don't know why windows still reports java this way).
For some reason, there's nothing to click on in your post for me. I would assume the bold letters with the title of the project is what you're supposed to click on, but it just shows up as regular colored text to me, instead of a link.
The words "use it" were the link. I've added the link inline on the original post to make it easier. Anyone else still having trouble with it? I haven't worked on it by the way, I just reuploaded the file when I made a change.
Ah, and so it is. Because the links look the same as the text sometimes I overlook them.
Here are my results:
Ubuntu Linux 8.10
Firefox 3.5.3 Generate button doesn't work
Opera 10.0 Generate button works fine
Chome / Chromium dev build Generate button works fine
For me, it works best in Chrome / Chromium. The fastest and the smoothest.
I came across one questionable phrase:
"as furry as a flea-ridden enigmatic hypocondriac with a enlarged tooth"
The "a"s need to be aware of if they're in front of a vowel or not.
as lazy as many foreign street performers in a porn film
Yeah, I've built that in to a few areas, but I have to rebuild part of it for the last noun. The trouble is, in making them a new category (that's how they are organized) the odds change for the words being picked. So I'd need to have a lot of words to put in there, or nest it in something else to work the odds back down. Thanks for the feedback there. There are a few of them that have 'a a' or 'a the' and stuff in them. And that's just from being entered incorrectly. Thanks!
Interesting on this FF thing. I'll look into it. Could be the positioning thing, anyone tried to click to the right of the button in a problematic FF page load by any chance?
Why not just do a parse on the final string? I'm not sure how you'd do it in PHP, as I have yet to learn it, but in Python for instance you could do a quick scan of the string for the word "a", then move two characters farther in the string and check to see if the character is a vowel. If so, use the index of "a" to replace it with "an". That's how I'd do it anyhow.
In Firefox, the JavaScript error you get when clicking the button is: "testFrame is not defined" from line 57.
ah, I've got a framename wrong. Thanks for that.
As for the idea of parsing, see that's not 100% either. The trouble you get into is the rule is obvious, however in conventional spoken English, there are times when you would use AN because the rule is based on pronunciation, and not on spelling. For example, "A unicorn" or "AN hour". So, that's your answer as to why I wouldn't do it that way.
The way this thing works, I'm choosing a random entry from a set of nested arrays that build the sentence. For example, one array may have "noun" for an entry and " 'adjective' noun" for another, so it has to pull another random entry from the nested array to populate the adjective variable that exists.
The solution I was using before was to put the "a/an" into the array entry, but makes updating them suck. I'll probably just use a new nested array for entries that are dependent on the word "an" and work to not inadvertently increase their odds of being displayed.
The way I would handle the above exceptions is to create an array full of the exceptions and at some point in the processing have the word after "a" compared to the list of exceptions. In Python this would be pretty easy to do by building a list of exceptions, throwing the word at it and it'd tell you if that word existed in the list, but I don't know if it'd be so easy in PHP.
Probably would, but probably a different approach. I'd prefer to keep the structure of these word objects (arrays) the same as the others. In 6 months it would still be easy for me (the non-coder) to see what I'm doing with exception words, rather than handling things for pronunciation. I'd rather just see a mistake when it loads (if I didn't catch it when I populated it), and move it to the appropriate container. In some cases, this is really important, because it may be used in more than one place. There is some similar logic being used for plurals, since not only are many plurals not "s", but some just don't work well, and are not even allowed in the container. Like "Earth" for example.
It all reminds me of when I created a translation program a long time ago in Java. Inspired by those programs that would convert your sentence to slang and such, I created a translation program with user-editable pluggable dictionaries so anyone could create any sort of translation system they wished and plug it in.
I'm working on some other stuff to use this for. Most of it is just more fun SOS stuff.
I do have a book on PHP I haven't read yet. Once I do, the first thing I'm going to try to create is a dice rolling web page. I know such things already exist, but I want to create one myself.
Yeah, not hard. It will make sense to you, you just need to get in there and do it.
And, you guys should have a working FF version of the page now. While having this discussion I bothered to look into the problem. It was the way I was performing the refresh function by ID... FF just didn't like the function. Now I'm identifying the frame ID better, and calling it by ID during the refresh in a manner more friendly with FF. I've got it working on Safari, FF, and Opera.

Let me know if it still doesn't work for anyone.
It works great now
.
I think the trickiest part of my project will be linking it to a MySQL database to save all the dice results.
as aggressive as a Pillipino in a darkness factory
Nah, that will be easy too. Reading and writing to MySQL is the easy stuff. At least you have a project in mind, just get in there and do that shit, yo!
It'll be as dreamy as a swarm of foreign goal oriented accountants on an active volcano!
You're right. After all, it should be as oblivious as a tri-nippled shoeless door to door 18-inch rubber cock salesman at the end.
Works like a dream now Bryan. Quick too.
As quick as a change tray of bald helpers at a bowling alley.
BALD HELPERS!!! The best kind of helpers.
Like that Newman, he's the best of the best kind of helper. You don't happen to be bald do you Newman? I know you might have said so in the past but I don't remember, I'm as stoned as a two-faced pantless frog in a bear factory.
THAT'S WHERE THEY MAKE BEARS!!!
They don't put the fur on right away though, they leave that until last. Before that they're smooth. As smooth as a angry speckled wookie covered in organs.
COVERED IN ORGANS!!!
Someone likes the generator
I'm as envious as a cybernetic nude giver at a the end.
Oh shit yes, ol' Bucho's as happy as a box of distilled 8 year olds in a track full of pelican backs.
WHAT THE HELL IS A TRACK FULL OF PELICAN BACKS?!?
I don't know but it sounds tasty. And silly. As silly as a sugar coated cleptomaniac on acid.
SUGAR COATED?!? That's sticky.
How sticky?
Works great now, as if it was 'as tall as ten fluffy cyclists on Golden Pond'
or possibly 'as maniacal as a worm at a topless bar'
if pelican back is anything like fat back, i'm in.
I think it might be but I don't know for sure because pelicans are so temperamental. How temperamental? Why, as tempermental as a legion of angry tri-nippled fat chicks with a skin condition.
Yeah, I should add a button that polls the generator and pastes the results in a new post. I'd love to do it, but I'm quite literally as lazy as a stack of foreign civil engineers on crack.
No need man, this thing works just nice as it is where it can spit out the nonsense and we can build a context around it. I'm real happy with it, as happy as a drawer full of shrunken pyromaniacs in a jar full of toothpicks. Point of fact, I'd be using it even more if I didn't keep falling on the ground on account of my chair being as slick as a mechanical dreamy murderer at a monster truck rally.
Another of these little project ideas that has come on the show, is now yours to enjoy or confuse others. The Switched ON Show Phrase generator was created to give you something to say in every situation. Just hit generate, and you'll be able to compare the beauty of a woman in public to something anyone can relate to: "Did you see her? She's as hot as a gynecologist with down syndrome!" You'll amaze your friends and they'll be as envious as a gallon of accountants at a Six Flags theme park or as confused as an army of bionic wookies at an adult film shoot; either way you are likely to be given the key to the city, be the benefactor of a virgin sacrifice, and be elected the king of words.

this is an automatically generated larkitect thread harassment.
You do understand that these are a product of posting articles on the front page, yes? I've set it up to work more like how MacRumors.com operates. vBulletin makes for a much better comment engine.
i do now good sir. haven't seen the main page in ages. i like it.
It's the same only more sameness.
as worthless as a toothless sugar coated pedophile in a hamburger warehouse
I made it my goal to start using the phrase generator in my work emails today. Here is the phrase I used:
Now I have also been