Package opennlp.tools.stemmer.snowball
Class SnowballProgram
java.lang.Object
opennlp.tools.stemmer.snowball.SnowballProgram
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
arabicStemmer,catalanStemmer,danishStemmer,dutchStemmer,englishStemmer,finnishStemmer,frenchStemmer,germanStemmer,greekStemmer,hungarianStemmer,indonesianStemmer,irishStemmer,italianStemmer,norwegianStemmer,porterStemmer,portugueseStemmer,romanianStemmer,russianStemmer,spanishStemmer,swedishStemmer,turkishStemmer
Base class for a snowball stemmer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current string.char[]Get the current buffer containing the stem.intGet the valid length of the character array ingetCurrentBuffer().voidsetCurrent(char[] text, int length) Set the current string.voidsetCurrent(String value) Set the current string.
-
Constructor Details
-
SnowballProgram
-
-
Method Details
-
setCurrent
Set the current string. -
getCurrent
Get the current string. -
setCurrent
public void setCurrent(char[] text, int length) Set the current string.- Parameters:
text- character array containing inputlength- valid length of text.
-
getCurrentBuffer
public char[] getCurrentBuffer()Get the current buffer containing the stem.NOTE: this may be a reference to a different character array than the one originally provided with setCurrent, in the exceptional case that stemming produced a longer intermediate or result string.
It is necessary to use
getCurrentBufferLength()to determine the valid length of the returned buffer. For example, many words are stemmed simply by subtracting from the length to remove suffixes.- See Also:
-
getCurrentBufferLength
public int getCurrentBufferLength()Get the valid length of the character array ingetCurrentBuffer().- Returns:
- valid length of the array.
-