Hunspell integration error

408 views Asked by At

I have been trying to integrate the NHunspell spell checker API into a unity project that I am currently working on. I have been able to set it up correctly using the code:

void Start()
{
      using (Hunspell hunspell = new Hunspell("Assets/Dictionaries/en_GB-oed.aff", "Assets/Dictionaries/en_GB-oed.dic"))
      {
            bool correct = hunspell.Spell("Recommendation");
            Debug.Log("Recommendation is spelled " + (correct ? "correct" : "not     correct"));
      }
} 

but when I press play, I get the following error:

NHunspell Unity Error

The files were downloaded from the Nhunspell website and are in the correct directory location:

AFF/DIC File Location

I understand that the error is caused because it believes the aff file to be null but it isn't. I haven't been able to find anyone with the same problem online and other examples using NHunspell seem to work without any problems using the same code. wherever I put the files in the directory the same error occurs.

If anyone can help me with this, It would be much appreciated.

0

There are 0 answers