Package org.apache.lucene.analysis.pt
Class RSLPStemmerBase.Rule
java.lang.Object
org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
- Direct Known Subclasses:
RSLPStemmerBase.RuleWithSetExceptions,RSLPStemmerBase.RuleWithSuffixExceptions
- Enclosing class:
RSLPStemmerBase
A basic rule, with no exceptions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final char[]protected final char[] -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
suffix
protected final char[] suffix -
replacement
protected final char[] replacement -
min
protected final int min
-
-
Constructor Details
-
Rule
Create a rule.- Parameters:
suffix- suffix to removemin- minimum stem lengthreplacement- replacement string
-
-
Method Details
-
matches
public boolean matches(char[] s, int len) - Returns:
- true if the word matches this rule.
-
replace
public int replace(char[] s, int len) - Returns:
- new valid length of the string after firing this rule.
-