lucenenet-commits mailing list archives

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

Branch: refs/heads/api-work
Commit: 7cf215b4b7b710b5d4e0e2ed001a0cccaaccfdc4
Parents: 69bd851
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Feb 4 16:12:13 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Feb 4 23:08:15 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Tr/ApostropheFilter.cs             |  5 ++---
 .../Analysis/Tr/ApostropheFilterFactory.cs      |  6 ++++--
 .../Analysis/Tr/TurkishAnalyzer.cs              | 13 +++++++------
 .../Analysis/Tr/TurkishLowerCaseFilter.cs       | 20 +++++++-------------
 .../Tr/TurkishLowerCaseFilterFactory.cs         |  6 +++---
 5 files changed, 23 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7cf215b4/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilter.cs
index a8343b8..6a93f68 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilter.cs
@@ -31,16 +31,15 @@ namespace Lucene.Net.Analysis.Tr
     /// </summary>
     public sealed class ApostropheFilter : TokenFilter
     {
-
         private readonly ICharTermAttribute termAtt;
 
         public ApostropheFilter(TokenStream @in)
-              : base(@in)
+            : base(@in)
         {
             termAtt = AddAttribute<ICharTermAttribute>();
         }
 
-        public override bool IncrementToken()
+        public override sealed bool IncrementToken()
         {
             if (!m_input.IncrementToken())
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7cf215b4/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilterFactory.cs
index 198c382..986f8ea 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/ApostropheFilterFactory.cs
@@ -33,8 +33,10 @@ namespace Lucene.Net.Analysis.Tr
     /// </summary>
     public class ApostropheFilterFactory : TokenFilterFactory
     {
-
-        public ApostropheFilterFactory(IDictionary<string, string> args) : base(args)
+        /// <summary>
+        /// Creates a new <see cref="ApostropheFilterFactory"/> </summary>
+        public ApostropheFilterFactory(IDictionary<string, string> args) 
+            : base(args)
         {
             if (args.Count > 0)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7cf215b4/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
index 93f08c4..17b7a2a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishAnalyzer.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Analysis.Tr
         }
 
         /// <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
@@ -84,10 +84,10 @@ namespace Lucene.Net.Analysis.Tr
         }
 
         /// <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 TurkishAnalyzer(LuceneVersion matchVersion)
-              : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
+            : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
         {
         }
 
@@ -97,7 +97,7 @@ namespace Lucene.Net.Analysis.Tr
         /// <param name="matchVersion"> lucene compatibility version </param>
         /// <param name="stopwords"> a stopword set </param>
         public TurkishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
-              : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+            : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
         {
         }
 
@@ -109,7 +109,8 @@ namespace Lucene.Net.Analysis.Tr
         /// <param name="matchVersion"> lucene compatibility version </param>
         /// <param name="stopwords"> a stopword set </param>
         /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
-        public TurkishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet
stemExclusionSet) : base(matchVersion, stopwords)
+        public TurkishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet
stemExclusionSet) 
+            : base(matchVersion, stopwords)
         {
             this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion,
stemExclusionSet));
         }
@@ -117,7 +118,7 @@ namespace Lucene.Net.Analysis.Tr
         /// <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"/>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7cf215b4/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilter.cs
index 1a47a89..644a4b9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilter.cs
@@ -39,29 +39,23 @@ namespace Lucene.Net.Analysis.Tr
         private const int LATIN_SMALL_LETTER_I = '\u0069';
         private const int LATIN_SMALL_LETTER_DOTLESS_I = '\u0131';
         private const int COMBINING_DOT_ABOVE = '\u0307';
-
         private readonly ICharTermAttribute termAtt;
 
         /// <summary>
-        /// Create a new TurkishLowerCaseFilter, that normalizes Turkish token text 
+        /// Create a new <see cref="TurkishLowerCaseFilter"/>, that normalizes Turkish
token text 
         /// to lower case.
         /// </summary>
-        /// <param name="in"> TokenStream to filter </param>
+        /// <param name="in"> <see cref="TokenStream"/> to filter </param>
         public TurkishLowerCaseFilter(TokenStream @in)
-              : base(@in)
+            : base(@in)
         {
             termAtt = AddAttribute<ICharTermAttribute>();
         }
 
-        public override bool IncrementToken()
+        public override sealed bool IncrementToken()
         {
             bool iOrAfter = false;
-            var cultureInfo = new CultureInfo("tr");
-#if NET451
-            Thread.CurrentThread.CurrentUICulture = cultureInfo;
-#else
-            CultureInfo.CurrentUICulture = cultureInfo;
-#endif
+
             if (m_input.IncrementToken())
             {
                 char[] buffer = termAtt.Buffer;
@@ -99,7 +93,7 @@ namespace Lucene.Net.Analysis.Tr
                         }
                     }
 
-                    using (var culture = new CultureContext("tr-TR"))
+                    using (var culture = new CultureContext("tr"))
                     {
                         switch (ch)
                         {
@@ -162,7 +156,7 @@ namespace Lucene.Net.Analysis.Tr
 
         /// <summary>
         /// delete a character in-place.
-        /// rarely happens, only if COMBINING_DOT_ABOVE is found after an i
+        /// rarely happens, only if <see cref="COMBINING_DOT_ABOVE"/> is found after
an i
         /// </summary>
         private int Delete(char[] s, int pos, int len)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7cf215b4/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilterFactory.cs
index 486b2c0..25fcd6e 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Tr/TurkishLowerCaseFilterFactory.cs
@@ -32,10 +32,10 @@ namespace Lucene.Net.Analysis.Tr
     /// </summary>
     public class TurkishLowerCaseFilterFactory : TokenFilterFactory, IMultiTermAwareComponent
     {
-
         /// <summary>
-        /// Creates a new TurkishLowerCaseFilterFactory </summary>
-        public TurkishLowerCaseFilterFactory(IDictionary<string, string> args) : base(args)
+        /// Creates a new <see cref="TurkishLowerCaseFilterFactory"/> </summary>
+        public TurkishLowerCaseFilterFactory(IDictionary<string, string> args) 
+            : base(args)
         {
             if (args.Count > 0)
             {


Mime
View raw message