本文介绍了实施gensim.LdaMallet时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循此链接上的说明(" http://radimrehurek.com/2014/03/tutorial-on-mallet-in-python/),但是在尝试训练模型时遇到错误:

I was following the instructions on this link ("http://radimrehurek.com/2014/03/tutorial-on-mallet-in-python/"), however I came across an error when I tried to train the model:

    model = models.LdaMallet(mallet_path, corpus, num_topics =10, id2word = corpus.dictionary)
    IOError: [Errno 2] No such file or directory: 'c:\\users\\brlu\\appdata\\local\\temp\\c6a13a_state.mallet.gz'

请分享您的任何想法.

Please share any thoughts you might have.

谢谢.

推荐答案

发生这种情况的原因有两个:1.您的槌球路径中有空间.2.没有MALLET_HOME环境变量.

This can happen for two reasons:1. You have space in your mallet path.2. There is no MALLET_HOME environment variable.

这篇关于实施gensim.LdaMallet时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 16:42