Package opennlp.tools.stemmer

# Interface Stemmer

public interface Stemmer
Reduces a word to its root form.

Thread safety is implementation specific.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CharSequence`
  `stem(CharSequence word)`
  Stems `word`.
  `default List<CharSequence>`
  `stemAll(CharSequence word)`
  Returns all stem forms for `word`.

- ## Method Details

  - ### stem

    CharSequence stem(CharSequence word)
    Stems `word`.
    Parameters:
      `word` - The input word. Must not be `null`.
    Returns:
      The stemmed form.
    Throws:
      `IllegalArgumentException` - Thrown if `word` is `null`.

  - ### stemAll

    default List<CharSequence> stemAll(CharSequence word)
    Returns all stem forms for `word`. Defaults to a single-element list from `stem(CharSequence)`. Dictionary-based engines may override this to return multiple roots; delegating wrappers must forward it to preserve the full list.
    Parameters:
      `word` - The input word. Must not be `null`.
    Returns:
      all stem forms for `word`
    Throws:
      `IllegalArgumentException` - Thrown if `word` is `null`.