On Tue, Jul 13, 2010 at 11:49 PM, Frank1981 <[email protected]> wrote: > > First of all: I'm not sure if this question is allowed here. If not, I > apologize > > I'm trying to solve the following problem: For each word in a text find the > number of occurences for each unique word in the text. > > i've come up with the following steps to solve this: > * remove all punctuation except for whitespace and make the text lowercase
A minor point: instead of removing the punctuation, you maybe should convert it to whitespace. Otherwise in texts like "there was a quick,brown fox" (notice the missing space after the comma) you'll have the word "quickbrown" instead of 2 words "quick" and "brown". David. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
