Package org.languagetool.tagging
Class MorfologikTagger
- java.lang.Object
-
- org.languagetool.tagging.MorfologikTagger
-
- All Implemented Interfaces:
WordTagger
public class MorfologikTagger extends java.lang.Object implements WordTagger
Tags a word using a Morfologik binary dictionary.- Since:
- 2.8
-
-
Field Summary
Fields Modifier and Type Field Description private morfologik.stemming.Dictionary
dictionary
private java.net.URL
dictUrl
-
Constructor Summary
Constructors Constructor Description MorfologikTagger(java.lang.String dictPath)
MorfologikTagger(java.net.URL dictUrl)
MorfologikTagger(morfologik.stemming.Dictionary dictionary)
Constructs a MorfologikTagger with the given morfologik dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private morfologik.stemming.Dictionary
getDictionary()
java.util.List<TaggedWord>
tag(java.lang.String word)
-
-
-
Constructor Detail
-
MorfologikTagger
public MorfologikTagger(java.lang.String dictPath)
-
MorfologikTagger
MorfologikTagger(java.net.URL dictUrl)
-
MorfologikTagger
public MorfologikTagger(morfologik.stemming.Dictionary dictionary)
Constructs a MorfologikTagger with the given morfologik dictionary.- Since:
- 3.4
-
-
Method Detail
-
getDictionary
private morfologik.stemming.Dictionary getDictionary() throws java.io.IOException
- Throws:
java.io.IOException
-
tag
public java.util.List<TaggedWord> tag(java.lang.String word)
- Specified by:
tag
in interfaceWordTagger
- Parameters:
word
- the word to be tagged- Returns:
- the possible POS tags, or an empty list
-
-