Package morfologik.stemming.polish
Class PolishStemmer
- java.lang.Object
-
- morfologik.stemming.polish.PolishStemmer
-
public final class PolishStemmer extends java.lang.Object implements IStemmer, java.lang.Iterable<WordData>
A dictionary-based stemmer for the Polish language. Instances of this class are not thread safe.- See Also:
DictionaryLookup
-
-
Field Summary
Fields Modifier and Type Field Description private static DictionarydictionaryThe underlying dictionary, loaded once (lazily).private DictionaryLookuplookupDictionary lookup delegate.
-
Constructor Summary
Constructors Constructor Description PolishStemmer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DictionarygetDictionary()java.util.Iterator<WordData>iterator()Iterates over all dictionary forms stored in this stemmer.java.util.List<WordData>lookup(java.lang.CharSequence word)Returns a list ofWordDataentries for a given word.
-
-
-
Field Detail
-
dictionary
private static Dictionary dictionary
The underlying dictionary, loaded once (lazily).
-
lookup
private final DictionaryLookup lookup
Dictionary lookup delegate.
-
-
Method Detail
-
getDictionary
public Dictionary getDictionary()
- Returns:
- Return the underlying
Dictionarydriving the stemmer.
-
lookup
public java.util.List<WordData> lookup(java.lang.CharSequence word)
Returns a list ofWordDataentries for a given word. The returned list is nevernull. Depending on the stemmer's implementation theWordDatamay carry the stem and additional information (tag) or just the stem.The returned list and any object it contains are not usable after a subsequent call to this method. Any data that should be stored in between must be copied by the caller.
-
-