动态主题模型路径

时间:2019-06-27 18:22:26

标签: python nlp gensim lda topic-modeling

感谢您的光临!我对动态主题模型的路径有疑问:

>>> from gensim.test.utils import common_corpus, common_dictionary
>>> from gensim.models.wrappers import DtmModel
>>>
>>> path_to_dtm_binary = "/path/to/dtm/binary"
>>> model = DtmModel(
...     path_to_dtm_binary, corpus=common_corpus, id2word=common_dictionary,
...     time_slices=[1] * len(common_corpus)

动态主题模型二进制文件的路径是什么?那是我需要安装或下载的东西吗?我在哪里可以安装或下载?

谢谢!

1 个答案:

答案 0 :(得分:2)

根据here,您可以采用以下两种方法之一:

  1. 使用https://github.com/magsilva/dtm/tree/master/bin

  2. 中的操作系统版本的预编译二进制文件
  3. 从/ blei-lab / dtm手动编译二进制文件(https://github.com/blei-lab/dtm/blob/master/README.md中提供了原始指令),或使用此

git clone https://github.com/blei-lab/dtm.git
sudo apt-get install libgsl0-dev
cd dtm/dtm
make