Class MorfologikTagDictionary

java.lang.Object
opennlp.morfologik.tagdict.MorfologikTagDictionary
All Implemented Interfaces:
opennlp.tools.postag.TagDictionary

public class MorfologikTagDictionary extends Object implements opennlp.tools.postag.TagDictionary
A TagDictionary implementation based on Morfologik binary dictionaries
  • Constructor Details

    • MorfologikTagDictionary

      public MorfologikTagDictionary(morfologik.stemming.Dictionary dict) throws IllegalArgumentException
      Initializes a case sensitive MorfologikTagDictionary
      Parameters:
      dict - A Morfologik FSA Dictionary.
      Throws:
      IllegalArgumentException - Thrown if FSA's root node cannot be acquired (dictionary is empty).
    • MorfologikTagDictionary

      public MorfologikTagDictionary(morfologik.stemming.Dictionary dict, boolean caseSensitive) throws IllegalArgumentException
      Parameters:
      dict - A Morfologik FSA Dictionary.
      caseSensitive - If true it performs case-sensitive lookup
      Throws:
      IllegalArgumentException - Thrown if FSA's root node cannot be acquired (dictionary is empty).
  • Method Details

    • getTags

      public String[] getTags(String word)
      Specified by:
      getTags in interface opennlp.tools.postag.TagDictionary
    • isCaseSensitive

      public boolean isCaseSensitive()
      Specified by:
      isCaseSensitive in interface opennlp.tools.postag.TagDictionary