def _create_tf_matrix(freq_matrix):
    """get term frequency

    Args:
        frequency matrix (dict)

    Returns:
        term frequency matrix
    """      
    tf_matrix = {}

    # frequency divide by length of document
    for sent, f_table in freq_matrix.items():
        tf_table = {}

        count_words_in_sentence = len(f_table)
        for word, count in f_table.items():
            tf_table[word] = count / count_words_in_sentence

        tf_matrix[sent] = tf_table

    return tf_matrix