lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [09/13] lucenenet git commit: Lucene.Net.Analysis.De refactor: member accessibility and documentation comments
Date Fri, 03 Feb 2017 04:41:56 GMT
Lucene.Net.Analysis.De 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/217f113e
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/217f113e
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/217f113e

Branch: refs/heads/api-work
Commit: 217f113e91923f846fdd00f2aba403d0a1c59b02
Parents: 31d8cbd
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Feb 3 11:08:05 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Feb 3 11:08:05 2017 +0700

----------------------------------------------------------------------
 .../Analysis/De/GermanAnalyzer.cs               | 49 ++++++++++++--------
 .../Analysis/De/GermanLightStemFilter.cs        |  2 +-
 .../Analysis/De/GermanLightStemFilterFactory.cs |  3 +-
 .../Analysis/De/GermanLightStemmer.cs           |  3 +-
 .../Analysis/De/GermanMinimalStemFilter.cs      |  2 +-
 .../De/GermanMinimalStemFilterFactory.cs        |  2 +-
 .../Analysis/De/GermanMinimalStemmer.cs         |  3 +-
 .../Analysis/De/GermanNormalizationFilter.cs    | 16 +++----
 .../De/GermanNormalizationFilterFactory.cs      |  3 +-
 .../Analysis/De/GermanStemFilter.cs             |  4 +-
 .../Analysis/De/GermanStemFilterFactory.cs      |  6 +--
 .../Analysis/De/GermanStemmer.cs                | 24 +++++-----
 12 files changed, 63 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
index eae217f..7eefe2e 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
@@ -42,16 +42,15 @@ namespace Lucene.Net.Analysis.De
     /// exclusion list is empty by default.
     /// </para>
     /// 
-    /// <a name="version"/>
     /// <para>You must specify the required <see cref="LuceneVersion"/>
     /// compatibility when creating GermanAnalyzer:
-    /// <ul>
-    ///   <li> As of 3.6, GermanLightStemFilter is used for less aggressive stemming.
-    ///   <li> As of 3.1, Snowball stemming is done with SnowballFilter, and 
-    ///        Snowball stopwords are used by default.
-    ///   <li> As of 2.9, StopFilter preserves position
-    ///        increments
-    /// </ul>
+    /// <list>
+    ///   <item> As of 3.6, GermanLightStemFilter is used for less aggressive stemming.</item>
+    ///   <item> As of 3.1, Snowball stemming is done with SnowballFilter, and 
+    ///        Snowball stopwords are used by default.</item>
+    ///   <item> As of 2.9, StopFilter preserves position
+    ///        increments</item>
+    /// </list>
     /// 
     /// </para>
     /// <para><b>NOTE</b>: This class uses the same <see cref="LuceneVersion"/>
@@ -59,10 +58,22 @@ namespace Lucene.Net.Analysis.De
     /// </summary>
     public sealed class GermanAnalyzer : StopwordAnalyzerBase
     {
-
         /// @deprecated in 3.1, remove in Lucene 5.0 (index bw compat) 
         [Obsolete("in 3.1, remove in Lucene 5.0 (index bw compat)")]
-        private static readonly string[] GERMAN_STOP_WORDS = new string[] { "einer", "eine",
"eines", "einem", "einen", "der", "die", "das", "dass", "daß", "du", "er", "sie", "es", "was",
"wer", "wie", "wir", "und", "oder", "ohne", "mit", "am", "im", "in", "aus", "auf", "ist",
"sein", "war", "wird", "ihr", "ihre", "ihres", "als", "für", "von", "mit", "dich", "dir",
"mich", "mir", "mein", "sein", "kein", "durch", "wegen", "wird" };
+        private static readonly string[] GERMAN_STOP_WORDS = new string[] {
+            "einer", "eine", "eines", "einem", "einen",
+            "der", "die", "das", "dass", "daß",
+            "du", "er", "sie", "es",
+            "was", "wer", "wie", "wir",
+            "und", "oder", "ohne", "mit",
+            "am", "im", "in", "aus", "auf",
+            "ist", "sein", "war", "wird",
+            "ihr", "ihre", "ihres",
+            "als", "für", "von", "mit",
+            "dich", "dir", "mich", "mir",
+            "mein", "sein", "kein",
+            "durch", "wegen", "wird"
+        };
 
         /// <summary>
         /// File containing default German stopwords. </summary>
@@ -105,9 +116,9 @@ namespace Lucene.Net.Analysis.De
             }
         }
 
-        /// <summary>
-        /// Contains the stopwords used with the <see cref="StopFilter"/>.
-        /// </summary>
+        ///// <summary>
+        ///// Contains the stopwords used with the <see cref="StopFilter"/>.
+        ///// </summary>
 
         /// <summary>
         /// Contains words that should be indexed but not stemmed.
@@ -116,7 +127,7 @@ namespace Lucene.Net.Analysis.De
 
         /// <summary>
         /// Builds an analyzer with the default stop words:
-        /// <see cref="#getDefaultStopSet()"/>.
+        /// <see cref="DefaultStopSet"/>.
         /// </summary>
         public GermanAnalyzer(LuceneVersion matchVersion)
 #pragma warning disable 612, 618
@@ -130,7 +141,7 @@ namespace Lucene.Net.Analysis.De
         /// Builds an analyzer with the given stop words 
         /// </summary>
         /// <param name="matchVersion">
-        ///          lucene compatibility version </param>
+        ///          <see cref="LuceneVersion"/> lucene compatibility version </param>
         /// <param name="stopwords">
         ///          a stopword set </param>
         public GermanAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
@@ -142,7 +153,7 @@ namespace Lucene.Net.Analysis.De
         /// Builds an analyzer with the given stop words
         /// </summary>
         /// <param name="matchVersion">
-        ///          lucene compatibility version </param>
+        ///          <see cref="LuceneVersion"/> lucene compatibility version </param>
         /// <param name="stopwords">
         ///          a stopword set </param>
         /// <param name="stemExclusionSet">
@@ -156,12 +167,12 @@ namespace Lucene.Net.Analysis.De
         /// <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 a <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, <see cref="GermanNormalizationFilter"/> and <see cref="GermanLightStemFilter"/>
</returns>
         protected override TokenStreamComponents CreateComponents(string fieldName, TextReader
reader)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
index a58138c..1bce56b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.De
     /// 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/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilterFactory.cs
index f16956c..207b788 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.De
     /// </summary>
     public class GermanLightStemFilterFactory : TokenFilterFactory
     {
-
         /// <summary>
-        /// Creates a new GermanLightStemFilterFactory </summary>
+        /// Creates a new <see cref="GermanLightStemFilterFactory"/> </summary>
         public GermanLightStemFilterFactory(IDictionary<string, string> args)
               : base(args)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemmer.cs
index 96ce9ac..c1940d2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemmer.cs
@@ -56,13 +56,12 @@
     /// Light Stemmer for German.
     /// <para>
     /// This stemmer implements the "UniNE" algorithm in:
-    /// <i>Light Stemming Approaches for the French, Portuguese, German and Hungarian
Languages</i>
+    /// <c>Light Stemming Approaches for the French, Portuguese, German and Hungarian
Languages</c>
     /// Jacques Savoy
     /// </para>
     /// </summary>
     public class GermanLightStemmer
     {
-
         public virtual int Stem(char[] s, int len)
         {
             for (int i = 0; i < len; i++)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
index 84f1f4b..094a6fc 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.De
     /// 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/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilterFactory.cs
index 25c6cb1..cdf77e7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilterFactory.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.De
     {
 
         /// <summary>
-        /// Creates a new GermanMinimalStemFilterFactory </summary>
+        /// Creates a new <see cref="GermanMinimalStemFilterFactory"/> </summary>
         public GermanMinimalStemFilterFactory(IDictionary<string, string> args) : base(args)
         {
             if (args.Count > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemmer.cs
index 05b2d9a..6e01384 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemmer.cs
@@ -56,13 +56,12 @@
     /// Minimal Stemmer for German.
     /// <para>
     /// This stemmer implements the following algorithm:
-    /// <i>Morphologie et recherche d'information</i>
+    /// <c>Morphologie et recherche d'information</c>
     /// Jacques Savoy.
     /// </para>
     /// </summary>
     public class GermanMinimalStemmer
     {
-
         public virtual int Stem(char[] s, int len)
         {
             if (len < 5)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilter.cs
index 025c674..7160e1c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilter.cs
@@ -23,16 +23,16 @@ namespace Lucene.Net.Analysis.De
 
     /// <summary>
     /// Normalizes German characters according to the heuristics
-    /// of the <a href="http://snowball.tartarus.org/algorithms/german2/stemmer.html">
-    /// German2 snowball algorithm</a>.
+    /// of the <c>http://snowball.tartarus.org/algorithms/german2/stemmer.html
+    /// German2 snowball algorithm</c>.
     /// It allows for the fact that ä, ö and ü are sometimes written as ae, oe and ue.
     /// <para>
-    /// <ul>
-    ///   <li> 'ß' is replaced by 'ss'
-    ///   <li> 'ä', 'ö', 'ü' are replaced by 'a', 'o', 'u', respectively.
-    ///   <li> 'ae' and 'oe' are replaced by 'a', and 'o', respectively.
-    ///   <li> 'ue' is replaced by 'u', when not following a vowel or q.
-    /// </ul>
+    /// <list>
+    ///     <item> 'ß' is replaced by 'ss'</item>
+    ///     <item> 'ä', 'ö', 'ü' are replaced by 'a', 'o', 'u', respectively.</item>
+    ///     <item> 'ae' and 'oe' are replaced by 'a', and 'o', respectively.</item>
+    ///     <item> 'ue' is replaced by 'u', when not following a vowel or q.</item>
+    /// </list>
     /// </para>
     /// <para>
     /// This is useful if you want this normalization without using

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilterFactory.cs
b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilterFactory.cs
index 85cd62d..5afe9be 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanNormalizationFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.De
     /// </summary>
     public class GermanNormalizationFilterFactory : TokenFilterFactory, IMultiTermAwareComponent
     {
-
         /// <summary>
-        /// Creates a new GermanNormalizationFilterFactory </summary>
+        /// Creates a new <see cref="GermanNormalizationFilterFactory"/> </summary>
         public GermanNormalizationFilterFactory(IDictionary<string, string> args) :
base(args)
         {
             if (args.Count > 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
index 542c6a7..cd4291c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
@@ -28,10 +28,10 @@ namespace Lucene.Net.Analysis.De
     /// </para>
     /// <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>
-    /// <seealso cref= SetKeywordMarkerFilter </seealso>
+    /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
     public sealed class GermanStemFilter : TokenFilter
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilterFactory.cs
index d182b4a..7176d90 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilterFactory.cs
@@ -33,10 +33,10 @@ namespace Lucene.Net.Analysis.De
     /// </summary>
     public class GermanStemFilterFactory : TokenFilterFactory
     {
-
         /// <summary>
-        /// Creates a new GermanStemFilterFactory </summary>
-        public GermanStemFilterFactory(IDictionary<string, string> args) : base(args)
+        /// Creates a new <see cref="GermanStemFilterFactory"/> </summary>
+        public GermanStemFilterFactory(IDictionary<string, string> args) 
+            : base(args)
         {
             if (args.Count > 0)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/217f113e/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemmer.cs
index 93a759e..99f2455 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemmer.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.De
     /// A stemmer for German words. 
     /// <para>
     /// The algorithm is based on the report
-    /// "A Fast and Simple Stemming Algorithm for German Words" by J&ouml;rg
+    /// "A Fast and Simple Stemming Algorithm for German Words" by Jörg
     /// Caumanns (joerg.caumanns at isst.fhg.de).
     /// </para>
     /// </summary>
@@ -38,17 +38,17 @@ namespace Lucene.Net.Analysis.De
         private StringBuilder sb = new StringBuilder();
 
         /// <summary>
-        /// Amount of characters that are removed with <tt>substitute()</tt>
while stemming.
+        /// Amount of characters that are removed with <see cref="Substitute"/> while
stemming.
         /// </summary>
         private int substCount = 0;
 
         private static readonly CultureInfo locale = new CultureInfo("de-DE");
 
         /// <summary>
-        /// Stemms the given term to an unique <tt>discriminator</tt>.
+        /// Stemms the given term to an unique <c>discriminator</c>.
         /// </summary>
         /// <param name="term">  The term that should be stemmed. </param>
-        /// <returns>      Discriminator for <tt>term</tt> </returns>
+        /// <returns>      Discriminator for <paramref name="term"/> </returns>
         protected internal virtual string Stem(string term)
         {
             // Use lowercase for medium stemming.
@@ -175,12 +175,14 @@ namespace Lucene.Net.Analysis.De
         /// <summary>
         /// Do some substitutions for the term to reduce overstemming:
         /// 
-        /// - Substitute Umlauts with their corresponding vowel: äöü -> aou,
-        ///   "ß" is substituted by "ss"
-        /// - Substitute a second char of a pair of equal characters with
-        ///   an asterisk: ?? -> ?*
-        /// - Substitute some common character combinations with a token:
-        ///   sch/ch/ei/ie/ig/st -> $/§/%/&/#/!
+        /// <list type="bullet">
+        /// <item>Substitute Umlauts with their corresponding vowel: äöü -> aou,
+        ///   "ß" is substituted by "ss"</item>
+        /// <item>Substitute a second char of a pair of equal characters with
+        ///   an asterisk: ?? -> ?*</item>
+        /// <item>Substitute some common character combinations with a token:
+        ///   sch/ch/ei/ie/ig/st -> $/§/%/&amp;/#/!</item>
+        /// </list>
         /// </summary>
         private void Substitute(StringBuilder buffer)
         {
@@ -257,7 +259,7 @@ namespace Lucene.Net.Analysis.De
         }
 
         /// <summary>
-        /// Undoes the changes made by substitute(). That are character pairs and
+        /// Undoes the changes made by <see cref="Substitute"/>. That are character
pairs and
         /// character combinations. Umlauts will remain as their corresponding vowel,
         /// as "ß" remains as "ss".
         /// </summary>


Mime
View raw message