Parser (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.parser.chunking

## Class Parser

- java.lang.Object
- - opennlp.tools.parser.AbstractBottomUpParser
  - - opennlp.tools.parser.chunking.Parser

- All Implemented Interfaces:
    Parser

      public class Parser
      extends AbstractBottomUpParser

  Class for a shift reduce style parser based on Adwait Ratnaparkhi's 1998 thesis.

- - ### Field Summary

    - ### Fields inherited from class opennlp.tools.parser.AbstractBottomUpParser

      `COMPLETE, CONT, defaultAdvancePercentage, defaultBeamSize, INC_NODE, INCOMPLETE, OTHER, START, TOK_NODE, TOP_NODE, ZERO`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Parser(ParserModel model)`
    `Parser(ParserModel model, int beamSize, double advancePercentage)`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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)`

    - ### Methods inherited from class opennlp.tools.parser.AbstractBottomUpParser

      `buildDictionary, buildDictionary, collapsePunctuation, parse, parse, setErrorReporting, setParents`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Parser

          public Parser(ParserModel model,
                        int beamSize,
                        double advancePercentage)

    - #### Parser

          public Parser(ParserModel model)

  - ### Method Detail

    - #### mergeReportIntoManifest

          public static void mergeReportIntoManifest(Map<String,String> manifest,
                                                     Map<String,String> report,
                                                     String namespace)

    - #### train

          public static ParserModel train(String languageCode,
                                          ObjectStream<Parse> parseSamples,
                                          HeadRules rules,
                                          TrainingParameters mlParams)
                                   throws IOException

      Throws:
        `IOException`

Copyright © 2026 The Apache Software Foundation. All rights reserved.