[Haskell-cafe] Digrams

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Sat Feb 11 08:09:06 EST 2006


On 2006-02-11 at 12:25GMT Dominic Steinitz wrote:
> I've quickly put this together to measure frequencies of pairs of letters 
> (e.g. 1st and 2nd) in words. It works fine on a small test data sets but I 
> have a feeling that it will perform poorly as it spends a lot of time 
> updating a 26*26 array. Before I throw a dictionary at it, does anyone have 
> any suggestions?

I think this is the sort of thing for which accumArray was
invented.

-- 
Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk




More information about the Haskell-Cafe mailing list