2012-03-27 5 views
2

--use-ngrams true 옵션을 사용하여 말렛을 실행하고 싶지만 제대로 작동하지 않는 것 같습니다.Mallet : 주제별 N 그램

./bin/mallet import-dir --input path --output topic-input.mallet --keep-seqence -- removed stopwords 

가 지금은 국소 N- 그램 모델을 훈련 할 : 나는 사용하여 내 데이터를 가져온

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가 제대로 작동하지 않을 것입니다. 어떤 제안?

당신이 '--keep-시퀀스 bgirams'인수를 사용을 통해 국소-N- 그램 모델링을 실행하고자하는 디렉토리를 가져옵니다 (예 :

./bin/mallet import-dir --input path --output topic-input.mallet --keep-sequence-bigrams --remove-stopwords 

해야합니다 :

답변

4

대답 발견 주제 모델을 다음과 같이 실행합니다.

bin/mallet train-topics --input topic-input.mallet --use-ngrams true --num-topics 30 --xml-topic-report topic-report.xml