File modelOutFile = params.getModel();
CmdLineUtil.checkOutputFile("sentence detector model", modelOutFile);
ChunkerModel model;
try {
ChunkerFactory chunkerFactory = ChunkerFactory
.create(params.getFactory());
model = ChunkerME.train(params.getLang(), sampleStream, mlParams,
chunkerFactory);
} catch (IOException e) {
throw new TerminateToolException(-1, "IO error while reading training data or indexing data: " +