lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [25/28] lucenenet git commit: Lucene.Net.Analysis.Stempel.Egothor.Stemmer.MultiTrie: renamed protected field tries > m_tries
Date Wed, 01 Feb 2017 10:22:22 GMT
Lucene.Net.Analysis.Stempel.Egothor.Stemmer.MultiTrie: renamed protected field tries > m_tries


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

Branch: refs/heads/api-work
Commit: 87f05e955a2be2a5b8a379246f36e51032e634eb
Parents: 2eef6df
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 1 17:06:27 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 1 17:06:27 2017 +0700

----------------------------------------------------------------------
 .../Egothor.Stemmer/MultiTrie.cs                | 34 ++++++++++----------
 .../Egothor.Stemmer/MultiTrie2.cs               | 32 +++++++++---------
 2 files changed, 33 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/87f05e95/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
index 7bdad8f..d8a3282 100644
--- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
@@ -70,7 +70,7 @@ namespace Egothor.Stemmer
         internal static char EOM = '*';
         internal static string EOM_NODE = "" + EOM;
 
-        protected List<Trie> tries = new List<Trie>();
+        protected List<Trie> m_tries = new List<Trie>();
 
         int BY = 1;
 
@@ -86,7 +86,7 @@ namespace Egothor.Stemmer
             BY = @is.ReadInt();
             for (int i = @is.ReadInt(); i > 0; i--)
             {
-                tries.Add(new Trie(@is));
+                m_tries.Add(new Trie(@is));
             }
         }
 
@@ -106,10 +106,10 @@ namespace Egothor.Stemmer
         /// <returns>the element</returns>
         public override string GetFully(string key)
         {
-            StringBuilder result = new StringBuilder(tries.Count * 2);
-            for (int i = 0; i < tries.Count; i++)
+            StringBuilder result = new StringBuilder(m_tries.Count * 2);
+            for (int i = 0; i < m_tries.Count; i++)
             {
-                string r = tries[i].GetFully(key);
+                string r = m_tries[i].GetFully(key);
                 if (r == null || (r.Length == 1 && r[0] == EOM))
                 {
                     return result.ToString();
@@ -127,10 +127,10 @@ namespace Egothor.Stemmer
         /// <returns>the element that is stored as last on a path</returns>
         public override string GetLastOnPath(string key)
         {
-            StringBuilder result = new StringBuilder(tries.Count * 2);
-            for (int i = 0; i < tries.Count; i++)
+            StringBuilder result = new StringBuilder(m_tries.Count * 2);
+            for (int i = 0; i < m_tries.Count; i++)
             {
-                string r = tries[i].GetLastOnPath(key);
+                string r = m_tries[i].GetLastOnPath(key);
                 if (r == null || (r.Length == 1 && r[0] == EOM))
                 {
                     return result.ToString();
@@ -149,8 +149,8 @@ namespace Egothor.Stemmer
         {
             os.WriteBoolean(forward);
             os.WriteInt(BY);
-            os.WriteInt(tries.Count);
-            foreach (Trie trie in tries)
+            os.WriteInt(m_tries.Count);
+            foreach (Trie trie in m_tries)
                 trie.Store(os);
         }
 
@@ -171,15 +171,15 @@ namespace Egothor.Stemmer
                 return;
             }
             int levels = cmd.Length / BY;
-            while (levels >= tries.Count)
+            while (levels >= m_tries.Count)
             {
-                tries.Add(new Trie(forward));
+                m_tries.Add(new Trie(forward));
             }
             for (int i = 0; i < levels; i++)
             {
-                tries[i].Add(key, cmd.Substring(BY * i, BY));
+                m_tries[i].Add(key, cmd.Substring(BY * i, BY));
             }
-            tries[levels].Add(key, EOM_NODE);
+            m_tries[levels].Add(key, EOM_NODE);
         }
 
         /// <summary>
@@ -190,11 +190,11 @@ namespace Egothor.Stemmer
         public override Trie Reduce(Reduce by)
         {
             List<Trie> h = new List<Trie>();
-            foreach (Trie trie in tries)
+            foreach (Trie trie in m_tries)
                 h.Add(trie.Reduce(by));
 
             MultiTrie m = new MultiTrie(forward);
-            m.tries = h;
+            m.m_tries = h;
             return m;
         }
 
@@ -206,7 +206,7 @@ namespace Egothor.Stemmer
         public override void PrintInfo(TextWriter @out, string prefix)
         {
             int c = 0;
-            foreach (Trie trie in tries)
+            foreach (Trie trie in m_tries)
                 trie.PrintInfo(@out, prefix + "[" + (++c) + "] ");
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/87f05e95/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
index 9db6b92..cc6dbed 100644
--- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie2.cs
@@ -96,15 +96,15 @@ namespace Egothor.Stemmer
         /// <returns>the element</returns>
         public override string GetFully(string key)
         {
-            StringBuilder result = new StringBuilder(tries.Count * 2);
+            StringBuilder result = new StringBuilder(m_tries.Count * 2);
             try
             {
                 string lastkey = key;
-                string[] p = new string[tries.Count];
+                string[] p = new string[m_tries.Count];
                 char lastch = ' ';
-                for (int i = 0; i < tries.Count; i++)
+                for (int i = 0; i < m_tries.Count; i++)
                 {
-                    string r = tries[i].GetFully(lastkey);
+                    string r = m_tries[i].GetFully(lastkey);
                     if (r == null || (r.Length == 1 && r[0] == EOM))
                     {
                         return result.ToString();
@@ -153,15 +153,15 @@ namespace Egothor.Stemmer
         /// <returns>the element that is stored as last on a path</returns>
         public override string GetLastOnPath(string key)
         {
-            StringBuilder result = new StringBuilder(tries.Count * 2);
+            StringBuilder result = new StringBuilder(m_tries.Count * 2);
             try
             {
                 string lastkey = key;
-                string[] p = new string[tries.Count];
+                string[] p = new string[m_tries.Count];
                 char lastch = ' ';
-                for (int i = 0; i < tries.Count; i++)
+                for (int i = 0; i < m_tries.Count; i++)
                 {
-                    string r = tries[i].GetLastOnPath(lastkey);
+                    string r = m_tries[i].GetLastOnPath(lastkey);
                     if (r == null || (r.Length == 1 && r[0] == EOM))
                     {
                         return result.ToString();
@@ -233,21 +233,21 @@ namespace Egothor.Stemmer
             string[] p = Decompose(cmd);
             int levels = p.Length;
             // System.err.println("levels "+key+" cmd "+cmd+"|"+levels);
-            while (levels >= tries.Count)
+            while (levels >= m_tries.Count)
             {
-                tries.Add(new Trie(forward));
+                m_tries.Add(new Trie(forward));
             }
             string lastkey = key;
             for (int i = 0; i < levels; i++)
             {
                 if (key.Length > 0)
                 {
-                    tries[i].Add(key, p[i]);
+                    m_tries[i].Add(key, p[i]);
                     lastkey = key;
                 }
                 else
                 {
-                    tries[i].Add(lastkey, p[i]);
+                    m_tries[i].Add(lastkey, p[i]);
                 }
                 // System.err.println("-"+key+" "+p[i]+"|"+key.length());
                 /*
@@ -277,11 +277,11 @@ namespace Egothor.Stemmer
             }
             if (key.Length > 0)
             {
-                tries[levels].Add(key, EOM_NODE);
+                m_tries[levels].Add(key, EOM_NODE);
             }
             else
             {
-                tries[levels].Add(lastkey, EOM_NODE);
+                m_tries[levels].Add(lastkey, EOM_NODE);
             }
         }
 
@@ -338,11 +338,11 @@ namespace Egothor.Stemmer
         public override Trie Reduce(Reduce by)
         {
             List<Trie> h = new List<Trie>();
-            foreach (Trie trie in tries)
+            foreach (Trie trie in m_tries)
                 h.Add(trie.Reduce(by));
 
             MultiTrie2 m = new MultiTrie2(forward);
-            m.tries = h;
+            m.m_tries = h;
             return m;
         }
 


Mime
View raw message