[Tutor] data structures

Dana dana-s at charter.net
Thu Dec 2 02:51:20 CET 2010


Hello,

I'm using Python to extract words from plain text files.  I have a list 
of words.  Now I would like to convert that list to a dictionary of 
features where the key is the word and the value the number of 
occurrences in a group of files based on the filename (different files 
correspond to different categories).  What is the best way to represent 
this data?  When I finish I expect to have about 70 unique dictionaries 
with values I plan to use in frequency distributions, etc.  Should I use 
globally defined dictionaries?

Dana


More information about the Tutor mailing list