我从一个文本正文中训练了一个模型,指定了20个主题,但是当我在新文档上运行推理器时,它只输出10个主题权重。这些是我使用的命令:
bin / mallet import-file --input /data/research/bazaarvoice/data/review_nouns.txt --output /data/research/bazaarvoice/data/review_nouns_mallet.mallet --keep-sequence --use -pipe-from /data/research/bazaarvoice/data/ques_mallet.mallet
bin / mallet train-topics \ --input /data/research/bazaarvoice/data/ques_mallet.mallet \ --num-topics 20 \ --output-topic-keys /data/research/bazaarvoice/data/ques_train_keys.txt \
bin / mallet推断主题\ --input /data/research/bazaarvoice/data/review_nouns_mallet.mallet \ --inferencer-filename /data/research/bazaarvoice/data/ques_train_mallet_topics.txt \ --output-doc-topics /data/research/bazaarvoice/data/review_new_topics.txt
答案 0 :(得分:1)
将--num-topics 20
添加到infer-topics
来电。