Commits

Nerzhul500  committed ee612b0

...

  • Participants
  • Parent commits d0b295e
  • Branches spellengine_refactoring

Comments (0)

Files changed (2)

File ReSpeller/SpellEngine/IWordSuggestor.cs

 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
-using ReSpeller.SpellEngine.Dictionaries;
 
 namespace ReSpeller.SpellEngine
 {
   {
     List<string> Suggest(string word);
   }
-
-  class SingleDictionarySuggestor : IWordSuggestor
-  {
-    private readonly ILanguageDictionary myDictionary;
-
-    public SingleDictionarySuggestor(ILanguageDictionary dictionary)
-    {
-      myDictionary = dictionary;
-    }
-
-    public List<string> Suggest(string word)
-    {
-      List<string> result = myDictionary.Suggests(word)
-          .Where(s => s.ToLower() != word.ToLower()) // filter suggests not equals original word
-          .Select(s => NamingStyleConverter.Convert(s, word)).ToList(); // convert style
-      return result.Any() ? result.ToList() : new List<string> { word };
-    }
-  }
 }

File ReSpeller/SpellEngine/SingleDictionarySuggestor.cs

+using System.Collections.Generic;
+using System.Linq;
+using ReSpeller.SpellEngine.Dictionaries;
+
+namespace ReSpeller.SpellEngine
+{
+    public class SingleDictionarySuggestor : IWordSuggestor
+    {
+        private readonly ILanguageDictionary myDictionary;
+
+        public SingleDictionarySuggestor(ILanguageDictionary dictionary)
+        {
+            myDictionary = dictionary;
+        }
+
+        public List<string> Suggest(string word)
+        {
+            List<string> result = myDictionary.Suggests(word)
+                .Where(s => s.ToLower() != word.ToLower()) // filter suggests not equals original word
+                .Select(s => NamingStyleConverter.Convert(s, word)).ToList(); // convert style
+            return result.Any() ? result.ToList() : new List<string> { word };
+        }
+    }
+}