Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to check English grammar in C# form application.
Posted
Comments
Sergey Alexandrovich Kryukov 21-Jan-11 15:23pm    
Useful question - my 5

Hi,

here is a link that describes a solution. Although the code is in VB.NET, you might get enough information to rewrite the code in C#:
http://devcity.net/Articles/89/1/spellcheck.aspx[^]
 
Share this answer
 
Comments
Espen Harlinn 21-Jan-11 5:26am    
Nice one (5+)
Sergey Alexandrovich Kryukov 21-Jan-11 15:25pm    
Ah, through Word... All right, my 5.
I wondered if Microsoft ship at least spell checking for English with OS, other languages with language packs -- stand-along...
Sergey Alexandrovich Kryukov 21-Jan-11 15:29pm    
Anyway, I suggested some Open Source resources, how about that?
Look here for Open Source:

http://www.thefreecountry.com/sourcecode/spellcheckers.shtml[^].

Also here:
http://www.thefreecountry.com/utilities/free-spell-checkers.shtml[^]

Also Google something like that:

open source spell checker windows


This days, Open Source collected more resources, you have some good options for development.
 
Share this answer
 
Comments
JF2015 22-Jan-11 7:30am    
Great find - didn't see these results. 5!
You've picked a tough subject! Spell checking is a trivial exercise that has been done over and over again, but I've never heard of an effective, accurate grammar checking tool for the English language. Most native speakers do it badly, and their writing is far worse - it's a very complex language. The rules of English grammar are complex and many, and there are a lot of exceptions that have fallen into general usage of the years.

I would attack this with a rule-based inference engine, and populate the rule base with the help of someone truly expert in the formal language. In fact, I would preprocess the input with a diction checker built on similar functionality, to cull out the many misused words that most people think are correct. This would have to analyze word groups to attempt to ferret out the intent of the writer and resolve errors of usage - their, there, they're; its, it's; too, to, two - and so on.

Your engine would have to add a learning function, as well, to accomodate new additions to its rule base as new situations are encountered. It's a nasty problem, but one that needs to be solved by someone. That someone might well be you! :-D
 
Share this answer
 
There is a wealth of articles, here in CP. Take a look[^]
 
Share this answer
 

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