lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: Lucene.Net.Analysis.Fi refactor: member accessibility and documentation comments
Date Fri, 03 Feb 2017 05:33:11 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work 20087487f -> 973147f83


Lucene.Net.Analysis.Fi 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/973147f8
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/973147f8
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/973147f8

Branch: refs/heads/api-work
Commit: 973147f83f17100a06a506389caf8527d8f6337c
Parents: 2008748
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Feb 3 12:32:59 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Feb 3 12:32:59 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Fi/FinnishAnalyzer.cs              | 10 +++---
 .../Analysis/Fi/FinnishLightStemFilter.cs       |  3 +-
 .../Fi/FinnishLightStemFilterFactory.cs         |  8 ++---
 .../Analysis/Fi/FinnishLightStemmer.cs          | 34 +++++++++-----------
 4 files changed, 25 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/973147f8/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
index 28af6f5..99c0d41 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishAnalyzer.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Analysis.Fi
         }
 
         /// <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
@@ -79,7 +79,7 @@ namespace Lucene.Net.Analysis.Fi
         }
 
         /// <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 FinnishAnalyzer(LuceneVersion matchVersion)
               : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
@@ -113,13 +113,13 @@ namespace Lucene.Net.Analysis.Fi
         /// <summary>
         /// Creates a
         /// <see cref="Analyzer.TokenStreamComponents"/>
-        /// which tokenizes all the text in the provided <see cref="Reader"/>.
+        /// which tokenizes all the text in the provided <see cref="TextReader"/>.
         /// </summary>
         /// <returns> A
         ///         <see cref="Analyzer.TokenStreamComponents"/>
         ///         built from an <see cref="StandardTokenizer"/> filtered with
-        ///         <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>,
<see cref="StopFilter"/>
-        ///         , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set
is
+        ///         <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>,
<see cref="StopFilter"/>,
+        ///         <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
         ///         provided and <see cref="SnowballFilter"/>. </returns>
         protected override TokenStreamComponents CreateComponents(string fieldName, TextReader
reader)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/973147f8/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
index 2082eb0..58dcebd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.TokenAttributes;
-using System;
 
 namespace Lucene.Net.Analysis.Fi
 {
@@ -25,7 +24,7 @@ namespace Lucene.Net.Analysis.Fi
     /// words.
     /// <para>
     /// To prevent terms from being stemmed use an instance of
-    /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/>
that sets
+    /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/>
that sets
     /// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
     /// </para>
     /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/973147f8/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilterFactory.cs
index ce982c5..801d0ce 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilterFactory.cs
@@ -1,6 +1,5 @@
-using System.Collections.Generic;
-using System;
-using Lucene.Net.Analysis.Util;
+using Lucene.Net.Analysis.Util;
+using System.Collections.Generic;
 
 namespace Lucene.Net.Analysis.Fi
 {
@@ -34,9 +33,8 @@ namespace Lucene.Net.Analysis.Fi
     /// </summary>
     public class FinnishLightStemFilterFactory : TokenFilterFactory
     {
-
         /// <summary>
-        /// Creates a new FinnishLightStemFilterFactory </summary>
+        /// Creates a new <see cref="FinnishLightStemFilterFactory"/> </summary>
         public FinnishLightStemFilterFactory(IDictionary<string, string> args) : base(args)
         {
             if (args.Count > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/973147f8/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemmer.cs
index 4cfe8f1..486c9fe 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemmer.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.Util;
-using System;
 
 namespace Lucene.Net.Analysis.Fi
 {
@@ -59,13 +58,12 @@ namespace Lucene.Net.Analysis.Fi
     /// Light Stemmer for Finnish.
     /// <para>
     /// This stemmer implements the algorithm described in:
-    /// <i>Report on CLEF-2003 Monolingual Tracks</i>
+    /// <c>Report on CLEF-2003 Monolingual Tracks</c>
     /// Jacques Savoy
     /// </para>
     /// </summary>
     public class FinnishLightStemmer
     {
-
         public virtual int Stem(char[] s, int len)
         {
             if (len < 4)
@@ -87,25 +85,25 @@ namespace Lucene.Net.Analysis.Fi
                 }
             }
 
-            len = step1(s, len);
-            len = step2(s, len);
-            len = step3(s, len);
-            len = norm1(s, len);
-            len = norm2(s, len);
+            len = Step1(s, len);
+            len = Step2(s, len);
+            len = Step3(s, len);
+            len = Norm1(s, len);
+            len = Norm2(s, len);
             return len;
         }
 
-        private int step1(char[] s, int len)
+        private int Step1(char[] s, int len)
         {
             if (len > 8)
             {
                 if (StemmerUtil.EndsWith(s, len, "kin"))
                 {
-                    return step1(s, len - 3);
+                    return Step1(s, len - 3);
                 }
                 if (StemmerUtil.EndsWith(s, len, "ko"))
                 {
-                    return step1(s, len - 2);
+                    return Step1(s, len - 2);
                 }
             }
 
@@ -123,7 +121,7 @@ namespace Lucene.Net.Analysis.Fi
             return len;
         }
 
-        private int step2(char[] s, int len)
+        private int Step2(char[] s, int len)
         {
             if (len > 5)
             {
@@ -146,7 +144,7 @@ namespace Lucene.Net.Analysis.Fi
             return len;
         }
 
-        private int step3(char[] s, int len)
+        private int Step3(char[] s, int len)
         {
             if (len > 8)
             {
@@ -180,7 +178,7 @@ namespace Lucene.Net.Analysis.Fi
                     return len - 4;
                 }
 
-                if (s[len - 3] == 'h' && isVowel(s[len - 2]) && s[len - 1]
== 'n')
+                if (s[len - 3] == 'h' && IsVowel(s[len - 2]) && s[len - 1]
== 'n')
                 {
                     return len - 3;
                 }
@@ -228,7 +226,7 @@ namespace Lucene.Net.Analysis.Fi
                     return len - 1;
                 }
 
-                if (s[len - 1] == 'n' && isVowel(s[len - 2]))
+                if (s[len - 1] == 'n' && IsVowel(s[len - 2]))
                 {
                     return len - 2;
                 }
@@ -242,7 +240,7 @@ namespace Lucene.Net.Analysis.Fi
             return len;
         }
 
-        private int norm1(char[] s, int len)
+        private int Norm1(char[] s, int len)
         {
             if (len > 5 && StemmerUtil.EndsWith(s, len, "hde"))
             {
@@ -276,7 +274,7 @@ namespace Lucene.Net.Analysis.Fi
             return len;
         }
 
-        private int norm2(char[] s, int len)
+        private int Norm2(char[] s, int len)
         {
             if (len > 8)
             {
@@ -313,7 +311,7 @@ namespace Lucene.Net.Analysis.Fi
             return len;
         }
 
-        private bool isVowel(char ch)
+        private bool IsVowel(char ch)
         {
             switch (ch)
             {


Mime
View raw message