0
我用Mallet训练了一个maxent文档分类模型,结果是130MB,这对于我希望运行它的实例来说太大了。我想知道是否有办法潜在地减少模型的词汇量,从而减少整体模型的大小。有这样做的管道吗?我目前使用的管道是Mallet文档分类 - 缩小词汇大小
Pipe instancePipe = new SerialPipes(new Pipe[]{
new Target2Label(), //creates labels
new Input2CharSequence("UTF-8"), //read the file as string
new CharSequence2TokenSequence(), //tokenize the string
new TokenSequenceLowercase(), //lowercase the tokens
new TokenSequenceRemoveStopwords(false), //remove stopwords
new TokenSequence2FeatureSequence(), //convert tokens to features
new FeatureSequence2FeatureVector(), //create feature vector
//new PrintInputAndTarget() //print everything
});
任何其他提示以减少模型的大小也将是有益的