edu.mit.jwi.morph
Interface IStemmer

All Known Implementing Classes:
SimpleStemmer, WordnetStemmer

public interface IStemmer

A stemmer is an object that can transform surface forms of words into a stem, also known as a root form, base form, or headword.

Since:
JWI 2.1.2
Version:
2.4.0
Author:
Mark A. Finlayson

Method Summary
 java.util.List<java.lang.String> findStems(java.lang.String surfaceForm, POS pos)
          Takes the surface form of a word, as it appears in the text, and the assigned Wordnet part of speech.
 

Method Detail

findStems

java.util.List<java.lang.String> findStems(java.lang.String surfaceForm,
                                           POS pos)
Takes the surface form of a word, as it appears in the text, and the assigned Wordnet part of speech. The surface form may or may not contain whitespace or underscores, and may be in mixed case. The part of speech may be null, which means that all parts of speech should be considered. Returns a list of stems, in preferred order. No stem should be repeated in the list. If no stems are found, this call returns an empty list. It will never return null.

Parameters:
surfaceForm - the surface form of which to find the stem
pos - the part of speech to find stems for; if null, find stems for all parts of speech
Returns:
the set of stems found for the surface form and part of speech combination
Throws:
java.lang.NullPointerException - if the specified surface form is null
java.lang.IllegalArgumentException - if the specified surface form is empty or all whitespace
Since:
JWI 2.1.2


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.