System.err.println("Training tagger");
ObjectStream<POSSample> tes = new PosSampleStream(new ParseSampleStream(new PlainTextByLineStream(new java.io.FileReader(inFile))));
POSModel posModel = POSTaggerME.train("en", tes, ModelType.MAXENT, null, null, cutoff, 100);
System.out.println("Saving the tagger model as: " + tagFile);
OutputStream posOutputStream = new FileOutputStream(tagFile);
posModel.serialize(posOutputStream);
posOutputStream.close();
}
if (chunk || all) {
System.err.println("Training chunker");