def get_tf_idf_vector(tags, all_terms, idf_map):
    return [(1 if term in tags else 0) * idf_map[term] for term in all_terms]
Computes a tf-idf vector for a given set of tags.
dataset/ETHPy150Open dchaplinsky/unshred-tag/metrics/tfidf.py/get_tf_idf_vector