Building a word list from multiple files
Manu
manu.1982 at gmail.com
Thu Nov 18 02:44:32 EST 2004
Hi,
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.
Manu
More information about the Python-list
mailing list