Class StempelStemmer


  • public class StempelStemmer
    extends Object
    Stemmer class is a convenient facade for other stemmer-related classes. The core stemming algorithm and its implementation is taken verbatim from the Egothor project ( www.egothor.org ).

    Even though the stemmer tables supplied in the distribution package are built for Polish language, there is nothing language-specific here.

    • Constructor Detail

      • StempelStemmer

        public StempelStemmer​(InputStream stemmerTable)
                       throws IOException
        Create a Stemmer using selected stemmer table
        Parameters:
        stemmerTable - stemmer table.
        Throws:
        IOException
      • StempelStemmer

        public StempelStemmer​(org.egothor.stemmer.Trie stemmer)
        Create a Stemmer using pre-loaded stemmer table
        Parameters:
        stemmer - pre-loaded stemmer table
    • Method Detail

      • stem

        public StringBuilder stem​(CharSequence word)
        Stem a word.
        Parameters:
        word - input word to be stemmed.
        Returns:
        stemmed word, or null if the stem could not be generated.