ArtifactProvider (Apache OpenNLP :: API 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.util.model, interface: ArtifactProvider

Package opennlp.tools.util.model

# Interface ArtifactProvider

public interface ArtifactProvider
Provides access to model persisted artifacts.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> T`
  `getArtifact(String key)`
  `String`
  `getLanguage()`
  `String`
  `getManifestProperty(String key)`
  `boolean`
  `isLoadedFromSerialized()`
  Indicates if this provider was loaded from a serialized form.

- ## Method Details

  - ### getArtifact

    <T> T getArtifact(String key)
    Returns:
      Gets an artifact by an identifying key or name.

  - ### getManifestProperty

    String getManifestProperty(String key)
    Parameters:
      `key` - A string identifying an element.
    Returns:
      Retrieves the value for the given `key` from the `manifest.properties`.

  - ### getLanguage

    String getLanguage()
    Returns:
      Retrieves the language code of the material which was used to train a model or `'x-unspecified'` if non was set.

  - ### isLoadedFromSerialized

    boolean isLoadedFromSerialized()
    Indicates if this provider was loaded from a serialized form.

    It is useful, for example, during the validation of artifacts: Skip the time-consuming ones if those were already validated during the serialization process.

    Returns:
      `true` if this model was loaded from a serialized form, `false` otherwise.