lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [25/39] lucenenet git commit: Lucene.Net.Analysis.Miscellaneous.WordDelimiterIterator refactor: SingleWord > IsSingleWord() (performs conversion)
Date Sat, 04 Feb 2017 20:32:44 GMT
Lucene.Net.Analysis.Miscellaneous.WordDelimiterIterator refactor: SingleWord > IsSingleWord()
(performs conversion)


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3031be6c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3031be6c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3031be6c

Branch: refs/heads/api-work
Commit: 3031be6c1abfa6f1321eeb23e436ecd11e98dd11
Parents: de106d9
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Feb 5 01:01:01 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Feb 5 01:01:01 2017 +0700

----------------------------------------------------------------------
 .../Miscellaneous/Lucene47WordDelimiterFilter.cs |  2 +-
 .../Miscellaneous/WordDelimiterFilter.cs         |  2 +-
 .../Miscellaneous/WordDelimiterIterator.cs       | 19 ++++++++-----------
 3 files changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3031be6c/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs
index 070ad85..7db0cd5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs
@@ -256,7 +256,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
                 }
 
                 // word surrounded by delimiters: always output
-                if (iterator.SingleWord)
+                if (iterator.IsSingleWord())
                 {
                     GeneratePart(true);
                     iterator.Next();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3031be6c/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterFilter.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterFilter.cs
index c3cc5a5..298d3db 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterFilter.cs
@@ -338,7 +338,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
                 }
 
                 // word surrounded by delimiters: always output
-                if (iterator.SingleWord)
+                if (iterator.IsSingleWord())
                 {
                     GeneratePart(true);
                     iterator.Next();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3031be6c/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterIterator.cs
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterIterator.cs
index ee19be7..cc7ff94 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterIterator.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/WordDelimiterIterator.cs
@@ -174,7 +174,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
         /// This currently uses the type of the first character in the subword.
         /// </summary>
         /// <returns> type of the current word </returns>
-        internal int Type // LUCENENET TODO: Change to GetType()
+        internal int Type
         {
             get
             {
@@ -248,18 +248,15 @@ namespace Lucene.Net.Analysis.Miscellaneous
         /// Determines if the current word contains only one subword.  Note, it could be
potentially surrounded by delimiters
         /// </summary>
         /// <returns> <c>true</c> if the current word contains only one
subword, <c>false</c> otherwise </returns>
-        internal bool SingleWord // LUCENENET TODO: Change to IsSingleWord()
+        internal bool IsSingleWord() 
         {
-            get
+            if (hasFinalPossessive)
             {
-                if (hasFinalPossessive)
-                {
-                    return current == startBounds && end == endBounds - 2;
-                }
-                else
-                {
-                    return current == startBounds && end == endBounds;
-                }
+                return current == startBounds && end == endBounds - 2;
+            }
+            else
+            {
+                return current == startBounds && end == endBounds;
             }
         }
 


Mime
View raw message