Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

461
Views
How to install Hunspell for C# application?

I want to implement spell check and dictionary in my C# windows-based application. From Google, I found that hunspell is one of the best options to implement this functionality. I have installed nhunspell using visual studio NuGet as per the suggestion from the below URL. But when I try to execute the code, getting error "AFF File not found: C:\TestProject\TestHunshell\bin\Debug\en_us.aff"

When I search the installed hunspell package .aff & .dic files are not found. I am not sure from where I can download and install or paste "en_us.aff", "en_us.dic" files to my solution.

Can someone please suggest the proper way to install and implement hunspell in the C# windows application?

Code Project Reference URL

Error

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Based on my test, you could download aff & .dic files from the following link:

en_US.aff

en_US.dic

After clicking on the click, we should right-click to save as a txt file.

Then, we need to move the .txt to change it to the extension .aff or .dic.

Finally, we move the two files to the project\bin\debug folder.

Here is my test code and result:

    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);
    }

Result:

enter image description here

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!