private static SpellChecker CreateSpellChecker(string dictionaryFile) { var spellChecker = new SpellChecker(dictionaryFile); foreach (var word in dictionary) { var tokens = word.Split(':'); if (tokens.Length == 1) { spellChecker.AddWord(tokens[0]); } else { spellChecker.AddWord(tokens[0], tokens[1]); } } return(spellChecker); }