Package org.apache.lucene.analysis.el
Class GreekStemmer
- java.lang.Object
-
- org.apache.lucene.analysis.el.GreekStemmer
-
public class GreekStemmer extends java.lang.Object
A stemmer for Greek words, according to: Development of a Stemmer for the Greek Language. Georgios NtaisNOTE: Input is expected to be casefolded for Greek (including folding of final sigma to sigma), and with diacritics removed. This can be achieved with either
GreekLowerCaseFilter
or ICUFoldingFilter.
-
-
Field Summary
Fields Modifier and Type Field Description private static CharArraySet
exc12a
private static CharArraySet
exc12b
private static CharArraySet
exc13
private static CharArraySet
exc14
private static CharArraySet
exc15a
private static CharArraySet
exc15b
private static CharArraySet
exc16
private static CharArraySet
exc17
private static CharArraySet
exc18
private static CharArraySet
exc19
private static CharArraySet
exc4
private static CharArraySet
exc6
private static CharArraySet
exc7
private static CharArraySet
exc8a
private static CharArraySet
exc8b
private static CharArraySet
exc9
-
Constructor Summary
Constructors Constructor Description GreekStemmer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
endsWith(char[] s, int len, java.lang.String suffix)
Checks if the word contained in the leading portion of char[] array , ends with the suffix given as parameter.private boolean
endsWithVowel(char[] s, int len)
Checks if the word contained in the leading portion of char[] array , ends with a Greek vowel.private boolean
endsWithVowelNoY(char[] s, int len)
Checks if the word contained in the leading portion of char[] array , ends with a Greek vowel.private int
rule0(char[] s, int len)
private int
rule1(char[] s, int len)
private int
rule10(char[] s, int len)
private int
rule11(char[] s, int len)
private int
rule12(char[] s, int len)
private int
rule13(char[] s, int len)
private int
rule14(char[] s, int len)
private int
rule15(char[] s, int len)
private int
rule16(char[] s, int len)
private int
rule17(char[] s, int len)
private int
rule18(char[] s, int len)
private int
rule19(char[] s, int len)
private int
rule2(char[] s, int len)
private int
rule20(char[] s, int len)
private int
rule21(char[] s, int len)
private int
rule22(char[] s, int len)
private int
rule3(char[] s, int len)
private int
rule4(char[] s, int len)
private int
rule5(char[] s, int len)
private int
rule6(char[] s, int len)
private int
rule7(char[] s, int len)
private int
rule8(char[] s, int len)
private int
rule9(char[] s, int len)
int
stem(char[] s, int len)
Stems a word contained in a leading portion of a char[] array.
-
-
-
Field Detail
-
exc4
private static final CharArraySet exc4
-
exc6
private static final CharArraySet exc6
-
exc7
private static final CharArraySet exc7
-
exc8a
private static final CharArraySet exc8a
-
exc8b
private static final CharArraySet exc8b
-
exc9
private static final CharArraySet exc9
-
exc12a
private static final CharArraySet exc12a
-
exc12b
private static final CharArraySet exc12b
-
exc13
private static final CharArraySet exc13
-
exc14
private static final CharArraySet exc14
-
exc15a
private static final CharArraySet exc15a
-
exc15b
private static final CharArraySet exc15b
-
exc16
private static final CharArraySet exc16
-
exc17
private static final CharArraySet exc17
-
exc18
private static final CharArraySet exc18
-
exc19
private static final CharArraySet exc19
-
-
Method Detail
-
stem
public int stem(char[] s, int len)
Stems a word contained in a leading portion of a char[] array. The word is passed through a number of rules that modify its length.- Parameters:
s
- A char[] array that contains the word to be stemmed.len
- The length of the char[] array.- Returns:
- The new length of the stemmed word.
-
rule0
private int rule0(char[] s, int len)
-
rule1
private int rule1(char[] s, int len)
-
rule2
private int rule2(char[] s, int len)
-
rule3
private int rule3(char[] s, int len)
-
rule4
private int rule4(char[] s, int len)
-
rule5
private int rule5(char[] s, int len)
-
rule6
private int rule6(char[] s, int len)
-
rule7
private int rule7(char[] s, int len)
-
rule8
private int rule8(char[] s, int len)
-
rule9
private int rule9(char[] s, int len)
-
rule10
private int rule10(char[] s, int len)
-
rule11
private int rule11(char[] s, int len)
-
rule12
private int rule12(char[] s, int len)
-
rule13
private int rule13(char[] s, int len)
-
rule14
private int rule14(char[] s, int len)
-
rule15
private int rule15(char[] s, int len)
-
rule16
private int rule16(char[] s, int len)
-
rule17
private int rule17(char[] s, int len)
-
rule18
private int rule18(char[] s, int len)
-
rule19
private int rule19(char[] s, int len)
-
rule20
private int rule20(char[] s, int len)
-
rule21
private int rule21(char[] s, int len)
-
rule22
private int rule22(char[] s, int len)
-
endsWith
private boolean endsWith(char[] s, int len, java.lang.String suffix)
Checks if the word contained in the leading portion of char[] array , ends with the suffix given as parameter.- Parameters:
s
- A char[] array that represents a word.len
- The length of the char[] array.suffix
- AString
object to check if the word given ends with these characters.- Returns:
- True if the word ends with the suffix given , false otherwise.
-
endsWithVowel
private boolean endsWithVowel(char[] s, int len)
Checks if the word contained in the leading portion of char[] array , ends with a Greek vowel.- Parameters:
s
- A char[] array that represents a word.len
- The length of the char[] array.- Returns:
- True if the word contained in the leading portion of char[] array , ends with a vowel , false otherwise.
-
endsWithVowelNoY
private boolean endsWithVowelNoY(char[] s, int len)
Checks if the word contained in the leading portion of char[] array , ends with a Greek vowel.- Parameters:
s
- A char[] array that represents a word.len
- The length of the char[] array.- Returns:
- True if the word contained in the leading portion of char[] array , ends with a vowel , false otherwise.
-
-