lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [03/39] lucenenet git commit: Lucene.Net.Analysis.Snowball refactor: member accessibility and documentation comments
Date Sat, 04 Feb 2017 20:32:22 GMT
Lucene.Net.Analysis.Snowball 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/6b013858
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/6b013858
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/6b013858

Branch: refs/heads/api-work
Commit: 6b0138586698c6f053565c85935a09b8e10b07b8
Parents: f3a14db
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Feb 4 09:14:35 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Feb 4 09:14:35 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Snowball/SnowballAnalyzer.cs       | 18 ++++++------
 .../Analysis/Snowball/SnowballFilter.cs         | 31 ++++++++------------
 .../Snowball/SnowballPorterFilterFactory.cs     |  4 +--
 3 files changed, 23 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6b013858/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballAnalyzer.cs
index 352616a..bcaa1d6 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballAnalyzer.cs
@@ -27,22 +27,22 @@ namespace Lucene.Net.Analysis.Snowball
 	 */
 
     /// <summary>
-    /// Filters <see cref="StandardTokenizer"/> with <see cref="StandardFilter"/>,
{@link
-    /// LowerCaseFilter}, <see cref="StopFilter"/> and <see cref="SnowballFilter"/>.
+    /// Filters <see cref="StandardTokenizer"/> with <see cref="StandardFilter"/>,

+    /// <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/> and <see cref="SnowballFilter"/>.
     /// 
     /// Available stemmers are listed in org.tartarus.snowball.ext.  The name of a
     /// stemmer is the part of the class name before "Stemmer", e.g., the stemmer in
-    /// <see cref="org.tartarus.snowball.ext.EnglishStemmer"/> is named "English".
+    /// <see cref="Tartarus.Snowball.Ext.EnglishStemmer"/> is named "English".
     /// 
     /// <para><b>NOTE</b>: This class uses the same <see cref="LuceneVersion"/>
     /// dependent settings as <see cref="StandardAnalyzer"/>, with the following addition:
-    /// <ul>
-    ///   <li> As of 3.1, uses <see cref="TurkishLowerCaseFilter"/> for Turkish
language.
-    /// </ul>
+    /// <list type="bullet">
+    ///   <item> As of 3.1, uses <see cref="TurkishLowerCaseFilter"/> for Turkish
language.</item>
+    /// </list>
     /// </para> </summary>
     /// @deprecated (3.1) Use the language-specific analyzer in modules/analysis instead.

     /// This analyzer will be removed in Lucene 5.0 
-    [Obsolete("(3.1) Use the language-specific analyzer in modules/analysis instead.")]
+    [Obsolete("(3.1) Use the language-specific analyzer in modules/analysis instead. This
analyzer will be removed in Lucene 5.0.")]
     public sealed class SnowballAnalyzer : Analyzer
     {
         private string name;
@@ -65,8 +65,8 @@ namespace Lucene.Net.Analysis.Snowball
         }
 
         /// <summary>
-        /// Constructs a <see cref="StandardTokenizer"/> filtered by a {@link
-        ///    StandardFilter}, a <see cref="LowerCaseFilter"/>, a <see cref="StopFilter"/>,
+        /// Constructs a <see cref="StandardTokenizer"/> filtered by a 
+        ///    <see cref="StandardFilter"/>, a <see cref="LowerCaseFilter"/>,
a <see cref="StopFilter"/>,
         ///    and a <see cref="SnowballFilter"/> 
         /// </summary>
         protected override TokenStreamComponents CreateComponents(string fieldName, TextReader
reader)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6b013858/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
index 103bd66..d9f8672 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
@@ -25,29 +25,26 @@ namespace Lucene.Net.Analysis.Snowball
     /// <summary>
     /// A filter that stems words using a Snowball-generated stemmer.
     /// 
-    /// Available stemmers are listed in <see cref="org.tartarus.snowball.ext"/>.
-    /// <para><b>NOTE</b>: SnowballFilter expects lowercased text.
-    /// <ul>
-    ///  <li>For the Turkish language, see <see cref="TurkishLowerCaseFilter"/>.
-    ///  <li>For other languages, see <see cref="LowerCaseFilter"/>.
-    /// </ul>
+    /// Available stemmers are listed in Lucene.Net.Tartarus.Snowball.Ext.
+    /// <para><b>NOTE</b>: <see cref="SnowballFilter"/> expects lowercased
text.
+    /// <list type="bullet">
+    ///     <item>For the Turkish language, see <see cref="Tr.TurkishLowerCaseFilter"/>.</item>
+    ///     <item>For other languages, see <see cref="Core.LowerCaseFilter"/>.</item>
+    /// </list>
     /// </para>
     /// 
     /// <para>
     /// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To prevent
     /// certain terms from being passed to the stemmer
-    /// <see cref="KeywordAttribute#isKeyword()"/> should be set to <code>true</code>
+    /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <c>true</c>
     /// in a previous <see cref="TokenStream"/>.
     /// 
     /// Note: For including the original term as well as the stemmed version, see
-    /// <see cref="org.apache.lucene.analysis.miscellaneous.KeywordRepeatFilterFactory"/>
+    /// <see cref="Miscellaneous.KeywordRepeatFilterFactory"/>
     /// </para>
-    /// 
-    /// 
     /// </summary>
     public sealed class SnowballFilter : TokenFilter
     {
-
         private readonly SnowballProgram stemmer;
 
         private readonly ICharTermAttribute termAtt;
@@ -64,19 +61,17 @@ namespace Lucene.Net.Analysis.Snowball
         /// <summary>
         /// Construct the named stemming filter.
         /// 
-        /// Available stemmers are listed in <see cref="org.tartarus.snowball.ext"/>.
+        /// Available stemmers are listed in Lucene.Net.Tartarus.Snowball.Ext.
         /// The name of a stemmer is the part of the class name before "Stemmer",
-        /// e.g., the stemmer in <see cref="org.tartarus.snowball.ext.EnglishStemmer"/>
is named "English".
+        /// e.g., the stemmer in <see cref="Tartarus.Snowball.Ext.EnglishStemmer"/>
is named "English".
         /// </summary>
         /// <param name="in"> the input tokens to stem </param>
         /// <param name="name"> the name of a stemmer </param>
         public SnowballFilter(TokenStream @in, string name)
-              : base(@in)
+            : base(@in)
         {
             try
             {
-                // LUCENENET TODO: There should probably be a way to make this an extesibility
point so
-                // custom extensions can be loaded.
                 string className = typeof(SnowballProgram).Namespace + ".Ext." +
                     name + "Stemmer, " + this.GetType().GetTypeInfo().Assembly.GetName().Name;
                 Type stemClass = Type.GetType(className);
@@ -93,8 +88,8 @@ namespace Lucene.Net.Analysis.Snowball
         }
 
         /// <summary>
-        /// Returns the next input Token, after being stemmed </summary>
-        public override bool IncrementToken()
+        /// Returns the next input <see cref="Token"/>, after being stemmed </summary>
+        public override sealed bool IncrementToken()
         {
             if (m_input.IncrementToken())
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6b013858/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballPorterFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballPorterFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballPorterFilterFactory.cs
index 707467f..312a21e 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballPorterFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballPorterFilterFactory.cs
@@ -48,7 +48,7 @@ namespace Lucene.Net.Analysis.Snowball
         private CharArraySet protectedWords = null;
 
         /// <summary>
-        /// Creates a new SnowballPorterFilterFactory </summary>
+        /// Creates a new <see cref="SnowballPorterFilterFactory"/> </summary>
         public SnowballPorterFilterFactory(IDictionary<string, string> args) : base(args)
         {
             language = Get(args, "language", "English");
@@ -61,8 +61,6 @@ namespace Lucene.Net.Analysis.Snowball
 
         public virtual void Inform(IResourceLoader loader)
         {
-            // LUCENENET TODO: There should probably be a way to make this an extesibility
point so
-            // custom extensions can be loaded.
             string className = typeof(SnowballProgram).Namespace + ".Ext." + 
                 language + "Stemmer, " + this.GetType().GetTypeInfo().Assembly.GetName().Name;
             stemClass = Type.GetType(className);


Mime
View raw message