Parser extends AbstractBottomUpParser { @Deprecated public static AbstractModel train(opennlp.model.EventStream es, int iterations, int cut) throws java.io.IOException { return opennlp.maxent.GIS.trainModel(iterations, new TwoPassDataIndexer(es, cut)); } Parser(ParserModel model, int beamSize, double advancePercentage);  Parser(ParserModel model); @Deprecated  Parser(MaxentModel buildModel, MaxentModel checkModel, POSTagger tagger, Chunker chunker, HeadRules headRules); @Deprecated  Parser(MaxentModel buildModel, MaxentModel checkModel, POSTagger tagger, Chunker chunker, HeadRules headRules, int beamSize, double advancePercentage); @Deprecated static AbstractModel train(opennlp.model.EventStream es, int iterations, int cut); static void mergeReportIntoManifest(Map<String, String> manifest, 
      Map<String, String> report, String namespace); static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, TrainingParameters mlParams); @Deprecated static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cut);  }
@Test public void testChunkingParserTraining() throws Exception { ObjectStream<Parse> parseSamples = ParserTestUtil.openTestTrainingData(); HeadRules headRules = ParserTestUtil.createTestHeadRules(); ParserModel model = Parser.train("en", parseSamples, headRules, 100, 0); opennlp.tools.parser.Parser parser = ParserFactory.create(model); ByteArrayOutputStream outArray = new ByteArrayOutputStream(); model.serialize(outArray); outArray.close(); new ParserModel(new ByteArrayInputStream(outArray.toByteArray())); }