【发布时间】:2014-03-07 21:47:04
【问题描述】:
好的,我正在尝试使用 Mallet 对 Windows 中的一些文档进行分类
我已经在 Linux 中实现了它。只是无法在 Windows(目标环境)中完成工作
我已将数据导入 .mallet 文件。
然后使用这个输入数据创建一个分类器。
-rw-r--r-- 1 henry henry 15197116 Feb 23 15:56 nntp.classifier
和
07/03/2014 21:28 15,197,116 nntp.classifier
但是当我在 Linux 中运行时:
bin/mallet 分类目录 --input ./testfolder --output - --classifier nntp.classifier
它迭代测试文件夹中的所有文件并转储出它认为的每个类。
但如果我在 Windows 中运行相同的命令:
bin\mallet classify-dir --input ./testfolder --output - --classifier nntp.classifier
它只是转储了命令列表:
Mallet 2.0 commands:
import-dir load the contents of a directory into mallet instances (one per file)
import-file load a single file into mallet instances (one per line)
import-svmlight load a single SVMLight format data file into mallet instances (one per line)
train-classifier train a classifier from Mallet data files
train-topics train a topic model from Mallet data files
infer-topics use a trained topic model to infer topics for new documents
estimate-topics estimate the probability of new documents given a trained model
hlda train a topic model using Hierarchical LDA
prune remove features based on frequency or information gain
split divide data into testing, training, and validation portions
Include --help with any option for more information
我确实注意到了一些事情:我
f 我在 linux 中运行 bin/mallet classify-dir --help 我得到了帮助文件,即每个命令的描述,但在 Windows 中相同的东西 bin\mallet classify-dir --help 不会产生相同的结果 - 只是上面的命令列表......(它确实如果您输入 junk 作为命令,则相同)
而较早的命令之一,例如bin/mallet import-dir --help 和 bin\mallet import-dir --help 生成相同的完整帮助文件输出。
【问题讨论】: