Important alert: (current site time 7/16/2013 2:41:21 AM EDT)
 

winzip icon

FINAL UPDATE!!! The Last Word in Spell Checkers AND NOW ..The Penultimate Dictionary

Email
Submitted on: 10/31/2005 9:46:27 PM
By: Steppenwolfe 
Level: Intermediate
User Rating: By 56 Users
Compatibility: VB 5.0, VB 6.0
Views: 26528
author picture
(About the author)
 
     I searched online, and downloaded every spell checker I could find.. Most of them hooked into M$ Office libraries, and were not suitable for a finished product, the others were just too slow or inaccurate to be usefull.. So, I took the best ideas from the projects I did see, and made this.. The Ultimate Spell Checker!! Check it out.. Context menu suggestion and replacement options, suggestions returned with configurable tolerance filters, and sorted ascending/descending by relevance, (matches profiled with api driven routine), - api compression, three different dictionaries, and even with the largest, (270,000 entries!), search returns, and suggestion queries are near instantaneous! Multiple concurrent wildcard matching, punctuation filters, highlight mistakes and corrections.. etc Addendum: Added a auto correct feature, still needs some work, particularly the api timer, I will update again in a day or so.. Tell me what you think.. If you like it Vote! Added an update: Oct 17th. Now has automated checking with three modes, timed, by word/sentence/new line. Update Oct 18: Added an OS check and a Huffman compression class as an alternative compression scheme for 9x/Me users, and a manifest for xp users.. Working on a translation and reference dictionary now. Oct. 19: Added some filters, word auto highlights now when right clicked. Definition dictionary should be done in a day or so. Update!!! Added the 'Penultimate Dictionary' 221 thousand word definitions, lightning fast lookups, word filters, tooltip definitions, and many updates.. Check it out. _________________________________________________ Final Update!!! The last update is here! Now with three sample translation dictionaries, English to French/Spanish/Italian. Added more comments and some fixes/optimizations, and instructions/sample code to add any dictionary/thesaurus to the program. Enjoy.. Thanks to everyone who voted..

 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
'Windows API/Global Declarations for :FINAL UPDATE!!! The Last Word in Spell Checkers AND NOW ..The Penultimate Dictionary
'**************************************
Too many too list..
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 16 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
10/16/2005 7:35:18 PMVBtutor

Charming adaptation and very impressive approach ... 5 stars from me.

Consider adding the following sub to frmMain to make it easier for suggested word replacement by double clicking it:

Private Sub lstSuggest_DblClick(Index As Integer)


cmdControls(0).Value = True


End Sub

(If this comment was disrespectful, please report it.)

 
10/16/2005 8:55:57 PMEd Wilk

Very nice! *****.
btw, first run of the .exe took less then 1 second to load on Athlon 64 3200+ system, maybe you need a PC upgrade? ;)


(If this comment was disrespectful, please report it.)

 
10/16/2005 9:22:22 PMKenneth Foster

Excellent job.Very fast indeed.I'll give it my 5.Only did a quick run thru and found no problems so far.
(If this comment was disrespectful, please report it.)

 
10/16/2005 10:14:15 PMSteppenwolfe

Thanks guys! I am still working on it and will post an update tomorrow.. the new version will have real time spell checking, improved punctuation checks, and an extended options menu.. right now I am just struggling with an api timer.. arghh! I hate timers!
(If this comment was disrespectful, please report it.)

 
10/17/2005 2:25:04 AMWarren Goff

Wow, this is quite a Magic Carpet Ride and you are Born to Be Wild. I love it.
(If this comment was disrespectful, please report it.)

 
10/17/2005 5:49:20 AMRobert Rayment

There seem to be some surprising omissions from some of the dictionaries - eg. all,compared,there's,higher etc.
(If this comment was disrespectful, please report it.)

 
10/17/2005 4:25:29 PMSteppenwolfe

Uploaded a new version.. check it out
(If this comment was disrespectful, please report it.)

 
10/17/2005 4:32:32 PMSteppenwolfe

Robert.. yes I have noticed some words missing from the smaller dictionary, but, it's faster.. I updated the filters to check for some contractions and extensions, like 'that's' and 'ion' should help..
I could add french/italian/spanish lists, if someone wants to send me a good wordlist, I will add it.
(If this comment was disrespectful, please report it.)

 
10/18/2005 5:22:55 AMTom Law

Very nice piece of work - 5 globes
(If this comment was disrespectful, please report it.)

 
10/18/2005 9:41:23 AM

Hello
I can't get the compression and conversion functions to work. I am using 98se. Are these NT functions? Any help or if someone could send me the database files that have been converted.
Thanks
Pat
(If this comment was disrespectful, please report it.)

 
10/18/2005 12:42:51 PMSteppenwolfe

Updated with a Huffman compression alternative for 9x/Me users..
(If this comment was disrespectful, please report it.)

 
10/18/2005 11:37:51 PMgregw

5 Stars from me...
(If this comment was disrespectful, please report it.)

 
10/19/2005 4:07:09 AMPeter Wilson

I must admit I only downloaded this to have a look at your dictionaries. This is a great program. Clear well laid out code. Great job.
(If this comment was disrespectful, please report it.)

 
10/19/2005 4:17:12 PMSteppenwolfe

Added auto select word from cursor position when you right click, and removed message dialog..
(If this comment was disrespectful, please report it.)

 
10/20/2005 8:01:10 PMredbird77

Looks interesting. Just started looking through the code, so I'm not sure, but I think I've found a bug. The Word_Compare function returns True for words that do not exists even though they have common endings. For example: houseies and dogally return True since "house" and "dog" are valid.
(If this comment was disrespectful, please report it.)

 
10/20/2005 10:03:03 PMSteppenwolfe

Redbird I have noticed this, and it is not so much a 'bug' as a concession made to the filter process. Of course many nonsense words will get ignored in this way, and for the sake of accuracy I might simply add a filter on/off switch. The filter is really only there for the small dictionary, which only lists the root words, the larger dictionaries list most of the words in the english lexicon, and so are less in need of this filtering routine.
(If this comment was disrespectful, please report it.)

 
10/21/2005 1:12:54 AMSteppenwolfe

Hi Redbird, the filters were just a reaction to the inadequacies of the small dictionary, which only lists the root words. I have put in a switch that turns the filter off when either of the larger dictionaries are selected, this (along with some other changes), will be included with the next upload..
(If this comment was disrespectful, please report it.)

 
10/23/2005 4:01:32 AMSteppenwolfe

Added a massive update! Many new features and optimizations.. Departed from seltext to mouse position tracking api for word highlihting, turns extension filters off for larger dictionaries, massive 221k definition dictionary added.. let me know what you think..

(If this comment was disrespectful, please report it.)

 
10/23/2005 5:54:51 AMSpector

Great piece of coding Steppenwolfe! This is by far the best spell check example I have seen written in visual basic. If you continue to update this it will have more functionality than even Word's spell check.
(If this comment was disrespectful, please report it.)

 
10/23/2005 5:58:11 AMSpector

Only thing left to add now is a fully functioning thesaurus.
(If this comment was disrespectful, please report it.)

 
10/23/2005 6:11:53 AMRiccardo Cohen

Greaaat code... 5{}
(If this comment was disrespectful, please report it.)

 
10/23/2005 2:05:50 PMSteppenwolfe

Thanks guys! I am looking for a thesaurus, but I think the next update will be a translation dictionary for english to french/spanish/german.. Just trying to find good sample lists on the net now. If anyone has lists like that, just email me with a link..
(If this comment was disrespectful, please report it.)

 
10/23/2005 2:49:01 PMRobert Rayment

I get missing argument for Point_Word in Correct_Rem (needs RTB,x,y probably)
(If this comment was disrespectful, please report it.)

 
10/23/2005 3:55:12 PMSteppenwolfe

Hi Robert, I have fixed this, and will upload a new version tonight, thanks
(If this comment was disrespectful, please report it.)

 
10/24/2005 9:30:20 PMSteppenwolfe

Hey people.. I have a new version, but can't upload it, keep getting a 500 server error.. be patient, a new version is coming in the next day or so with three translation dictionaries..
(If this comment was disrespectful, please report it.)

 
10/25/2005 1:50:04 AMÙmega

Hi Steppenwolfe! Great work but i can't run the program error on the Correct_Item subroutine. Argument Not optional on Point_Word function. Thanks and 5 globes!

(If this comment was disrespectful, please report it.)

 
10/25/2005 1:27:30 PMSteppenwolfe

Hey all.. I will try to upload the new version again tonight. For now, just substitute the Point_Word call with Get_Position. So code in Correct_Item should look like this:
ElseIf Len(sWord) = 0 Then
sWord = Get_Position
(If this comment was disrespectful, please report it.)

 
10/26/2005 11:51:47 PMredbird77

Have you considered converting this into a class? As it is now, you can only really play with it. If you made it into a class, it would be great for something like a html editor.
(If this comment was disrespectful, please report it.)

 
10/27/2005 1:34:11 AMRuturaj

This is a nice spell-checker, but as I faced the issues with other spell-checkers, event this one is not exception!

All these spell-checkers are nice for Text box or Rich Text box. But these are really hard to implement with DHTML Edit control. This is mainly because these spell-checkers take the text and replace it with the selected Text. However, when I try to implement it with DHTMLEdit.DOM.body.InnerText property, it replaces it at the cost of HTML formatting. I don't know if I'm missing something or what.

Can you please do one thing? Will you please upload an Example of your Spell-Checker with DHTML Edit control? (Sorry, if I'm asking for too much!) But this will surely help me. There are many HTML Editors posted on PSC and there are few good Spell Checkers as well. But none of the HTML Editor Project authors thought to give a Spell-Check facility (or at least I couldn't find any when I searched for it!).
(If this comment was disrespectful, please report it.)

 
10/27/2005 1:36:42 AMRuturaj

As far as third party spell-checkers are concerned, ComponentOne's Spell component (or vsSpell 8.0, please check out the name) is really good. You are very close to the functionality of that component! Nice job.
(If this comment was disrespectful, please report it.)

 
10/27/2005 8:32:15 AMRoyk

The UI looks good, but this code is missing something very imporant: Comments. You need to tell others what each function does and why. If you really want someone else to use your code, don't make it so difficult to figure out how it works that it would take them less time to write their own. For example, my spell check uses algorithm XYZ. The reason why my spell check is as good as metaphone is??? The reson why I don't break down my dictionary into 26 smaller dictionaries is?
(If this comment was disrespectful, please report it.)

 
10/27/2005 1:27:18 PMSteppenwolfe

Ok, first off.. Redbird, maybe I will pull the project apart and write sample active-x control as an example for spell checker, it's a good idea, I will take a look and see how much is involved on the weekend and let you know.. Rovk, it probably does need some more comments, though I tries to give routines/vars meaningful names, and did comment what I thought was not obvious. I will add some comments in last version, (I will upload on the weekend).
(If this comment was disrespectful, please report it.)

 
10/27/2005 1:39:28 PMSteppenwolfe

Hi Ruturaj
I see big difference between my code and vsSpell --> $199.95
If you want this to check html, is very easy, only need to write three routines..
1) extract each word from html container, use: do loop/mid/instr and filter each word with Filter_Punctuation routine
2) do lookup in hash table: If HashSearch(sWords(), lWords(), sWord <> -1 Then
3) use Word_Suggest to display alternatives..
Should not be too difficult to do, just try it..
(If this comment was disrespectful, please report it.)

 
10/27/2005 1:44:22 PMSteppenwolfe

As far as formatting changes with the replace function, have a good look at the second half of the Word_Highlight routine..
It inserts the new word and frames it in rtb tags, just do the same thing, but use html tags as constants..
I took most of the seltext reliance out of this project, (because of speed issues), and replaced them with string parsing, so with some work, it could be migrated to other object types.
Hope this helps..
(If this comment was disrespectful, please report it.)

 
10/27/2005 9:17:54 PMNobbybuttons

Very well written, nice looking and usefull, best spell checker i've had the privilage of useing. Thanks. This puts MS products to shame.
(If this comment was disrespectful, please report it.)

 
10/27/2005 9:35:35 PMSteppenwolfe

For those of you that would like to use this as a class module, I stripped it down and put the spell check portion into a class, demonstarting how easily this could be made object independent. Class example is at:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=63050&lngWId= 1

(If this comment was disrespectful, please report it.)

 
10/28/2005 6:14:55 PMOption Explicit

Spell checkers and stuff like that don't really excite me, but this is a remarkable project. Very nicely done. Thanks.
(If this comment was disrespectful, please report it.)

 
10/29/2005 1:31:16 AMSteppenwolfe

Thanks Opt-Ex.. Coming from quality coder, that is a real validation.
Hey all.. I have had finished project for a week now, but still have update issues because of project size and my (slow) dial up connection. Be patient, I will try to post update again tomorrow..
(If this comment was disrespectful, please report it.)

 
10/29/2005 9:02:16 PMSteppenwolfe

FINAL VERSION!!! I got the final version uploaded today. This includes three sample translation dictionaries, some fixes, more comments, and examples on how to format and add any dictionary/thesaurus to the program..
Cheers
John
(If this comment was disrespectful, please report it.)

 
10/30/2005 1:28:00 AMCodeFester

This is REALLY nice work. It's a fraud that this quality submission isn't leading the contest this month...
(If this comment was disrespectful, please report it.)

 
10/30/2005 10:15:18 AMOption Explicit

I agree with CodeFester. I believe "fraud" is the operative word here... After all, this runs right out of the box, unlike a certain submission that no one seems able to run because of its incompleteness but still has a peculiarly high number of 5-globe votes from a bunch of people no one ever heard of before... ;-) No matter, you're a certain winner Steppenwolfe, congrats in advance.
(If this comment was disrespectful, please report it.)

 
11/13/2005 3:55:05 PMSteppenwolfe

Thanks to everyone who voted.. This was initially just a small add-in to another project, but balloned, (as it always does), into a much larger application. Many thanks go out to James OE, Phantom, and everyone else for their great feedback..

PS: Now check out my MRU scanner!

Cheers
John
(If this comment was disrespectful, please report it.)

 
11/13/2005 6:07:23 PMOption Explicit

Glad to see this got the recognition it deserved. Congrats, and expect your supermodel in the mail in 3 to 4 weeks ;)
(If this comment was disrespectful, please report it.)

 
11/29/2005 5:53:22 AMDustin

nice work ;P
(If this comment was disrespectful, please report it.)

 
12/8/2005 5:48:53 AMKenny

Is there a way to add words to the dictionaty?
(If this comment was disrespectful, please report it.)

 
5/17/2006 10:57:07 AMluke

this is the best spell check i have seen in term of speed. I like most of the features but it lacks one thing that I really like is the autocomplete feature(dictionary entry textbox)
nice work
luke
(If this comment was disrespectful, please report it.)

 
9/19/2006 3:36:57 AMDriss HANIB

Very good spelling prog. How can i use it with french dictionnary ?
What is your english dictionnary's structure ?

Driss (from FRANCE ;o))
(If this comment was disrespectful, please report it.)

 
9/19/2006 4:28:21 AMPaul Turcksin

Sorry Stepenwolfe, I must have missed or overlooked this submission and didn't vote. Has been coorected now (better late than never). 5/5 for this superb piece of craftmanship,
(If this comment was disrespectful, please report it.)

 
9/19/2006 9:25:47 AMSteppenwolfe

Thanks Paul.
Driss, should work the same with french dictionary. Just format def file in same way. Start app, then look at decompressed file for data. Look into code for more details on delimiter chars. It is an old project, (one of first things I wrote in vb), so I don't remember much about it to be honest.
(If this comment was disrespectful, please report it.)

 
5/3/2007 2:30:25 AMMohammedali

It is a good job
(If this comment was disrespectful, please report it.)

 
7/25/2009 5:24:16 AMWarren Barnett

I have noticed that the English dictionary doesn't have actual English spellings, only American spellings. [There is an entire cult movement to have Bill Gates drawn and quartered because of his "American English" Windows, because everyone outside of the United States knows that there is only English, and that bastardised version that the Americans use! :-)] Type in "colour" and you get "not found". One of the dictionaries actually has the word, but no suffixes, etc., but it still comes up "not found", and "color" is not among the suggested replacement words. I realize that I could probably manually add to the list, but there is a host of words that come up, such as proper nouns, that would be nice to be able to add to the dictionary. I realize that it is long since the "Final" update, but any chance of an "add to dictionary" addition? Other than that, this is quite excellent.

Warren Barnett
(If this comment was disrespectful, please report it.)

 
12/15/2009 1:59:48 PMMrEnigma

I just found your code. good job by the way.

I found the RTF text would dissapear when i tested and found you are using the clipboard to paste back the highlighted code!

just use .TextRTF = sTBody - job done.
(If this comment was disrespectful, please report it.)

 
1/29/2010 7:52:45 AMDDPP

For those of you that would like to use this as a class module, I stripped it down ...Why did you remove class module version from http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=63050&lngWId=1 Like someone above mentioned, this 25 mb huge code is only good for playing...
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.