def bm25_score(self, term_frequency, document_frequency, document_length):
    tf = (((term_frequency / self.k1) * ((1 - self.b) + (self.b * (document_length / self.inverted_index.average_document_length)))) + term_frequency)
    idf = np.log((((self.total_documents - document_frequency) + 0.5) / (document_frequency + 0.5)))
    return (tf * idf)
def bm25_score(self, term_frequency, document_frequency, document_length):
    tf = (((term_frequency / self.k1) * ((1 - self.b) + (self.b * (document_length / self.inverted_index.average_document_length)))) + term_frequency)
    idf = np.log((((self.total_documents - document_frequency) + 0.5) / (document_frequency + 0.5)))
    return (tf * idf)