org.itc.irst.tcc.sre.util
Interface Stemmer

All Known Implementing Classes:
PorterStemmer

public interface Stemmer

TO DO

Since:
1.0
Version:
%I%, %G%
Author:
Claudio Giuliano

Method Summary
 void add(char ch)
          Add a character to the word being stemmed.
 void add(char[] ch)
          Add a character to the word being stemmed.
 char[] getResultBuffer()
          Returns a reference to a character buffer containing the results of the stemming process.
 int getResultLength()
          Returns the length of the word resulting from the stemming process.
 void reset()
          reset() resets the stemmer so it can stem another word.
 boolean stem()
          Stem the word placed into the Stemmer buffer through calls to add().
 boolean stem(char[] word)
          Stem a word contained in a char[].
 boolean stem(char[] word, int wordLen)
          Stem a word contained in a leading portion of a char[] array.
 boolean stem(char[] wordBuffer, int offset, int wordLen)
          Stem a word contained in a portion of a char[] array.
 boolean stem(int i0)
           
 java.lang.String stem(java.lang.String s)
          Stem a word provided as a String.
 

Method Detail

reset

void reset()
reset() resets the stemmer so it can stem another word. If you invoke the stemmer by calling add(char) and then stem(), you must call reset() before starting another word.


add

void add(char ch)
Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word.


add

void add(char[] ch)
Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word.


getResultLength

int getResultLength()
Returns the length of the word resulting from the stemming process.


getResultBuffer

char[] getResultBuffer()
Returns a reference to a character buffer containing the results of the stemming process. You also need to consult getResultLength() to determine the length of the result.


stem

java.lang.String stem(java.lang.String s)
Stem a word provided as a String. Returns the result as a String.


stem

boolean stem(char[] word)
Stem a word contained in a char[]. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().


stem

boolean stem(char[] wordBuffer,
             int offset,
             int wordLen)
Stem a word contained in a portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().


stem

boolean stem(char[] word,
             int wordLen)
Stem a word contained in a leading portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().


stem

boolean stem()
Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().


stem

boolean stem(int i0)