我试图运行Mallet`s的主题建模,但得到了以下错误:
Couldn't open cc.mallet.util.MalletLogger resources/logging.properties file.
Perhaps the 'resources' directories weren't copied into the 'class' directory.
Continuing.
Exception in thread "main" java.lang.IllegalArgumentException: Trouble reading file stoplists\en.txt at cc.mallet.pipe.TokenSequenceRemoveStopwords.fileToStringArray(TokenSequenceRemoveStopwords.java:144) at cc.mallet.pipe.TokenSequenceRemoveStopwords.<init>(TokenSequenceRemoveStopwords.java:73) at LDA.TopicModel.main(TopicModel.java:23) 我已经添加了所有的jar文件!您能告诉我这里有什么问题吗?
谢谢,
发布于 2014-11-15 04:07:42
我收到了第一个错误,它也可以继续。
但实际的例外似乎是您没有在正确的位置有MALLET stop单词列表。我下载了他们的en.txt停止列表到一个特定的位置,并给了它一个直接的路径,而不是“en.txt/en.txt”,这是有效的。
发布于 2017-09-19 02:53:56
您的英文停用词文件丢失(stoplists\en.txt)。或者尝试再次下载jar文件,或者只使用maven,这将使您更容易导入到java项目中。在Maven POM文件中添加:
<dependencies>
<dependency>
<groupId>cc.mallet</groupId>
<artifactId>mallet</artifactId>
<version>2.0.8</version>
</dependency>
....
</dependencies>最新版本可以在here上找到。
https://stackoverflow.com/questions/24563419
复制相似问题