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來使其工作。有什麼建議麼?