|
| Author |
Message |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Wed Mar 16, 2005 7:37 pm Post subject: |
|
|
Dazzy reminded me of a study I read about last year (don't know when the actual study was done though) about how we humans can understand words and sentences even when the letters in the words are randomly sorted. But as I remember the study, the first and last letter of each word need to be in their proper place.
| Code: | | did you konw taht it dosne't mtaetr waht oerdr you put yuor ltetres in? Aoccdrnig to rscheearch at an Elingsh uinervtisy, tath's bcuseae we do not raed ervey lteter by ilstef, but the wrod as a wlohe. Taht mneas you dno't hvae to wrory aobut tipnyg erorrs druing Intsnat Measgisng, jsut as lnog as all the lettres are tehre! |
But if the letters are completely random, it makes reading it much harder. Anyway, the idea I am posting about is more of a challenge: write a Perl script that can convert any string of text (it should be somewhat long like the above) into a completely word-random string and into a first/last letter same word-random string. So basically, you would have functions like:
| Code: | | my $rand1 = &randomize1( 'birds have wings and feathers' );<br /># would return something like "brdis hvae wgins and feerahts'<br /><br />my $rand2 = &randomize2( 'birds have wings and feathers' );<br /># would return something like "srdib evha sniwg dan esfrahte' |
Then the question is can you understand the second one as well as the first? Besides that, it's a fun programming challenge. 
EDIT: I realize for some of you this is a fairly easy challenge. If you do it, maybe you shouldn't post right away and let others have a chance. |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Wed Mar 16, 2005 7:49 pm Post subject: |
|
|
I gotcha:
| Quote: | Kirsle: !screnglish birds have wings and feathers CodyCKS: bdris hvae wgins and faretehs
Kirsle: !screnglish birds have wings and feathers<->left CodyCKS: sidrb evah sgniw dna shaeterf |
Command's usage: !screnglish sentence<->left|right (right is default if omitted)
edit code omitted, gonna give other people a chance first  _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Wed Mar 16, 2005 8:02 pm Post subject: |
|
|
| Quote: | Daz says: !mix this script proves that the first is easier to read Evolution (Beta 0.9) says: >>With the first and last kept normal : tihs sciprt pvoers taht the fsrit is esaier to raed >>With all jumbled: tish isrptc rpsoev that the srfit si seriea to reda
Which is easier to read?
|
not bad... |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Wed Mar 16, 2005 8:05 pm Post subject: |
|
|
| Cool, I knew some people would build it quickly. And it looks like making it a command or maybe a cgi can prove that you got it to work without having to post your code. |
|
| Back to top |
|
 |
mat007 Almost An Agent

Joined: 12 Jan 2004 Posts: 1375
   votes: 2
|
Posted: Wed Mar 16, 2005 8:28 pm Post subject: |
|
|
hehe
| Quote: | [Matthew :: Jo0] - [My two new fans seem to be doing a good job ] says: !mix birds have wings and feathers extraBOT :: [ Version 2.2b ] says: bsird hvea gwnsi dan eftahres |
|
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Wed Mar 16, 2005 8:31 pm Post subject: |
|
|
The REAL challenge now, is to get it so you can say "bdris hvae wgins and faretehs" to your bot, and have the bot know you what you really said.  _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Wed Mar 16, 2005 8:32 pm Post subject: |
|
|
| Mat007, you need to include the version that keeps the first and last letter of each word the same. |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Wed Mar 16, 2005 9:06 pm Post subject: |
|
|
QUOTE(Mojave @ Mar 16 2005, 08:32 PM) Mat007, you need to include the version that keeps the first and last letter of each word the same. [right][snapback]46963[/snapback][/right]
|
Yeah, thats the easiest bit...  |