def global_word_freq(self, tf_matrix) -> dict:
    tf_global_matrix = {}
    for (sent, f_table) in tf_matrix.items():
        for (word, count) in f_table.items():
            if (word in tf_global_matrix):
                tf_global_matrix[word] += count
            else:
                tf_global_matrix[word] = count
    return tf_global_matrix
def global_word_freq(self, tf_matrix) -> dict:
    tf_global_matrix = {}
    for (sent, f_table) in tf_matrix.items():
        for (word, count) in f_table.items():
            if (word in tf_global_matrix):
                tf_global_matrix[word] += count
            else:
                tf_global_matrix[word] = count
    return tf_global_matrix