Exception in NHunspell
Posted
by Nikhil K
on Stack Overflow
See other posts from Stack Overflow
or by Nikhil K
Published on 2010-04-27T04:18:33Z
Indexed on
2010/04/27
4:23 UTC
Read the original article
Hit count: 299
ASP.NET
I have used the following code for spelling checking.While i am running that i am getting an exception--"
The code is:
using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic")) { bool correct = hunspell.Spell("Recommendation"); var suggestions = hunspell.Suggest("Recommendatio"); foreach (string suggestion in suggestions) { Console.WriteLine("Suggestion is: " + suggestion); } }
// Hyphen
using (Hyphen hyphen = new Hyphen("hyph_en_us.dic"))
{
var hyphenated = hyphen.Hyphenate("Recommendation");
}
using (MyThes thes = new MyThes("th_en_us_new.idx", "th_en_us_new.dat")) { using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic")) { ThesResult tr = thes.Lookup("cars", hunspell); foreach (ThesMeaning meaning in tr.Meanings) { Console.WriteLine(" Meaning: " + meaning.Description); foreach (string synonym in meaning.Synonyms) { Console.WriteLine(" Synonym: " + synonym);
} } }
© Stack Overflow or respective owner