Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

463
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda