def idf(self, tf_matrix, tf_global_matrix) -> dict:
    total_documents = len(tf_matrix)
    idf_matrix = {}
    for (sent, f_table) in tf_matrix.items():
        idf_table = {}
        for word in f_table.keys():
            idf_table[word] = math.log10((total_documents / float(tf_global_matrix[word])))
        idf_matrix[sent] = idf_table
    return idf_matrix
def idf(self, tf_matrix, tf_global_matrix) -> dict:
    total_documents = len(tf_matrix)
    idf_matrix = {}
    for (sent, f_table) in tf_matrix.items():
        idf_table = {}
        for word in f_table.keys():
            idf_table[word] = math.log10((total_documents / float(tf_global_matrix[word])))
        idf_matrix[sent] = idf_table
    return idf_matrix