Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~462 People Reached
Favorite Forums
Favorite Tags
Member Avatar for csguy11

[code] def index_dir(self, base_path): num_files_indexed = 0 allfiles = os.listdir(base_path) #print allfiles num_files_indexed = len(allfiles) #print num_files_indexed docnumber = 0 self._inverted_index = {} #dictionary for file in allfiles: self.documents = [base_path+file] #list of all text files f = open(base_path+file, 'r') lines = f.read() # Tokenize the file into words tokens …

Member Avatar for TrustyTony
0
462