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

opennlp.tools.parser

## Class ParserModel

- java.lang.Object
- - opennlp.tools.util.model.BaseModel
  - - opennlp.tools.parser.ParserModel

- All Implemented Interfaces:
    Serializable, ArtifactProvider

      public class ParserModel
      extends BaseModel

  This is an abstract base class for `ParserModel` implementations.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class opennlp.tools.util.model.BaseModel

      `TRAINING_CUTOFF_PROPERTY, TRAINING_EVENTHASH_PROPERTY, TRAINING_ITERATIONS_PROPERTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParserModel(File modelFile)`
    `ParserModel(InputStream in)`
    `ParserModel(Path modelPath)`
    `ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType)`
    `ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, MaxentModel attachModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType modelType, Map<String,String> manifestInfoEntries)`
    `ParserModel(String languageCode, MaxentModel buildModel, MaxentModel checkModel, POSModel parserTagger, ChunkerModel chunkerTagger, HeadRules headRules, ParserType type, Map<String,String> manifestInfoEntries)`
    `ParserModel(URL modelURL)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MaxentModel` | `getAttachModel()`
    `MaxentModel` | `getBuildModel()`
    `MaxentModel` | `getCheckModel()`
    `HeadRules` | `getHeadRules()`
    `ChunkerModel` | `getParserChunkerModel()`
    `POSModel` | `getParserTaggerModel()`
    `ParserType` | `getParserType()`
    `ParserModel` | `updateBuildModel(MaxentModel buildModel)`
    `ParserModel` | `updateCheckModel(MaxentModel checkModel)`
    `ParserModel` | `updateChunkerModel(ChunkerModel chunkModel)`
    `ParserModel` | `updateTaggerModel(POSModel taggerModel)`

    - ### Methods inherited from class opennlp.tools.util.model.BaseModel

      `getArtifact, getLanguage, getManifestProperty, getVersion, isLoadedFromSerialized, serialize, serialize, serialize`

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

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

- - ### Constructor Detail

    - #### ParserModel

          public ParserModel(String languageCode,
                             MaxentModel buildModel,
                             MaxentModel checkModel,
                             MaxentModel attachModel,
                             POSModel parserTagger,
                             ChunkerModel chunkerTagger,
                             HeadRules headRules,
                             ParserType modelType,
                             Map<String,String> manifestInfoEntries)

    - #### ParserModel

          public ParserModel(String languageCode,
                             MaxentModel buildModel,
                             MaxentModel checkModel,
                             MaxentModel attachModel,
                             POSModel parserTagger,
                             ChunkerModel chunkerTagger,
                             HeadRules headRules,
                             ParserType modelType)

    - #### ParserModel

          public ParserModel(String languageCode,
                             MaxentModel buildModel,
                             MaxentModel checkModel,
                             POSModel parserTagger,
                             ChunkerModel chunkerTagger,
                             HeadRules headRules,
                             ParserType type,
                             Map<String,String> manifestInfoEntries)

    - #### ParserModel

          public ParserModel(InputStream in)
                      throws IOException

      Throws:
        `IOException`

    - #### ParserModel

          public ParserModel(File modelFile)
                      throws IOException

      Throws:
        `IOException`

    - #### ParserModel

          public ParserModel(Path modelPath)
                      throws IOException

      Throws:
        `IOException`

    - #### ParserModel

          public ParserModel(URL modelURL)
                      throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### getParserType

          public ParserType getParserType()

    - #### getBuildModel

          public MaxentModel getBuildModel()

    - #### getCheckModel

          public MaxentModel getCheckModel()

    - #### getAttachModel

          public MaxentModel getAttachModel()

    - #### getParserTaggerModel

          public POSModel getParserTaggerModel()

    - #### getParserChunkerModel

          public ChunkerModel getParserChunkerModel()

    - #### getHeadRules

          public HeadRules getHeadRules()

    - #### updateBuildModel

          public ParserModel updateBuildModel(MaxentModel buildModel)

    - #### updateCheckModel

          public ParserModel updateCheckModel(MaxentModel checkModel)

    - #### updateTaggerModel

          public ParserModel updateTaggerModel(POSModel taggerModel)

    - #### updateChunkerModel

          public ParserModel updateChunkerModel(ChunkerModel chunkModel)

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