Exemplo n.º 1
0
        public List <string> CheckWord(string word)
        {
            string soundex    = Soundex.GetSoundex(word);
            var    closeWords = WordSoundexes[word];

            if (closeWords.Count == 0)
            {
                return(default);
Exemplo n.º 2
0
 public void AddCollectionToDictionary(IEnumerable <string> x)
 {
     WordSoundexes = new Dictionary <string, List <string> >();
     foreach (var word in x)
     {
         if (word.All(char.IsLetter))
         {
             var soundex = Soundex.GetSoundex(word);
             if (!WordSoundexes.ContainsKey(soundex))
             {
                 WordSoundexes.Add(soundex, new List <string>());
             }
             WordSoundexes[soundex].Add(word);
         }
     }
 }