根据我的测试,您可以aff & .dic files
从以下链接下载:
en_US.aff
en_US.dic
点击点击后,我们应该右键保存为txt文件。
然后,我们需要移动 .txt 以将其更改为扩展名 .aff 或 .dic。
最后,我们将这两个文件移动到project\bin\debug
文件夹中。
这是我的测试代码和结果:
Hunspell hunspell = new Hunspell("en_US.aff", "en_US.dic");
Console.WriteLine("Hunspell - Spell Checking Functions");
Console.WriteLine("¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯");
Console.WriteLine("Check if the word 'Recommendation' is spelled correct");
bool correct = hunspell.Spell("Recommendation");
Console.WriteLine("Recommendation is spelled " +
(correct ? "correct" : "not correct"));
Console.WriteLine("");
Console.WriteLine("Make suggestions for the word 'Recommendatio'");
List<string> suggestions = hunspell.Suggest("Recommendatio");
Console.WriteLine("There are " +
suggestions.Count.ToString() + " suggestions");
foreach (string suggestion in suggestions)
{
Console.WriteLine("Suggestion is: " + suggestion);
}
结果: