Package org.apache.lucene.analysis.util
Class StemmerUtil
- java.lang.Object
-
- org.apache.lucene.analysis.util.StemmerUtil
-
public class StemmerUtil extends Object
Some commonly-used stemming functions- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
delete(char[] s, int pos, int len)
Delete a character in-placestatic int
deleteN(char[] s, int pos, int len, int nChars)
Delete n characters in-placestatic boolean
endsWith(char[] s, int len, char[] suffix)
Returns true if the character array ends with the suffix.static boolean
endsWith(char[] s, int len, String suffix)
Returns true if the character array ends with the suffix.static boolean
startsWith(char[] s, int len, String prefix)
Returns true if the character array starts with the suffix.
-
-
-
Method Detail
-
startsWith
public static boolean startsWith(char[] s, int len, String prefix)
Returns true if the character array starts with the suffix.- Parameters:
s
- Input Bufferlen
- length of input bufferprefix
- Prefix string to test- Returns:
- true if
s
starts withprefix
-
endsWith
public static boolean endsWith(char[] s, int len, String suffix)
Returns true if the character array ends with the suffix.- Parameters:
s
- Input Bufferlen
- length of input buffersuffix
- Suffix string to test- Returns:
- true if
s
ends withsuffix
-
endsWith
public static boolean endsWith(char[] s, int len, char[] suffix)
Returns true if the character array ends with the suffix.- Parameters:
s
- Input Bufferlen
- length of input buffersuffix
- Suffix string to test- Returns:
- true if
s
ends withsuffix
-
delete
public static int delete(char[] s, int pos, int len)
Delete a character in-place- Parameters:
s
- Input Bufferpos
- Position of character to deletelen
- length of input buffer- Returns:
- length of input buffer after deletion
-
deleteN
public static int deleteN(char[] s, int pos, int len, int nChars)
Delete n characters in-place- Parameters:
s
- Input Bufferpos
- Position of character to deletelen
- Length of input buffernChars
- number of characters to delete- Returns:
- length of input buffer after deletion
-
-