Class StempelFilter

All Implemented Interfaces:
Closeable, AutoCloseable, Unwrappable<TokenStream>

public final class StempelFilter extends TokenFilter
Transforms the token stream as per the stemming algorithm.

Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!

  • Field Details

    • DEFAULT_MIN_LENGTH

      public static final int DEFAULT_MIN_LENGTH
      Minimum length of input words to be processed. Shorter words are returned unchanged.
      See Also:
  • Constructor Details

    • StempelFilter

      public StempelFilter(TokenStream in, StempelStemmer stemmer)
      Create filter using the supplied stemming table.
      Parameters:
      in - input token stream
      stemmer - stemmer
    • StempelFilter

      public StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)
      Create filter using the supplied stemming table.
      Parameters:
      in - input token stream
      stemmer - stemmer
      minLength - For performance reasons words shorter than minLength characters are not processed, but simply returned.
  • Method Details