Re: $100.00 Programming Contest
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 01, 2002
- 526 views
David Cuny writes: > 0. Will all words appear in Junko's dictionary? Not necessarily, but you can count on the vast majority of them being there, say 90% or more. > 1. Does case matter? That is, the encrypted > string "This is encrypted" and > "THIS IS ENCRYPTED" are essentially the same thing. You'll know the case from the case of letters in the input. Your output should have the same case. Maybe I don't understand what you mean. > 2. Can anything that isn't a character (other than apostrophes) > be treated as whitespace? For example: > > "This-is encrypted!\n\n" > >is basically: > > { "THIS", "IS", "ENCRYPTED" } Junko's dictionary does contain some hyphenated words. A hyphen could be considered part of a word, but in many cases it could be considered a separator between two words. Maybe I'll defer for now the decision about whether to include hyphenated words in the input. > This would disallow having to deal with apostrophes: > > can't > they're The above two words are in her dictionary as one word. > and hyphens: > > reddish-blue > > would just become a pair of dictionary words. "reddish-blue" is not in her dictionary, but "reddish" and "blue" are. I guess if your program has trouble with hyphens, apostrophes etc., it could just ignore those words, at least initially. > Of course, I'm assuming that you want the output formatted > the same as the inputs. Yes. > 3. How many words are in the input sentances? I don't think the length of a sentence matters very much, but I was thinking of testing competing programs on a variety of inputs, from one to 5 typical length sentences. It depends on how good the programs are. > I'm curious how the "goodness" of a particular solution > will be evaluated. Once strings are parsed into tokens > (fairly trivial), there are a number of > different approaches you could take, all of which are legitimate. > Assuming that a dozen people submit a "winning" program, > what criteria do you then use? Points for clever recursion, > less lines of code, speed, or being the closest to the solution > that Robert's written? I was thinking of running the competing programs on several input texts of various lengths, and deciding the winner based on the number of correct words in the output. I don't want to use any subjective measures of goodness. By the way, I haven't solved this problem myself. I started to work on it many years ago, and found it intriguing, but I didn't get very far. > One other thing - just because a sentance can be decrypted > into legal words doesn't guarantee that it's correct. > For example, 'j' and 'v' are fairly uncommon. So if the > word was "jibe" and we translated it "vibe", is it still > a good solution (assuming all the other words were > 'translated' as well)? I'll be judging based on what the input text actually was, not on what it could possibly have been. Kat writes: > A question David left off: What if the program uses Karl's interpreter? The donor requested that winning entries must run on the standard RDS Euphoria 2.3 interpreter. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com