morfologik.stemming
Class PolishStemmer

java.lang.Object
  extended by morfologik.stemming.PolishStemmer
All Implemented Interfaces:
java.lang.Iterable<WordData>, IStemmer

public final class PolishStemmer
extends java.lang.Object
implements IStemmer, java.lang.Iterable<WordData>

A dictionary-based stemmer for the Polish language. This stemmer requires an FSA-compiled dictionary to be present in classpath resources. Objects of this class are not thread safe.

See Also:
DictionaryLookup

Constructor Summary
PolishStemmer()
          This constructor is initialized with a built-in dictionary or fails with a runtime exception if the dictionary is not available.
 
Method Summary
 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 of WordData entries for a given word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolishStemmer

public PolishStemmer()
This constructor is initialized with a built-in dictionary or fails with a runtime exception if the dictionary is not available.

Method Detail

lookup

public java.util.List<WordData> lookup(java.lang.CharSequence word)
Returns a list of WordData entries for a given word. The returned list is never null. Depending on the stemmer's implementation the WordData may 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.

Specified by:
lookup in interface IStemmer

iterator

public java.util.Iterator<WordData> iterator()
Iterates over all dictionary forms stored in this stemmer.

Specified by:
iterator in interface java.lang.Iterable<WordData>