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

opennlp.tools.util.model

## Interface ArtifactProvider

- All Known Implementing Classes:
    BaseModel, ChunkerModel, DoccatModel, LanguageDetectorModel, LemmatizerModel, ParserModel, POSModel, SentenceModel, TokenizerModel, TokenNameFinderModel

      public interface ArtifactProvider

  Provides access to model persisted artifacts.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getArtifact(String key)` Gets an artifact by name
    `String` | `getLanguage()` Retrieves the language code of the material which was used to train the model or x-unspecified if non was set.
    `String` | `getManifestProperty(String key)` Retrieves the value to the given key from the manifest.properties entry.
    `boolean` | `isLoadedFromSerialized()` Indicates if this provider was loaded from serialized.

- - ### Method Detail

    - #### getArtifact

          <T> T getArtifact(String key)

      Gets an artifact by name

    - #### getManifestProperty

          String getManifestProperty(String key)

      Retrieves the value to the given key from the manifest.properties entry.
      Parameters:
        `key` -
      Returns:
        the value

    - #### getLanguage

          String getLanguage()

      Retrieves the language code of the material which was used to train the model or x-unspecified if non was set.
      Returns:
        the language code of this model

    - #### isLoadedFromSerialized

          boolean isLoadedFromSerialized()

      Indicates if this provider was loaded from serialized. It is useful, for example, while validating artifacts: you can skip the time consuming ones if they where already validated during the serialization.
      Returns:
        true if this model was loaded from serialized

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