lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [10/11] lucenenet git commit: Lucene.Net.Analysis.No refactor: member accessibility and documentation comments
Date Fri, 03 Feb 2017 17:51:16 GMT
Lucene.Net.Analysis.No 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/100a8c51
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/100a8c51
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/100a8c51

Branch: refs/heads/api-work
Commit: 100a8c5128e25f213e66ecb05dba6cd9e970995e
Parents: 31585cf
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Feb 4 00:31:09 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Feb 4 00:45:32 2017 +0700

----------------------------------------------------------------------
 .../Analysis/No/NorwegianAnalyzer.cs               | 10 +++++-----
 .../Analysis/No/NorwegianLightStemFilter.cs        | 16 ++++++++--------
 .../Analysis/No/NorwegianLightStemFilterFactory.cs |  4 +---
 .../Analysis/No/NorwegianLightStemmer.cs           | 13 +++++++------
 .../Analysis/No/NorwegianMinimalStemFilter.cs      | 17 ++++++++---------
 .../No/NorwegianMinimalStemFilterFactory.cs        |  7 +++----
 .../Analysis/No/NorwegianMinimalStemmer.cs         | 11 +++++------
 7 files changed, 37 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
index 6d3b1dd..70f9fc5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianAnalyzer.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Analysis.No
         }
 
         /// <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.No
         }
 
         /// <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 NorwegianAnalyzer(LuceneVersion matchVersion)
               : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
@@ -113,13 +113,13 @@ namespace Lucene.Net.Analysis.No
         /// <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/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
index 6d0e0c1..6fb788a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.TokenAttributes;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -25,7 +24,7 @@ namespace Lucene.Net.Analysis.No
     /// 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>
@@ -36,8 +35,8 @@ namespace Lucene.Net.Analysis.No
         private readonly IKeywordAttribute keywordAttr;
 
         /// <summary>
-        /// Calls {@link #NorwegianLightStemFilter(TokenStream, int) 
-        /// NorwegianLightStemFilter(input, BOKMAAL)}
+        /// Calls <see cref="NorwegianLightStemFilter.NorwegianLightStemFilter(TokenStream,
int)"/>
+        /// - NorwegianLightStemFilter(input, BOKMAAL)
         /// </summary>
         public NorwegianLightStemFilter(TokenStream input)
               : this(input, NorwegianLightStemmer.BOKMAAL)
@@ -45,10 +44,11 @@ namespace Lucene.Net.Analysis.No
         }
 
         /// <summary>
-        /// Creates a new NorwegianLightStemFilter </summary>
-        /// <param name="flags"> set to <see cref="NorwegianLightStemmer#BOKMAAL"/>,

-        ///                     <see cref="NorwegianLightStemmer#NYNORSK"/>, or both.
</param>
-        public NorwegianLightStemFilter(TokenStream input, int flags) : base(input)
+        /// Creates a new <see cref="NorwegianLightStemFilter"/> </summary>
+        /// <param name="flags"> set to <see cref="NorwegianLightStemmer.BOKMAAL"/>,

+        ///                     <see cref="NorwegianLightStemmer.NYNORSK"/>, or both.
</param>
+        public NorwegianLightStemFilter(TokenStream input, int flags) 
+            : base(input)
         {
             stemmer = new NorwegianLightStemmer(flags);
             termAtt = AddAttribute<ICharTermAttribute>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilterFactory.cs
index cc28b03..405d2b7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilterFactory.cs
@@ -1,6 +1,5 @@
 using Lucene.Net.Analysis.Util;
 using System.Collections.Generic;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -34,11 +33,10 @@ namespace Lucene.Net.Analysis.No
     /// </summary>
     public class NorwegianLightStemFilterFactory : TokenFilterFactory
     {
-
         private readonly int flags;
 
         /// <summary>
-        /// Creates a new NorwegianLightStemFilterFactory </summary>
+        /// Creates a new <see cref="NorwegianLightStemFilterFactory"/> </summary>
         public NorwegianLightStemFilterFactory(IDictionary<string, string> args)
               : base(args)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemmer.cs
index 3a8a66e..a53d5f5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemmer.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.Util;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -58,13 +57,15 @@ namespace Lucene.Net.Analysis.No
     /// <summary>
     /// Light Stemmer for Norwegian.
     /// <para>
-    /// Parts of this stemmer is adapted from SwedishLightStemFilter, except
+    /// Parts of this stemmer is adapted from <see cref="Sv.SwedishLightStemFilter"/>,
except
     /// that while the Swedish one has a pre-defined rule set and a corresponding
     /// corpus to validate against whereas the Norwegian one is hand crafted.
     /// </para>
     /// </summary>
     public class NorwegianLightStemmer
     {
+        // LUCENENET TODO: Convert the following into a [Flags] enum
+
         /// <summary>
         /// Constant to remove Bokmål-specific endings </summary>
         public const int BOKMAAL = 1;
@@ -72,12 +73,12 @@ namespace Lucene.Net.Analysis.No
         /// Constant to remove Nynorsk-specific endings </summary>
         public const int NYNORSK = 2;
 
-        internal readonly bool useBokmaal;
-        internal readonly bool useNynorsk;
+        private readonly bool useBokmaal;
+        private readonly bool useNynorsk;
 
         /// <summary>
-        /// Creates a new NorwegianLightStemmer </summary>
-        /// <param name="flags"> set to <see cref="#BOKMAAL"/>, <see cref="#NYNORSK"/>,
or both. </param>
+        /// Creates a new <see cref="NorwegianLightStemmer"/> </summary>
+        /// <param name="flags"> set to <see cref="BOKMAAL"/>, <see cref="NYNORSK"/>,
or both. </param>
         public NorwegianLightStemmer(int flags)
         {
             if (flags <= 0 || flags > BOKMAAL + NYNORSK)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
index 877fb59..520425d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.TokenAttributes;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -25,7 +24,7 @@ namespace Lucene.Net.Analysis.No
     /// 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>
@@ -36,20 +35,20 @@ namespace Lucene.Net.Analysis.No
         private readonly IKeywordAttribute keywordAttr;
 
         /// <summary>
-        /// Calls {@link #NorwegianMinimalStemFilter(TokenStream, int) 
-        /// NorwegianMinimalStemFilter(input, BOKMAAL)}
+        /// Calls <see cref="NorwegianLightStemFilter.NorwegianLightStemFilter(TokenStream,
int)"/> -
+        /// NorwegianMinimalStemFilter(input, BOKMAAL)
         /// </summary>
         public NorwegianMinimalStemFilter(TokenStream input)
-              : this(input, NorwegianLightStemmer.BOKMAAL)
+            : this(input, NorwegianLightStemmer.BOKMAAL)
         {
         }
 
         /// <summary>
-        /// Creates a new NorwegianLightStemFilter </summary>
-        /// <param name="flags"> set to <see cref="NorwegianLightStemmer#BOKMAAL"/>,

-        ///                     <see cref="NorwegianLightStemmer#NYNORSK"/>, or both.
</param>
+        /// Creates a new <see cref="NorwegianLightStemFilter"/> </summary>
+        /// <param name="flags"> set to <see cref="NorwegianLightStemmer.BOKMAAL"/>,

+        ///                     <see cref="NorwegianLightStemmer.NYNORSK"/>, or both.
</param>
         public NorwegianMinimalStemFilter(TokenStream input, int flags)
-              : base(input)
+            : base(input)
         {
             this.stemmer = new NorwegianMinimalStemmer(flags);
             termAtt = AddAttribute<ICharTermAttribute>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilterFactory.cs
index ee99e3d..18f1c56 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilterFactory.cs
@@ -1,6 +1,5 @@
 using Lucene.Net.Analysis.Util;
 using System.Collections.Generic;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -34,12 +33,12 @@ namespace Lucene.Net.Analysis.No
     /// </summary>
     public class NorwegianMinimalStemFilterFactory : TokenFilterFactory
     {
-
         private readonly int flags;
 
         /// <summary>
-        /// Creates a new NorwegianMinimalStemFilterFactory </summary>
-        public NorwegianMinimalStemFilterFactory(IDictionary<string, string> args)
: base(args)
+        /// Creates a new <see cref="NorwegianMinimalStemFilterFactory"/> </summary>
+        public NorwegianMinimalStemFilterFactory(IDictionary<string, string> args)

+            : base(args)
         {
             string variant = Get(args, "variant");
             if (variant == null || "nb".Equals(variant))

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/100a8c51/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemmer.cs
index 5724ef2..0bab21b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemmer.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Analysis.Util;
-using System.IO;
 
 namespace Lucene.Net.Analysis.No
 {
@@ -63,13 +62,13 @@ namespace Lucene.Net.Analysis.No
     /// </summary>
     public class NorwegianMinimalStemmer
     {
-        internal readonly bool useBokmaal;
-        internal readonly bool useNynorsk;
+        private readonly bool useBokmaal;
+        private readonly bool useNynorsk;
 
         /// <summary>
-        /// Creates a new NorwegianMinimalStemmer </summary>
-        /// <param name="flags"> set to <see cref="NorwegianLightStemmer#BOKMAAL"/>,

-        ///                     <see cref="NorwegianLightStemmer#NYNORSK"/>, or both.
</param>
+        /// Creates a new <see cref="NorwegianMinimalStemmer"/> </summary>
+        /// <param name="flags"> set to <see cref="NorwegianLightStemmer.BOKMAAL"/>,

+        ///                     <see cref="NorwegianLightStemmer.NYNORSK"/>, or both.
</param>
         public NorwegianMinimalStemmer(int flags)
         {
             if (flags <= 0 || flags > NorwegianLightStemmer.BOKMAAL + NorwegianLightStemmer.NYNORSK)


Mime
View raw message