【发布时间】:2019-02-14 06:23:03
【问题描述】:
我正在 python 中运行 tfidf 模型。
texts=[**tokenized words**]
dictionary = corpora.Dictionary(texts)
corpus = list(map(dictionary.doc2bow,texts))
test_model = models.TfidfModel(corpus)
corpus_tfidf = test_model[corpus]
它返回的输出为完全相同的单词提供了一些值模式。 例如,我选择了“AAA”这个词。
key score
0 "AAA" 1
2323 "AAA" 0.896502
4086 "AAA" 0.844922
即使它们完全相同,为什么它们的值却各不相同。
【问题讨论】:
标签: python pandas gensim tf-idf corpus