1
genf를 사용하여 다음과 같이 tf-idf 값을 계산합니다.python에서 gensim의 tf-idf 값을 얻는 방법
texts = [['human', 'interface', 'computer'],
['survey', 'user', 'computer', 'system', 'response', 'time'],
['eps', 'user', 'interface', 'system'],
['system', 'human', 'system', 'eps'],
['user', 'response', 'time'],
['trees'],
['graph', 'trees'],
['graph', 'minors', 'trees'],
['graph', 'minors', 'survey']]
dictionary = corpora.Dictionary(texts)
corpus = [dictionary.doc2bow(text) for text in texts]
tfidf = models.TfidfModel(corpus)
이제 tf-idf 값이 가장 높은 3 단어를 얻고 싶습니다. 제발 도와주세요!