ModelUpdaterParams params = validateAndParseParams(
ArgumentParser.filter(args, ModelUpdaterParams.class), ModelUpdaterParams.class);
// Load model to be updated
File modelFile = params.getModel();
ParserModel originalParserModel = new ParserModelLoader().load(modelFile);
ObjectStreamFactory<Parse> factory = getStreamFactory(format);
String[] fargs = ArgumentParser.filter(args, factory.getParameters());
validateFactoryArgs(factory, fargs);
ObjectStream<Parse> sampleStream = factory.create(fargs);
ParserModel updatedParserModel;
try {
updatedParserModel = trainAndUpdate(originalParserModel, sampleStream, params);
}
catch (IOException e) {
throw new TerminateToolException(-1, "IO error while reading training data or indexing data: "