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 TypeMethodDescriptionstem(CharSequence word) Stemsword.default List<CharSequence> stemAll(CharSequence word) Returns all stem forms forword.
-
Method Details
-
stem
Stemsword.- Parameters:
word- The input word. Must not benull.- Returns:
- The stemmed form.
- Throws:
IllegalArgumentException- Thrown ifwordisnull.
-
stemAll
Returns all stem forms forword. Defaults to a single-element list fromstem(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 benull.- Returns:
- all stem forms for
word - Throws:
IllegalArgumentException- Thrown ifwordisnull.
-