lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [29/50] [abbrv] lucenenet git commit: Removed TODO about ToLower() culture in Suggest.Spell.DirectSpellChecker. In this case it is best to get the culture from the current thread so the user can override if necessary.
Date Sun, 02 Oct 2016 14:35:47 GMT
Removed TODO about ToLower() culture in Suggest.Spell.DirectSpellChecker. In this case it is
best to get the culture from the current thread so the user can override if necessary.


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

Branch: refs/heads/master
Commit: cbf66f7522c180202c423b53b865307f5e0231ac
Parents: acce365
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Sep 18 20:29:02 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Oct 2 17:44:49 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cbf66f75/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs b/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
index 1835909..38a7fae 100644
--- a/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
+++ b/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
@@ -352,7 +352,8 @@ namespace Lucene.Net.Search.Spell
         /// <param name="accuracy"> return only suggested words that match with this
similarity </param>
         /// <returns> sorted list of the suggested words according to the comparator
</returns>
         /// <exception cref="System.IO.IOException"> If there is a low-level I/O error.
</exception>
-        public virtual SuggestWord[] SuggestSimilar(Term term, int numSug, IndexReader ir,
SuggestMode suggestMode, float accuracy)
+        public virtual SuggestWord[] SuggestSimilar(Term term, int numSug, IndexReader ir,

+            SuggestMode suggestMode, float accuracy)
         {
             CharsRef spare = new CharsRef();
             string text = term.Text();
@@ -363,7 +364,7 @@ namespace Lucene.Net.Search.Spell
 
             if (lowerCaseTerms)
             {
-                term = new Term(term.Field, text.ToLower()); // LUCENENET TODO: Culture -
from the current thread? Or perhaps another overload where it can be passed?
+                term = new Term(term.Field, text.ToLower());
             }
 
             int docfreq = ir.DocFreq(term);
@@ -451,7 +452,8 @@ namespace Lucene.Net.Search.Spell
         /// <param name="spare"> a chars scratch </param>
         /// <returns> a collection of spelling corrections sorted by <code>ScoreTerm</code>'s
natural order. </returns>
         /// <exception cref="System.IO.IOException"> If I/O related errors occur </exception>
-        protected internal virtual IEnumerable<ScoreTerm> SuggestSimilar(Term term,
int numSug, IndexReader ir, int docfreq, int editDistance, float accuracy, CharsRef spare)
+        protected internal virtual IEnumerable<ScoreTerm> SuggestSimilar(Term term,
int numSug, IndexReader ir, 
+            int docfreq, int editDistance, float accuracy, CharsRef spare)
         {
 
             var atts = new AttributeSource();


Mime
View raw message