Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

460
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda