
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? Thanks, Dominic.

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

On Saturday 11 Feb 2006 1:09 pm, Jon Fairbairn wrote:
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. Jon, Much better. Thanks, Dominic.
participants (2)
-
Dominic Steinitz
-
Jon Fairbairn