Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hunspell lib. is not resulting like winword.

I have given input as "Pon" (Pond) but the result is not like winword ("Pun,Pond,Pony,Pan,Pen"). The "Pen,Pan" words are matching and the remaining all quite different (Po,On,Poe,Pen,Eon,Son,Ion,Pan,Non,Ton,Pol,Con,Don,Hon,Yon). Please have a look and update me.

C#
Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic");  
List<string> suggestions = hunspell.Suggest("Pon");       

listBoxSuggestions.Items.Clear();

foreach (string suggestion in suggestions)
{
    listBoxSuggestions.Items.Add(suggestion);
}
Posted
Comments
CHill60 12-Dec-12 18:48pm    
It's a different spell checker ... it doesn't have to produce the same suggestions as winword. What's the problem?
sonj 13-Dec-12 1:21am    
The result we expect "Pond" but it is not return that.
CHill60 13-Dec-12 4:41am    
Well your code seems alright - It may be your .aff or .dic file ... check that they are not corrupt and are genuinely the us english versions
sonj 13-Dec-12 6:19am    
Thanks for your reply. We have downloaded en_us.aff, en_us.dic from internet ( could not remember which site) and the date stamp is 12/6/2012 so it seems latest version.
CHill60 13-Dec-12 6:39am    
I'm afraid I'm not much help to you from this point - at least if someone else can pick it up they know you've checked the files.
In the meantime if you search CodeProject there are quite a few articles regarding hunspell so you might be able to pick up a clue from them - or post a question to the authors.
Good Luck

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900