def get_tf_idf(doc_tf, idf_map):
    """
    calculate the product of the term frequency and the idf
    :param doc_tf: term frequency map of the string
    :param idf_map: idf map of all the strings
    :return: vector map of a document
    """

    vector = {}

    for word in doc_tf:
        if word in idf_map:
            tf_idf = doc_tf[word] * idf_map[word]
            if tf_idf:
                vector[word] = tf_idf

    return vector