Class 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. Instances of this class are not thread safe.
    See Also:
    DictionaryLookup
    • Constructor Summary

      Constructors 
      Constructor Description
      PolishStemmer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Dictionary getDictionary()  
      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
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • dictionary

        private static Dictionary dictionary
        The underlying dictionary, loaded once (lazily).
    • Constructor Detail

      • PolishStemmer

        public PolishStemmer()
    • Method Detail

      • getDictionary

        public Dictionary getDictionary()
        Returns:
        Return the underlying Dictionary driving the stemmer.
      • 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
        Parameters:
        word - The word (typically inflected) to look up base forms for.
        Returns:
        A list of WordData entries (possibly empty).
      • 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>