C# 不能';在我们的C语言库中找不到有关创建单词拼写检查的信息#

C# 不能';在我们的C语言库中找不到有关创建单词拼写检查的信息#,c#,spelling,C#,Spelling,我找不到任何关于创建拼写检查器的信息,该检查器从.txt文件中读取单词 如果你能帮忙,我会很高兴的。要解决你的问题,你可以使用图书馆 本例中的检查方法非常简单,如下所示: bool CheckSpell(string word) { using (Hunspell hunspell = new Hunspell("en_GB.aff", "en_GB.dic")) { return hunspell.Spell(

我找不到任何关于创建拼写检查器的信息,该检查器从.txt文件中读取单词


如果你能帮忙,我会很高兴的。

要解决你的问题,你可以使用图书馆

本例中的检查方法非常简单,如下所示:

 bool CheckSpell(string word)
    {         
        using (Hunspell hunspell = new Hunspell("en_GB.aff", "en_GB.dic"))
        {
            return hunspell.Spell(word);               
        }
    }
你可以在网上找到字典

您还可以使用类:


可能重复thnx for info,但我想创建自己的库如果实现此代码示例,创建库dll很简单。此链接是拼写检查和更正的第三个解决方案。
bool CheckSpell(string word)
{
    TextBox tb = new TextBox();
    tb.Text = word;
    tb.SpellCheck.IsEnabled = true;

    int index = tb.GetNextSpellingErrorCharacterIndex(0, LogicalDirection.Forward);
    if (index == -1)
        return true;
    else
        return false;
}