Training data 已删除事件消息OpenNLP。在OpenNLP中删除训练数据
我已经标记了数据(标签和文本),如下所示:Training data 已删除事件消息OpenNLP。在OpenNLP中删除训练数据,training-data,opennlp,categorization,Training Data,Opennlp,Categorization,我已经标记了数据(标签和文本),如下所示: category1, "train message 1" category1, "train message 2" category1, "train message 3" category2, "train message 4" category2, "train messsage 5" 我尝试用Java OpenNLP库训练我的分类模型 Docca
category1, "train message 1"
category1, "train message 2"
category1, "train message 3"
category2, "train message 4"
category2, "train messsage 5"
我尝试用Java OpenNLP库训练我的分类模型
DoccatModel model=DocumentCategorizerME.train(“pt”、sampleStream、params、customFactory)代码>
当我训练模型时,我会收到奇怪的信息:
**Indexing events using cutoff of 5**
**Computing event counts... done. 5441 events**
Dropped event animals*:[bow=live, bow=animals, ng=:live:animals]
Dropped event animals*:[bow=aquariums]
Dropped event animals*:[bow=aquatic, bow=plant, bow=fertilizers, ng=:aquatic:plant,ng=:aquatic:plant:fertilizers, ng=:plant:fertilizers]
Dropped event apparel*:[bow=activewear]
Dropped event apparel*:[bow=one, bow=pieces, ng=:one:pieces]
为什么这意味着已删除事件“类别”:[…]?***我添加了自定义工厂,它可以工作
int minNgramSize = 2;
int maxNgramSize = 3;
DoccatFactory customFactory = new DoccatFactory(new FeatureGenerator[]{
new BagOfWordsFeatureGenerator(),
new NGramFeatureGenerator(minNgramSize, maxNgramSize)
});
DoccatModel model = DocumentCategorizerME.train("pt", sampleStream, params, customFactory);
我添加了定制工厂,它可以正常工作
int minNgramSize = 2;
int maxNgramSize = 3;
DoccatFactory customFactory = new DoccatFactory(new FeatureGenerator[]{
new BagOfWordsFeatureGenerator(),
new NGramFeatureGenerator(minNgramSize, maxNgramSize)
});
DoccatModel model = DocumentCategorizerME.train("pt", sampleStream, params, customFactory);
它发生在训练数据中有相似的短语时,我想…谁看到了相同的事件?神经网络是否跳过任何样本?你发现了问题所在吗?我使用了更多的训练数据并将OpenNLP更新到1.8版本,但不是最后的1.9.0版本。此后,这个问题解决了。我认为,训练数据很糟糕,没有得到纠正。我有5900个训练数据样本,OpenNLP不是跳过它。它发生在训练数据中有相似的短语时,我想……谁看到了相同的事件?神经网络跳过了任何样本吗?你发现了什么问题吗?我使用了更多的训练数据,并将OpenNLP更新到1.8版本,但不是最后的1.9.0版本。之后,这个问题解决了。我认为,训练数据很糟糕,没有得到纠正。我有5900个训练数据样本,开放NLP不是跳过它。