use of edu.illinois.cs.cogcomp.lbjava.learn.Learner in project cogcomp-nlp by CogComp.
the class Main method train.
public void train() {
if (!IOUtils.exists(modelsDir))
IOUtils.mkdir(modelsDir);
Learner classifier = new PrepSRLClassifier(modelName + ".lc", modelName + ".lex");
Parser trainDataReader = new PrepSRLDataReader(dataDir, "train");
BatchTrainer trainer = new BatchTrainer(classifier, trainDataReader, 1000);
trainer.train(20);
classifier.save();
trainDataReader.close();
}
Aggregations