Building a word list from multiple files

Manu manu.1982 at
Thu Nov 18 08:44:32 CET 2004


Here's what i want to accomplish.
I want to make a list of frequenctly occuring words in a group of
files along with the no of occurances of each
The brute force method will be to read the file as a string,split,load
the words
into a dict with  words as key and no of occurances as key.
Load the next file ,iterate through the new words increment the value
if there is
a match or add a new key,value pair if there is none.
repeat for all files.

is there a better way ??

Thanks in advance.

More information about the Python-list mailing list