def build_index(in_dir, out_dict, out_postings): """ build index from documents stored in the input directory, then output the dictionary file and postings file """ # initialize the class indexer = Indexer(out_dict, out_postings) indexer.build_index(in_dir) # save to file indexer.SavetoFile()