Package opennlp.morfologik.tagdict
Class MorfologikTagDictionary
- java.lang.Object
-
- opennlp.morfologik.tagdict.MorfologikTagDictionary
-
- All Implemented Interfaces:
TagDictionary
public class MorfologikTagDictionary extends Object implements TagDictionary
ATagDictionary
implementation based on Morfologik binary dictionaries
-
-
Constructor Summary
Constructors Constructor Description MorfologikTagDictionary(morfologik.stemming.Dictionary dict)
Initializes a case sensitiveMorfologikTagDictionary
MorfologikTagDictionary(morfologik.stemming.Dictionary dict, boolean caseSensitive)
Initializes aMorfologikTagDictionary
-
-
-
Constructor Detail
-
MorfologikTagDictionary
public MorfologikTagDictionary(morfologik.stemming.Dictionary dict) throws IllegalArgumentException
Initializes a case sensitiveMorfologikTagDictionary
- Parameters:
dict
- A Morfologik FSADictionary
.- 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
Initializes aMorfologikTagDictionary
- Parameters:
dict
- A Morfologik FSADictionary
.caseSensitive
- Iftrue
it performs case-sensitive lookup- Throws:
IllegalArgumentException
- Thrown if FSA's root node cannot be acquired (dictionary is empty).
-
-
Method Detail
-
getTags
public String[] getTags(String word)
- Specified by:
getTags
in interfaceTagDictionary
-
isCaseSensitive
public boolean isCaseSensitive()
- Specified by:
isCaseSensitive
in interfaceTagDictionary
-
-