Class MorfologikPOSTaggerFactory

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

public class MorfologikPOSTaggerFactory extends opennlp.tools.postag.POSTaggerFactory
The factory provides a Morfologik specific POSTaggerFactory implementation and initializes related resources.
  • Constructor Details

    • MorfologikPOSTaggerFactory

      public MorfologikPOSTaggerFactory()
  • Method Details

    • createTagDictionary

      public opennlp.tools.postag.TagDictionary createTagDictionary(File dictionary) throws IOException
      Initializes a TagDictionary from a dictionary file.
      Overrides:
      createTagDictionary in class opennlp.tools.postag.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 opennlp.tools.postag.TagDictionary getTagDictionary()
      Overrides:
      getTagDictionary in class opennlp.tools.postag.POSTaggerFactory
      Returns:
      The TagDictionary used.
      Throws:
      RuntimeException - Thrown if errors occurred loading or reading Morfologik dictionary files.
    • setTagDictionary

      public void setTagDictionary(opennlp.tools.postag.TagDictionary dictionary)
      Overrides:
      setTagDictionary in class opennlp.tools.postag.POSTaggerFactory
    • createEmptyTagDictionary

      public opennlp.tools.postag.TagDictionary createEmptyTagDictionary()
      Overrides:
      createEmptyTagDictionary in class opennlp.tools.postag.POSTaggerFactory
    • createTagDictionary

      public opennlp.tools.postag.TagDictionary createTagDictionary(InputStream in) throws IOException
      Overrides:
      createTagDictionary in class opennlp.tools.postag.POSTaggerFactory
      Throws:
      IOException
    • createArtifactSerializersMap

      public Map<String,opennlp.tools.util.model.ArtifactSerializer<?>> createArtifactSerializersMap()
      Overrides:
      createArtifactSerializersMap in class opennlp.tools.postag.POSTaggerFactory
    • createArtifactMap

      public Map<String,Object> createArtifactMap()
      Overrides:
      createArtifactMap in class opennlp.tools.postag.POSTaggerFactory