Articles → .NET → Spell checker using Hunspell C#

Spell checker using Hunspell C#






Getting components




ComponentURL
Hunspell DLLs (Hunspellx64.dll, Hunspellx86.dll and Hunspell.dll)http://download.crawler-lib.net/
en_US.affhttp://sourceforge.net/p/nhunspell/code/ci/default/tree/NHunspellSamples/CSharpConsoleSamples/en_US.aff
en_US.dichttp://sourceforge.net/p/nhunspell/code/ci/default/tree/NHunspellSamples/CSharpConsoleSamples/en_US.dic









Hunspell methods









Sample application




using System;
using System.Collections.Generic;
using NHunspell;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        using (Hunspell hunspell = new Hunspell("en_us.aff", "en_US.dic"))
        {
            bool result = hunspell.Spell("table");

            List<string> suggestions = hunspell.Suggest("intance");
        }
    }
}





Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, June 01, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250