lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [01/11] lucenenet git commit: Lucene.Net.Analysis.Id refactor: member accessibility and documentation comments
Date Fri, 03 Feb 2017 17:51:07 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work a4828b1ad -> 30f14be68


Lucene.Net.Analysis.Id refactor: member accessibility and documentation comments


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3eada003
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3eada003
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3eada003

Branch: refs/heads/api-work
Commit: 3eada0038bbf24ddfea303df4836b88b1f86592c
Parents: a4828b1
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Feb 3 17:31:51 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Feb 3 17:31:51 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Id/IndonesianAnalyzer.cs           | 14 +++----
 .../Analysis/Id/IndonesianStemFilter.cs         |  8 ++--
 .../Analysis/Id/IndonesianStemFilterFactory.cs  |  4 +-
 .../Analysis/Id/IndonesianStemmer.cs            | 44 ++++++++++----------
 4 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3eada003/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
index 44d6c11..74e1818 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianAnalyzer.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Id
 	 */
 
     /// <summary>
-    /// Analyzer for Indonesian (Bahasa)
+    /// <see cref="Analyzer"/> for Indonesian (Bahasa)
     /// </summary>
     public sealed class IndonesianAnalyzer : StopwordAnalyzerBase
     {
@@ -46,7 +46,7 @@ namespace Lucene.Net.Analysis.Id
         }
 
         /// <summary>
-        /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class

+        /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once
the outer class 
         /// accesses the static final set the first time.;
         /// </summary>
         private class DefaultSetHolder
@@ -72,10 +72,10 @@ namespace Lucene.Net.Analysis.Id
         private readonly CharArraySet stemExclusionSet;
 
         /// <summary>
-        /// Builds an analyzer with the default stop words: <see cref="#DEFAULT_STOPWORD_FILE"/>.
+        /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
         /// </summary>
         public IndonesianAnalyzer(LuceneVersion matchVersion)
-              : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
+            : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
         {
         }
 
@@ -87,7 +87,7 @@ namespace Lucene.Net.Analysis.Id
         /// <param name="stopwords">
         ///          a stopword set </param>
         public IndonesianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
-              : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+            : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
         {
         }
 
@@ -103,7 +103,7 @@ namespace Lucene.Net.Analysis.Id
         /// <param name="stemExclusionSet">
         ///          a set of terms not to be stemmed </param>
         public IndonesianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet
stemExclusionSet)
-              : base(matchVersion, stopwords)
+            : base(matchVersion, stopwords)
         {
             this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion,
stemExclusionSet));
         }
@@ -111,7 +111,7 @@ namespace Lucene.Net.Analysis.Id
         /// <summary>
         /// Creates
         /// <see cref="Analyzer.TokenStreamComponents"/>
-        /// used to tokenize all the text in the provided <see cref="Reader"/>.
+        /// used to tokenize all the text in the provided <see cref="TextReader"/>.
         /// </summary>
         /// <returns> <see cref="Analyzer.TokenStreamComponents"/>
         ///         built from an <see cref="StandardTokenizer"/> filtered with

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3eada003/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilter.cs
index a2ac74d..89616c3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilter.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.Id
         private readonly bool stemDerivational;
 
         /// <summary>
-        /// Calls <see cref="#IndonesianStemFilter(TokenStream, boolean) IndonesianStemFilter(input,
true)"/>
+        /// Calls <see cref="IndonesianStemFilter(TokenStream, bool)">IndonesianStemFilter(input,
true)</see>
         /// </summary>
         public IndonesianStemFilter(TokenStream input)
               : this(input, true)
@@ -39,9 +39,9 @@ namespace Lucene.Net.Analysis.Id
         }
 
         /// <summary>
-        /// Create a new IndonesianStemFilter.
+        /// Create a new <see cref="IndonesianStemFilter"/>.
         /// <para>
-        /// If <code>stemDerivational</code> is false, 
+        /// If <paramref name="stemDerivational"/> is false, 
         /// only inflectional suffixes (particles and possessive pronouns) are stemmed.
         /// </para>
         /// </summary>
@@ -59,7 +59,7 @@ namespace Lucene.Net.Analysis.Id
             {
                 if (!keywordAtt.IsKeyword)
                 {
-                    int newlen = stemmer.stem(termAtt.Buffer, termAtt.Length, stemDerivational);
+                    int newlen = stemmer.Stem(termAtt.Buffer, termAtt.Length, stemDerivational);
                     termAtt.Length = newlen;
                 }
                 return true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3eada003/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilterFactory.cs
index 2944496..8f152fd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemFilterFactory.cs
@@ -37,9 +37,9 @@ namespace Lucene.Net.Analysis.Id
         private readonly bool stemDerivational;
 
         /// <summary>
-        /// Creates a new IndonesianStemFilterFactory </summary>
+        /// Creates a new <see cref="IndonesianStemFilterFactory"/> </summary>
         public IndonesianStemFilterFactory(IDictionary<string, string> args)
-              : base(args)
+            : base(args)
         {
             stemDerivational = GetBoolean(args, "stemDerivational", true);
             if (args.Count > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3eada003/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemmer.cs
index 5c2e9ae..3ddc0b3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Id/IndonesianStemmer.cs
@@ -24,8 +24,8 @@ namespace Lucene.Net.Analysis.Id
     /// Stemmer for Indonesian.
     /// <para>
     /// Stems Indonesian words with the algorithm presented in:
-    /// <i>A Study of Stemming Effects on Information Retrieval in 
-    /// Bahasa Indonesia</i>, Fadillah Z Tala.
+    /// <c>A Study of Stemming Effects on Information Retrieval in 
+    /// Bahasa Indonesia</c>, Fadillah Z Tala.
     /// http://www.illc.uva.nl/Publications/ResearchReports/MoL-2003-02.text.pdf
     /// </para>
     /// </summary>
@@ -44,17 +44,17 @@ namespace Lucene.Net.Analysis.Id
         /// <summary>
         /// Stem a term (returning its new length).
         /// <para>
-        /// Use <code>stemDerivational</code> to control whether full stemming
+        /// Use <paramref name="stemDerivational"/> to control whether full stemming
         /// or only light inflectional stemming is done.
         /// </para>
         /// </summary>
-        public virtual int stem(char[] text, int length, bool stemDerivational)
+        public virtual int Stem(char[] text, int length, bool stemDerivational)
         {
             flags = 0;
             numSyllables = 0;
             for (int i = 0; i < length; i++)
             {
-                if (isVowel(text[i]))
+                if (IsVowel(text[i]))
                 {
                     numSyllables++;
                 }
@@ -62,11 +62,11 @@ namespace Lucene.Net.Analysis.Id
 
             if (numSyllables > 2)
             {
-                length = removeParticle(text, length);
+                length = RemoveParticle(text, length);
             }
             if (numSyllables > 2)
             {
-                length = removePossessivePronoun(text, length);
+                length = RemovePossessivePronoun(text, length);
             }
 
             if (stemDerivational)
@@ -81,20 +81,20 @@ namespace Lucene.Net.Analysis.Id
             int oldLength = length;
             if (numSyllables > 2)
             {
-                length = removeFirstOrderPrefix(text, length);
+                length = RemoveFirstOrderPrefix(text, length);
             }
             if (oldLength != length) // a rule is fired
             {
                 oldLength = length;
                 if (numSyllables > 2)
                 {
-                    length = removeSuffix(text, length);
+                    length = RemoveSuffix(text, length);
                 }
                 if (oldLength != length) // a rule is fired
                 {
                     if (numSyllables > 2)
                     {
-                        length = removeSecondOrderPrefix(text, length);
+                        length = RemoveSecondOrderPrefix(text, length);
                     }
                 }
             } // fail
@@ -102,17 +102,17 @@ namespace Lucene.Net.Analysis.Id
             {
                 if (numSyllables > 2)
                 {
-                    length = removeSecondOrderPrefix(text, length);
+                    length = RemoveSecondOrderPrefix(text, length);
                 }
                 if (numSyllables > 2)
                 {
-                    length = removeSuffix(text, length);
+                    length = RemoveSuffix(text, length);
                 }
             }
             return length;
         }
 
-        private bool isVowel(char ch)
+        private bool IsVowel(char ch)
         {
             switch (ch)
             {
@@ -127,7 +127,7 @@ namespace Lucene.Net.Analysis.Id
             }
         }
 
-        private int removeParticle(char[] text, int length)
+        private int RemoveParticle(char[] text, int length)
         {
             if (StemmerUtil.EndsWith(text, length, "kah") || StemmerUtil.EndsWith(text, length,
"lah") || StemmerUtil.EndsWith(text, length, "pun"))
             {
@@ -138,7 +138,7 @@ namespace Lucene.Net.Analysis.Id
             return length;
         }
 
-        private int removePossessivePronoun(char[] text, int length)
+        private int RemovePossessivePronoun(char[] text, int length)
         {
             if (StemmerUtil.EndsWith(text, length, "ku") || StemmerUtil.EndsWith(text, length,
"mu"))
             {
@@ -155,7 +155,7 @@ namespace Lucene.Net.Analysis.Id
             return length;
         }
 
-        private int removeFirstOrderPrefix(char[] text, int length)
+        private int RemoveFirstOrderPrefix(char[] text, int length)
         {
             if (StemmerUtil.StartsWith(text, length, "meng"))
             {
@@ -164,7 +164,7 @@ namespace Lucene.Net.Analysis.Id
                 return StemmerUtil.DeleteN(text, 0, length, 4);
             }
 
-            if (StemmerUtil.StartsWith(text, length, "meny") && length > 4 &&
isVowel(text[4]))
+            if (StemmerUtil.StartsWith(text, length, "meny") && length > 4 &&
IsVowel(text[4]))
             {
                 flags |= REMOVED_MENG;
                 text[3] = 's';
@@ -200,7 +200,7 @@ namespace Lucene.Net.Analysis.Id
                 return StemmerUtil.DeleteN(text, 0, length, 4);
             }
 
-            if (StemmerUtil.StartsWith(text, length, "peny") && length > 4 &&
isVowel(text[4]))
+            if (StemmerUtil.StartsWith(text, length, "peny") && length > 4 &&
IsVowel(text[4]))
             {
                 flags |= REMOVED_PENG;
                 text[3] = 's';
@@ -215,7 +215,7 @@ namespace Lucene.Net.Analysis.Id
                 return StemmerUtil.DeleteN(text, 0, length, 4);
             }
 
-            if (StemmerUtil.StartsWith(text, length, "pen") && length > 3 &&
isVowel(text[3]))
+            if (StemmerUtil.StartsWith(text, length, "pen") && length > 3 &&
IsVowel(text[3]))
             {
                 flags |= REMOVED_PENG;
                 text[2] = 't';
@@ -261,7 +261,7 @@ namespace Lucene.Net.Analysis.Id
             return length;
         }
 
-        private int removeSecondOrderPrefix(char[] text, int length)
+        private int RemoveSecondOrderPrefix(char[] text, int length)
         {
             if (StemmerUtil.StartsWith(text, length, "ber"))
             {
@@ -277,7 +277,7 @@ namespace Lucene.Net.Analysis.Id
                 return StemmerUtil.DeleteN(text, 0, length, 3);
             }
 
-            if (StemmerUtil.StartsWith(text, length, "be") && length > 4 &&
!isVowel(text[2]) && text[3] == 'e' && text[4] == 'r')
+            if (StemmerUtil.StartsWith(text, length, "be") && length > 4 &&
!IsVowel(text[2]) && text[3] == 'e' && text[4] == 'r')
             {
                 flags |= REMOVED_BER;
                 numSyllables--;
@@ -306,7 +306,7 @@ namespace Lucene.Net.Analysis.Id
             return length;
         }
 
-        private int removeSuffix(char[] text, int length)
+        private int RemoveSuffix(char[] text, int length)
         {
             if (StemmerUtil.EndsWith(text, length, "kan") && (flags & REMOVED_KE)
== 0 && (flags & REMOVED_PENG) == 0 && (flags & REMOVED_PE) == 0)
             {


Mime
View raw message