Package org.tartarus.snowball
Class SnowballProgram
- java.lang.Object
- 
- org.tartarus.snowball.SnowballProgram
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- SnowballStemmer
 
 public class SnowballProgram extends Object implements Serializable Base class for a snowball stemmer- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected intbraprotected intcursorprotected intketprotected intlimitprotected intlimit_backward
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSnowballProgram()SnowballProgram(SnowballProgram other)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassign_to(StringBuilder s)protected voidcopy_from(SnowballProgram other)protected booleaneq_s(CharSequence s)protected booleaneq_s_b(CharSequence s)protected intfind_among(Among[] v)protected intfind_among_b(Among[] v)StringgetCurrent()Get the current string.char[]getCurrentBuffer()Get the current buffer containing the stem.intgetCurrentBufferLength()Get the valid length of the character array ingetCurrentBuffer().protected booleanin_grouping(char[] s, int min, int max)protected booleanin_grouping_b(char[] s, int min, int max)protected voidinsert(int c_bra, int c_ket, CharSequence s)protected booleanout_grouping(char[] s, int min, int max)protected booleanout_grouping_b(char[] s, int min, int max)protected intreplace_s(int c_bra, int c_ket, CharSequence s)voidsetCurrent(char[] text, int length)Set the current string.voidsetCurrent(String value)Set the current string.protected voidslice_check()protected voidslice_del()protected voidslice_from(CharSequence s)protected voidslice_to(StringBuilder s)
 
- 
- 
- 
Constructor Detail- 
SnowballProgramprotected SnowballProgram() 
 - 
SnowballProgrampublic SnowballProgram(SnowballProgram other) 
 
- 
 - 
Method Detail- 
setCurrentpublic void setCurrent(String value) Set the current string.
 - 
getCurrentpublic String getCurrent() Get the current string.
 - 
setCurrentpublic void setCurrent(char[] text, int length)Set the current string.- Parameters:
- text- character array containing input
- length- valid length of text.
 
 - 
getCurrentBufferpublic 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()
 
 - 
getCurrentBufferLengthpublic int getCurrentBufferLength() Get the valid length of the character array ingetCurrentBuffer().- Returns:
- valid length of the array.
 
 - 
copy_fromprotected void copy_from(SnowballProgram other) 
 - 
in_groupingprotected boolean in_grouping(char[] s, int min, int max)
 - 
in_grouping_bprotected boolean in_grouping_b(char[] s, int min, int max)
 - 
out_groupingprotected boolean out_grouping(char[] s, int min, int max)
 - 
out_grouping_bprotected boolean out_grouping_b(char[] s, int min, int max)
 - 
eq_sprotected boolean eq_s(CharSequence s) 
 - 
eq_s_bprotected boolean eq_s_b(CharSequence s) 
 - 
find_amongprotected int find_among(Among[] v) 
 - 
find_among_bprotected int find_among_b(Among[] v) 
 - 
replace_sprotected int replace_s(int c_bra, int c_ket, CharSequence s)
 - 
slice_checkprotected void slice_check() 
 - 
slice_fromprotected void slice_from(CharSequence s) 
 - 
slice_delprotected void slice_del() 
 - 
insertprotected void insert(int c_bra, int c_ket, CharSequence s)
 - 
slice_toprotected void slice_to(StringBuilder s) 
 - 
assign_toprotected void assign_to(StringBuilder s) 
 
- 
 
-