Click to See Complete Forum and Search --> : freq of contents in a text file


martman09
09-16-2007, 01:20 AM
Im looking for a easy way to generate a freqency table for the contents of a textfile.

One problem I have from the start is that i want this to be based off of "words" of a length I can specify. Instead of generating all the possibilities id like it to be smart enough to only calculate freqs for whats actualy in the file.

By "words" I mean anything. Single characters, numbers, multiple letters, etc.

What would be a good way to go about this?

I cant seem to come up with a good set of textutils to glue together and writing a C/C++ program for this seems kind of overkill, but something I could probally pull off.

Advice?

Thanks

hotcold
09-16-2007, 04:09 PM
Hi.

See http://www.linuxforums.org/forum/linux-programming-scripting/93387-counting-words-file-sorting-them-according-their-frequency.html for a discussion of this topic ... cheers, hotcold