def fit_tfidf(count_vector):
'''
Transforms a count vector into a tf vector.
TF: count vector normalized on legnth of docs.
'''
tfidf = TfidfTransformer(use_idf=False)
tfidf_vector = tfidf.fit(count_vector)
return tfidf_vector
评论列表
文章目录