#Posting class for indexer, will probably be more complex as we keep adding crap to it class Posting(): def __init(self,source): self.source = source self.tf_idf = get_tf_idf() def get_tf_idf(self): #Do tf_idf here def comparator(self): #Some custom comparator for sorting postings later