csli.util.nlp
Class Stemmer

java.lang.Object
  extended by csli.util.nlp.Stemmer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AdvancedPorterStemmer, DictionaryStemmer, IrregularStemmer, MultiPassStemmer, PaiceStemmer, PorterStemmer

public abstract class Stemmer
extends Object
implements Serializable

An abstract word stemmer.

See Also:
Serialized Form

Constructor Summary
Stemmer()
           
 
Method Summary
 List<String> stem(List<String> wordList)
          Stem a list of word strings.
 ScoredObject<String> stem(ScoredObject<String> wordString)
          Stem a scored word string.
abstract  String stem(String wordString)
          Stem a word string.
 List<ScoredObject<String>> stemScored(List<ScoredObject<String>> wordList)
          Stem a list of scored word strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stemmer

public Stemmer()
Method Detail

stem

public abstract String stem(String wordString)
Stem a word string. Should return NULL on error.

Parameters:
wordString - the word string to stem
Returns:
the word stem (root form) as a string

stem

public ScoredObject<String> stem(ScoredObject<String> wordString)
Stem a scored word string. Should return NULL on error.

Parameters:
wordString - the scored word string to stem
Returns:
the word stem (root form) as a scored string

stem

public List<String> stem(List<String> wordList)
Stem a list of word strings. Should return NULL on error.

Parameters:
wordList - the list of word strings to stem
Returns:
a list of word stems (root form) as strings

stemScored

public List<ScoredObject<String>> stemScored(List<ScoredObject<String>> wordList)
Stem a list of scored word strings. Should return NULL on error.

Parameters:
wordList - the list of scored word strings to stem
Returns:
a list of word stems (root form) as scored strings