mirror of https://github.com/apache/lucene.git
LUCENE-5534: add javadocs to GreekStemmer (closes #43)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1578315 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
396c06c75b
commit
873d162fe5
|
@ -216,6 +216,11 @@ Build
|
||||||
* LUCENE-5512: Remove redundant typing (use diamond operator) throughout
|
* LUCENE-5512: Remove redundant typing (use diamond operator) throughout
|
||||||
the codebase. (Furkan KAMACI via Robert Muir)
|
the codebase. (Furkan KAMACI via Robert Muir)
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
* LUCENE-5534: Add javadocs to GreekStemmer methods.
|
||||||
|
(Stamatis Pitsios via Robert Muir)
|
||||||
|
|
||||||
======================= Lucene 4.7.0 =======================
|
======================= Lucene 4.7.0 =======================
|
||||||
|
|
||||||
New Features
|
New Features
|
||||||
|
|
|
@ -32,6 +32,15 @@ import java.util.Arrays;
|
||||||
* @lucene.experimental
|
* @lucene.experimental
|
||||||
*/
|
*/
|
||||||
public class GreekStemmer {
|
public class GreekStemmer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stems a word contained in a leading portion of a char[] array.
|
||||||
|
* The word is passed through a number of rules that modify it's length.
|
||||||
|
*
|
||||||
|
* @param s A char[] array that contains the word to be stemmed.
|
||||||
|
* @param len The length of the char[] array.
|
||||||
|
* @return The new length of the stemmed word.
|
||||||
|
*/
|
||||||
public int stem(char s[], int len) {
|
public int stem(char s[], int len) {
|
||||||
if (len < 4) // too short
|
if (len < 4) // too short
|
||||||
return len;
|
return len;
|
||||||
|
@ -773,6 +782,15 @@ public class GreekStemmer {
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the word contained in the leading portion of char[] array ,
|
||||||
|
* ends with the suffix given as parameter.
|
||||||
|
*
|
||||||
|
* @param s A char[] array that represents a word.
|
||||||
|
* @param len The length of the char[] array.
|
||||||
|
* @param suffix A {@link String} object to check if the word given ends with these characters.
|
||||||
|
* @return True if the word ends with the suffix given , false otherwise.
|
||||||
|
*/
|
||||||
private boolean endsWith(char s[], int len, String suffix) {
|
private boolean endsWith(char s[], int len, String suffix) {
|
||||||
final int suffixLen = suffix.length();
|
final int suffixLen = suffix.length();
|
||||||
if (suffixLen > len)
|
if (suffixLen > len)
|
||||||
|
@ -784,6 +802,15 @@ public class GreekStemmer {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the word contained in the leading portion of char[] array ,
|
||||||
|
* ends with a Greek vowel.
|
||||||
|
*
|
||||||
|
* @param s A char[] array that represents a word.
|
||||||
|
* @param len The length of the char[] array.
|
||||||
|
* @return True if the word contained in the leading portion of char[] array ,
|
||||||
|
* ends with a vowel , false otherwise.
|
||||||
|
*/
|
||||||
private boolean endsWithVowel(char s[], int len) {
|
private boolean endsWithVowel(char s[], int len) {
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -801,6 +828,15 @@ public class GreekStemmer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the word contained in the leading portion of char[] array ,
|
||||||
|
* ends with a Greek vowel.
|
||||||
|
*
|
||||||
|
* @param s A char[] array that represents a word.
|
||||||
|
* @param len The length of the char[] array.
|
||||||
|
* @return True if the word contained in the leading portion of char[] array ,
|
||||||
|
* ends with a vowel , false otherwise.
|
||||||
|
*/
|
||||||
private boolean endsWithVowelNoY(char s[], int len) {
|
private boolean endsWithVowelNoY(char s[], int len) {
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue