Spell Checking in VB.NET

Hi,

I have an application where a user types text into a TextBox, ranging anywhere from a simple sentence to a full page of text. Usuallly its a few paragraphs equalling about half a page. In any event, I would like to provide the user with the ability to "spell check" what they've typed rather than just saving the text into their database verbatim.

Is there a way to provide this type of functionality with Visual Studios 2005 (Visual Basics.NET)?

Thanks,
FDT
 
Mr_FulanoAsked:
Who is Participating?
 
Bob LearnedCommented:
Do you know anything about Soundex or Metaphone?

How to write a spellchecker
http://author.handalak.com/archives/042003/000078

Bob
0
 
Bob LearnedCommented:
There isn't a native class that provides this functionality in the .NET framework, so you would have to find a 3rd party component.

Bob
0
 
Éric MoreauSenior .Net ConsultantCommented:
see ultimate spell at http://www.karamasoft.com/
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Mr_FulanoAuthor Commented:
Thanks for the feedback.  UltimateSpell seems to be a really cool application for $249.00. However, I think its for ASP.NET only.  I'm developing a regular EXE that will not be web based.

I assume building a simple (...very simple) spell checker is nothing more than building a Do While loop that goes through the text word-by-word and compares each word it finds to a list.  So, if I decided to build my own spell checker, where could I find a dictionary list of words for free?

Has anyone tried to build a (simple) spell checker and can provide some tips?

Thanks,
FDT

0
 
Mr_FulanoAuthor Commented:
Gentlemen, I found a list of words that will work as a dictionary list.  

Could you please offer some help on how to design the spell checker code?  A simple example to get me started would be great.  My thoughts are that I would be searching a "Textbox" one word at a time and comparing that word (which I would put in a String variable) to my list of dictionary words. If the word is spelled correctly it would continue. If the word is spelled incorrectly (i.e no exact match found), it would give the user a list of "close choices".  

How would you work the logic for "close choices"?

Say I misspelled the word drive by typing "dribe"  I'd like the close choices to be
...drive, driver, driving...etc (or something logical).  How would my code know that the user means "drive", so that it could give the user those choices and not ...dryer, draw, drawing, drinking, etc?

Thanks,
FDT
0
 
Bob LearnedCommented:
There are reasons why I don't try to create a spell checker--everyone has.

Call Word to spell check from Visual Basic .NET
http://www.vb-helper.com/howto_net_spellcheck.html

Bob
0
 
Mr_FulanoAuthor Commented:
Hi TheLearnedOne,

I agree with your position that adding a reference to say "Microsoft Word 11.0 Object Library" (or whatever version one has) is by far a better choice. However, lets assume a situation where the user does not have Microsoft Office loaded on the computer running my application (which in my case may be a possibility). If I added the reference and my application could not find Microsoft Office on their machine, my application would crash (or in the very least, not perform the spell checking procedure). -- Unless that is, that I'm misunderstanding how references work and once a reference is added it does not need the actual application to work, which I don't believe to be the case (I may be wrong).  

Therefore, that's the reason I'd like to create my own simple version. I know its not a trivial matter and that's why I'm seeking guidance. I also know its not the most advisable choice, given that a "reference" to a COM library is by far easier and more efficient, but I'm between the proverbial rock and a hard place given that I cannot assume my users will all have MS Office (as common as it is).

If you can point me to a generic example of a non-ASP spell checker that I can get some ideas, I'd greatly appreciate it. As you stated, everyone has at one time or another tried to create a spell checker, I simply need a sample of one that I can use to check spelling inside a textbox.

Thanks for you continued support!
FDT
0
 
Bob LearnedCommented:
You could try NetSpell:

NetSpell - .net Spell Checker
http://sourceforge.net/projects/netspell/

NetSpell is a free spell checking engine for the .net framework.

Bob
0
 
Mr_FulanoAuthor Commented:
Hi TLO, first and foremost, thank you for taking the time to find me a free SpellChecker. I appreciate your the effort and in looking at their web site, I learned a little about how these applications are designed.

However, let me share with you some of my thoughts on this...I'm interested in writing my own SpellChecker for a couple of reasons, one of them being that I want to learn from the experience. If I just copy some code, I learned very little or nothing at all.

Whenever I take on a project, as small or as large as it may be, I always try to learn why things didn't work or why they actually do and I always try to learn from my mistakes -- and I'm sure a SpellChecker will do wonders for that concept.

Throughout the time I've been a member here, I've learned an enormous amount, and although I'm not a master programmer like you, FernandoSoto,   IdleMind, or some of the others, but I have come a long way by trying to study other persons coding styles.

As for the SpellChecker -- I have a rough draft of what my methodology might be and I'm going to at least try. It may be an average outcome, or maybe it won't work at all, but I can guarantee you one thing... I will learn at least one programming technique from the process.

Having said that, I thank you for your contribution and believe it or not, I did pick up a couple of tips from the NetSpell website.

Thanks again,
Fulano

0
 
Mr_FulanoAuthor Commented:
Hi Bob,

Thanks for the info. As you can see, I just learned something new....man I love this programming stuff...LOL.

The info you provided gave me some ideas. I'm going to try them out and see how far I get. Thanks again.

I increased the points to 500 (Max) and split them 400/100 between you (400) and emoreous (100), as he did try to help.

Thanks again,
Fulano.

BTW, what ever happend to your attempt at a spell checker?
0
 
Bob LearnedCommented:
>>BTW, what ever happend to your attempt at a spell checker?
I never have tried.

Bob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.