LDA在Python中按年绘制单个主题

时间:2019-04-26 01:00:16

标签: python gensim lda

我有一组报纸头条,我想按年份绘制主题(最好是单个主题)。我发现的只是R(使用ggplot)中的示例,我想知道这是否可以在Python中完成。我是python的新手,请原谅我。

import gensim
NUM_TOPICS = 10
ldamodel = gensim.models.ldamodel.LdaModel(corpus, num_topics = NUM_TOPICS, id2word=dictionary, passes=15)
ldamodel.save('model10.gensim')
topics = ldamodel.print_topics(num_words=10)

我希望按年份列出主题,以确定一段时间内的流行程度。

0 个答案:

没有答案