Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-5534: add javadocs to GreekStemmer (closes #43)

Robert Muir873d162fe5d8
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 73f9165de04..c7c9772a814 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -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
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/el/GreekStemmer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/el/GreekStemmer.java
index 3db58dd9fe5..f714e54c3d0 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/el/GreekStemmer.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/el/GreekStemmer.java
@@ -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;