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

public class SnowballProgram extends Object implements Serializable
Base class for a snowball stemmer
See Also:
  • Constructor Details

  • Method Details

    • setCurrent

      public void setCurrent(String value)
      Set the current string.
    • getCurrent

      public String getCurrent()
      Get the current string.
    • setCurrent

      public void setCurrent(char[] text, int length)
      Set the current string.
      Parameters:
      text - character array containing input
      length - 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 in getCurrentBuffer().
      Returns:
      valid length of the array.