You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/02/03 17:51:10 UTC

[04/11] lucenenet git commit: Lucene.Net.Analysis.Lv refactor: member accessibility and documentation comments

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

Branch: refs/heads/api-work
Commit: e9ed18435084c4c7b50088135d62272f75d120a7
Parents: 0b3f976
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 17:51:44 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 17:51:44 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Lv/LatvianAnalyzer.cs              | 15 +++++-----
 .../Analysis/Lv/LatvianStemFilter.cs            |  4 +--
 .../Analysis/Lv/LatvianStemFilterFactory.cs     |  3 +-
 .../Analysis/Lv/LatvianStemmer.cs               | 29 ++++++++++----------
 4 files changed, 25 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9ed1843/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
index 26b5074..e466f12 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianAnalyzer.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Analysis.Lv
         }
 
         /// <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
@@ -77,10 +77,11 @@ namespace Lucene.Net.Analysis.Lv
         }
 
         /// <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>
+        /// <param name="matchVersion"> lucene compatibility version </param>
         public LatvianAnalyzer(LuceneVersion matchVersion)
-              : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
+            : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
         {
         }
 
@@ -90,7 +91,7 @@ namespace Lucene.Net.Analysis.Lv
         /// <param name="matchVersion"> lucene compatibility version </param>
         /// <param name="stopwords"> a stopword set </param>
         public LatvianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
-              : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+            : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
         {
         }
 
@@ -103,7 +104,7 @@ namespace Lucene.Net.Analysis.Lv
         /// <param name="stopwords"> a stopword set </param>
         /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
         public LatvianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
-              : base(matchVersion, stopwords)
+            : base(matchVersion, stopwords)
         {
             this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
         }
@@ -116,8 +117,8 @@ namespace Lucene.Net.Analysis.Lv
         /// <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="LatvianStemFilter"/>. </returns>
         protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9ed1843/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
index 8a373fa..138d2f9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Lv
     /// 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,7 +36,7 @@ namespace Lucene.Net.Analysis.Lv
         private readonly IKeywordAttribute keywordAttr;
 
         public LatvianStemFilter(TokenStream input)
-              : base(input)
+            : base(input)
         {
             termAtt = AddAttribute<ICharTermAttribute>();
             keywordAttr = AddAttribute<IKeywordAttribute>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9ed1843/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilterFactory.cs
index 33b3789..f626fcb 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilterFactory.cs
@@ -34,9 +34,8 @@ namespace Lucene.Net.Analysis.Lv
     /// </summary>
     public class LatvianStemFilterFactory : TokenFilterFactory
     {
-
         /// <summary>
-        /// Creates a new LatvianStemFilterFactory </summary>
+        /// Creates a new <see cref="LatvianStemFilterFactory"/> </summary>
         public LatvianStemFilterFactory(IDictionary<string, string> args)
               : base(args)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e9ed1843/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemmer.cs
index 3a95d76..cb75bef 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemmer.cs
@@ -1,5 +1,4 @@
 \ufeffusing Lucene.Net.Analysis.Util;
-using System.IO;
 
 namespace Lucene.Net.Analysis.Lv
 {
@@ -24,14 +23,14 @@ namespace Lucene.Net.Analysis.Lv
     /// Light stemmer for Latvian.
     /// <para>
     /// This is a light version of the algorithm in Karlis Kreslin's PhD thesis
-    /// <i>A stemming algorithm for Latvian</i> with the following modifications:
-    /// <ul>
-    ///   <li>Only explicitly stems noun and adjective morphology
-    ///   <li>Stricter length/vowel checks for the resulting stems (verb etc suffix stripping is removed)
-    ///   <li>Removes only the primary inflectional suffixes: case and number for nouns ; 
-    ///       case, number, gender, and definitiveness for adjectives.
-    ///   <li>Palatalization is only handled when a declension II,V,VI noun suffix is removed.
-    /// </ul>
+    /// <c>A stemming algorithm for Latvian</c> with the following modifications:
+    /// <list type="bullet">
+    ///   <item>Only explicitly stems noun and adjective morphology</item>
+    ///   <item>Stricter length/vowel checks for the resulting stems (verb etc suffix stripping is removed)</item>
+    ///   <item>Removes only the primary inflectional suffixes: case and number for nouns ; 
+    ///       case, number, gender, and definitiveness for adjectives.</item>
+    ///   <item>Palatalization is only handled when a declension II,V,VI noun suffix is removed.</item>
+    /// </list>
     /// </para>
     /// </summary>
     public class LatvianStemmer
@@ -94,12 +93,12 @@ namespace Lucene.Net.Analysis.Lv
 
         /// <summary>
         /// Most cases are handled except for the ambiguous ones:
-        /// <ul>
-        ///  <li> s -> \u0161
-        ///  <li> t -> \u0161
-        ///  <li> d -> \u017e
-        ///  <li> z -> \u017e
-        /// </ul>
+        /// <list type="bullet">
+        ///     <item> s -> \u0161</item>
+        ///     <item> t -> \u0161</item>
+        ///     <item> d -> \u017e</item>
+        ///     <item> z -> \u017e</item>
+        /// </list>
         /// </summary>
         private int Unpalatalize(char[] s, int len)
         {