2
我想使用--use-ngrams true
选项运行木槌,但似乎无法使其工作。Mallet:局部N-grams
./bin/mallet import-dir --input path --output topic-input.mallet --keep-seqence -- removed stopwords
现在,我要培养一种外用NGRAM型号:我采用进口我的数据
bin/mallet train-topics --input topic-input.mallet --use-ngrams true --num-topics 30 --xml-topic-report topic-report.xml
但我发现了这个错误:
Exception in thread "main" java.lang.ClassCastException: cc.mallet.types.FeatureSequence cannot be cast to cc.mallet.types.FeatureSequenceWithBigrams
at cc.mallet.topics.TopicalNGrams.estimate(TopicalNGrams.java:78)
at cc.mallet.topics.tui.Vectors2Topics.main(Vectors2Topics.java:249)
,你可以看到我正在运行mallet作为命令行工具,而不是撬动它的API来使其工作。有什么建议么?