Package opennlp.morfologik.tagdict

# Class MorfologikPOSTaggerFactory

java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.postag.POSTaggerFactory
opennlp.morfologik.tagdict.MorfologikPOSTaggerFactory

public class MorfologikPOSTaggerFactory extends POSTaggerFactory
The factory provides a Morfologik specific `POSTaggerFactory` implementation and initializes related resources.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class opennlp.tools.postag.POSTaggerFactory

  `POSTaggerFactory.POSDictionarySerializer`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MorfologikPOSTaggerFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,Object>`
  `createArtifactMap()`
  `Map<String,ArtifactSerializer<?>>`
  `createArtifactSerializersMap()`
  `TagDictionary`
  `createEmptyTagDictionary()`
  `TagDictionary`
  `createTagDictionary(File dictionary)`
  Initializes a `TagDictionary` from a `dictionary file`.
  `TagDictionary`
  `createTagDictionary(InputStream in)`
  `TagDictionary`
  `getTagDictionary()`
  `void`
  `setTagDictionary(TagDictionary dictionary)`

  ### Methods inherited from class opennlp.tools.postag.POSTaggerFactory

  `create, createFeatureGenerators, getPOSContextGenerator, getPOSContextGenerator, getSequenceValidator, validateArtifactMap`

  ### Methods inherited from class opennlp.tools.util.BaseToolFactory

  `create, create, createManifestEntries`

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

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

- ## Constructor Details

  - ### MorfologikPOSTaggerFactory

    public MorfologikPOSTaggerFactory()

- ## Method Details

  - ### createTagDictionary

    public TagDictionary createTagDictionary(File dictionary) throws IOException
    Initializes a `TagDictionary` from a `dictionary file`.
    Overrides:
      `createTagDictionary` in class `POSTaggerFactory`
    Parameters:
      `dictionary` - The `File` used as input for creating the dictionary.
    Returns:
      A valid `TagDictionary` ready for use.
    Throws:
      `FileNotFoundException` - Thrown if `dictionary` or related metadata could not be read in.
      `IOException` - Thrown if IO errors occurred.

  - ### getTagDictionary

    public TagDictionary getTagDictionary()
    Overrides:
      `getTagDictionary` in class `POSTaggerFactory`
    Returns:
      The `TagDictionary` used.
    Throws:
      `RuntimeException` - Thrown if errors occurred loading or reading Morfologik dictionary files.

  - ### setTagDictionary

    public void setTagDictionary(TagDictionary dictionary)
    Overrides:
      `setTagDictionary` in class `POSTaggerFactory`

  - ### createEmptyTagDictionary

    public TagDictionary createEmptyTagDictionary()
    Overrides:
      `createEmptyTagDictionary` in class `POSTaggerFactory`

  - ### createTagDictionary

    public TagDictionary createTagDictionary(InputStream in) throws IOException
    Overrides:
      `createTagDictionary` in class `POSTaggerFactory`
    Throws:
      `IOException`

  - ### createArtifactSerializersMap

    public Map<String,ArtifactSerializer<?>> createArtifactSerializersMap()
    Overrides:
      `createArtifactSerializersMap` in class `POSTaggerFactory`

  - ### createArtifactMap

    public Map<String,Object> createArtifactMap()
    Overrides:
      `createArtifactMap` in class `POSTaggerFactory`