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:
Robert Muir 2014-03-17 11:43:18 +00:00
parent 396c06c75b
commit 873d162fe5
2 changed files with 41 additions and 0 deletions

View File

@ -216,6 +216,11 @@ Build
* LUCENE-5512: Remove redundant typing (use diamond operator) throughout
the codebase. (Furkan KAMACI via Robert Muir)
Documentation:
* LUCENE-5534: Add javadocs to GreekStemmer methods.
(Stamatis Pitsios via Robert Muir)
======================= Lucene 4.7.0 =======================
New Features

View File

@ -32,6 +32,15 @@ import java.util.Arrays;
* @lucene.experimental
*/
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) {
if (len < 4) // too short
return len;
@ -773,6 +782,15 @@ public class GreekStemmer {
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) {
final int suffixLen = suffix.length();
if (suffixLen > len)
@ -784,6 +802,15 @@ public class GreekStemmer {
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) {
if (len == 0)
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) {
if (len == 0)
return false;