java.lang.Object
org.apache.lucene.analysis.el.GreekStemmer
A stemmer for Greek words, according to: Development of a Stemmer for the Greek Language.
Georgios Ntais
NOTE: 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
FieldsModifier and TypeFieldDescriptionprivate static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
private static final CharArraySet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
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 Details
-
exc4
-
exc6
-
exc7
-
exc8a
-
exc8b
-
exc9
-
exc12a
-
exc12b
-
exc13
-
exc14
-
exc15a
-
exc15b
-
exc16
-
exc17
-
exc18
-
exc19
-
-
Constructor Details
-
GreekStemmer
public GreekStemmer()
-
-
Method Details
-
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
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.
-