Package org.apache.lucene.analysis.id
Class IndonesianStemmer
- java.lang.Object
-
- org.apache.lucene.analysis.id.IndonesianStemmer
-
public class IndonesianStemmer extends java.lang.ObjectStemmer for Indonesian.Stems Indonesian words with the algorithm presented in: A Study of Stemming Effects on Information Retrieval in Bahasa Indonesia, Fadillah Z Tala. http://www.illc.uva.nl/Publications/ResearchReports/MoL-2003-02.text.pdf
-
-
Field Summary
Fields Modifier and Type Field Description private intflagsprivate intnumSyllablesprivate static intREMOVED_BERprivate static intREMOVED_DIprivate static intREMOVED_KEprivate static intREMOVED_MENGprivate static intREMOVED_PEprivate static intREMOVED_PENGprivate static intREMOVED_TER
-
Constructor Summary
Constructors Constructor Description IndonesianStemmer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanisVowel(char ch)private intremoveFirstOrderPrefix(char[] text, int length)private intremoveParticle(char[] text, int length)private intremovePossessivePronoun(char[] text, int length)private intremoveSecondOrderPrefix(char[] text, int length)private intremoveSuffix(char[] text, int length)intstem(char[] text, int length, boolean stemDerivational)Stem a term (returning its new length).private intstemDerivational(char[] text, int length)
-
-
-
Field Detail
-
numSyllables
private int numSyllables
-
flags
private int flags
-
REMOVED_KE
private static final int REMOVED_KE
- See Also:
- Constant Field Values
-
REMOVED_PENG
private static final int REMOVED_PENG
- See Also:
- Constant Field Values
-
REMOVED_DI
private static final int REMOVED_DI
- See Also:
- Constant Field Values
-
REMOVED_MENG
private static final int REMOVED_MENG
- See Also:
- Constant Field Values
-
REMOVED_TER
private static final int REMOVED_TER
- See Also:
- Constant Field Values
-
REMOVED_BER
private static final int REMOVED_BER
- See Also:
- Constant Field Values
-
REMOVED_PE
private static final int REMOVED_PE
- See Also:
- Constant Field Values
-
-
Method Detail
-
stem
public int stem(char[] text, int length, boolean stemDerivational)Stem a term (returning its new length).Use
stemDerivationalto control whether full stemming or only light inflectional stemming is done.
-
stemDerivational
private int stemDerivational(char[] text, int length)
-
isVowel
private boolean isVowel(char ch)
-
removeParticle
private int removeParticle(char[] text, int length)
-
removePossessivePronoun
private int removePossessivePronoun(char[] text, int length)
-
removeFirstOrderPrefix
private int removeFirstOrderPrefix(char[] text, int length)
-
removeSecondOrderPrefix
private int removeSecondOrderPrefix(char[] text, int length)
-
removeSuffix
private int removeSuffix(char[] text, int length)
-
-