Cannot start Mallet TopicModel

I am trying to run a Mallet simulation, but received the following error:

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) 

I already added all the jar files! Could you advise what is the problem?

Thanks,

0
java topic-modeling mallet
source share
2 answers

I got the first error from which he could continue.

But the actual exception that stops you seems like you don't have a list of MALLET stop words in the right place. I uploaded their list of stop words en.txt to a specific place and gave it a direct path instead of the โ€œstoplists / en.txtโ€ that worked.

+1
source share

Missing file with your English stop words (stoplists \ en.txt). Try loading the jar files again or just use maven, which will make it easy for you to import into a java project. In the Maven POM file, add:

 <dependencies> <dependency> <groupId>cc.mallet</groupId> <artifactId>mallet</artifactId> <version>2.0.8</version> </dependency> .... </dependencies> 

The latest version can be found here .

0
source share

All Articles