Exemple #1
0
        /// <summary>
        ///     Gets list of words from dictionary for the misspelled word.
        /// </summary>
        /// <param name="word">Misspelled word.</param>
        /// <created>art2m,5/10/2019</created>
        /// <changed>art2m,5/10/2019</changed>
        public static void CheckDictionary(string word)
        {
            var sugWords = new SuggestedWordsCollection();

            List <string> suggestions;

            using (var hunspell = new Hunspell("en_us.aff", "en_us.dic"))
            {
                suggestions = hunspell.Suggest(word);
            }

            foreach (var item in suggestions)
            {
                sugWords.AddItem(item);
            }
        }