Re: Contest Update
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 07, 2004
- 536 views
Jason Gade wrote: > > Derek Parnell wrote: > > > > Six new submissions on web. > > > > <a > > href="http://www.users.bigpond.com/ddparnell/contest1/rules.htm">http://www.users.bigpond.com/ddparnell/contest1/rules.htm</a> > > > > -- > > Derek Parnell > > Melbourne, Australia > > > > Hi, Derek. > > I'm kind of confused on the results as I'm not sure how to fix them. > > My entry says wrong count and failed file6 (the empty file) but my program > just prints a message and then exits. Should it still try to print some kind > of count for a zero-length file or a file with no discernable words? This is my mistake. Currently, the program I wrote to evaluate the results only looks for 'counts' and formatting. For this file, I need to be a bit smarter. However, this only lost you one point out of 460 so its not a big deal (yet). > I also don't understand how it failed on file8 (War and Peace) since I've been > testing this file (or one similar) all through the development. Don't know either. I'm not with the machine I tested the submission on at the moment so I can't inspect the detailed results. However, because you got all the top-used tokens correct, I'm going to guess that its the 'funny' tokens you are having problems with. My copy of file8 has been doctored somewhat to include some odd looking tokens. Check again for tokens that might contain quotes and/or hyphens, especially at the start or end of a string. Also, strings just made up of quotes gave my program problems at first. > Hmmm... Difficult to troubleshoot when I don't know what my program is doing > wrong. > > Any troubleshooting hints anyone? I'll give a hint that some people may have tripped up on. A file opened as "text" will appear to prematurely end if it contains the End-Of-File marker for text files. -- Derek Parnell Melbourne, Australia