Interface Stemmer


public interface Stemmer
Reduces a word to its root form.

Thread safety is implementation specific.

  • Method Details

    • stem

      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.