[Haskell-cafe] Re: Optimizing spelling correction program
kamil at dworakowski.name
Mon Jun 22 08:17:05 EDT 2009
On Jun 22, 10:03 am, Eugene Kirpichov <ekirpic... at gmail.com> wrote:
> Hey, you're using String I/O!
> nWORDS <- fmap (train . map B.pack . words) (readFile "big.txt")
> This should be
> WORDS <- fmap (train . B.words) (B.readFile "big.txt")
> By the way, which exact file do you use as a misspellings file? The
> corpus linked to at Norvig's page has many.
> And do you have a driver program that I could run and obtain your timings?
Yep, Don pointed that out and I have changed the program accordingly.
It didn't make any difference though. The time spent on building the
dictionary is a small portion of the overall run time.
Please see the repository contents for the current version of the
The eval-bytestring.hs there is the program I used for timing. Inside
of it you will find the name of the misspellings file needed.
Thanks all for the suggestions. I'll try them when I get home tonight.
More information about the Haskell-Cafe