StempelFilter (Lucene 10.5.1 stempel API)
Description: declaration: package: org.apache.lucene.analysis.stempel, class: StempelFilter

Package org.apache.lucene.analysis.stempel

# Class StempelFilter

java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
org.apache.lucene.analysis.stempel.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!

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource

  `AttributeSource.State`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_MIN_LENGTH`
  Minimum length of input words to be processed.

  ### Fields inherited from class org.apache.lucene.analysis.TokenFilter

  `input`

  ### Fields inherited from class org.apache.lucene.analysis.TokenStream

  `DEFAULT_TOKEN_ATTRIBUTE_FACTORY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StempelFilter(TokenStream in, StempelStemmer stemmer)`
  Create filter using the supplied stemming table.
  `StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)`
  Create filter using the supplied stemming table.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `incrementToken()`
  Returns the next input Token, after being stemmed

  ### Methods inherited from class org.apache.lucene.analysis.TokenFilter

  `close, end, reset, unwrap`

  ### Methods inherited from class org.apache.lucene.util.AttributeSource

  `addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## 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:
      - Constant Field Values

- ## 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

  - ### incrementToken

    public boolean incrementToken() throws IOException
    Returns the next input Token, after being stemmed
    Specified by:
      `incrementToken` in class `TokenStream`
    Throws:
      `IOException`