Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spell Checker

Status
Not open for further replies.

petersen909

Programmer
Aug 7, 2015
8
US
Hello All,

I have used variations of the Word spell check in projects in the past but it always leaves me underwhelmed.

In Google searches and VFP forum searches I keep finding references to Craig Boyd's Spell Checker class but the website is no longer available. Is there anywhere I can download this class? I don't want to ruffle any feathers if there is a licensing issue but I believe it was originally distributed license free (from what I've read).

Thanks,

Matt
 
I don't know about Craig's one but I have been using the one described here faq184-5626
for years

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
Craig's seems to have vanished... couldn't even get it off The Wayback Machine, though a lot of their other stuff is there.

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Scott,

I try to save every useful thing I come across for VFP now because you never know when it will vanish.

GriffMG and Mike,

Thanks for the FoxSpell tip.

Matt
 
Yeah, I have as well, but since I just got back to VFP after a near 15 year break, my VFP library is all in storage (books, CDs, FoxDev magazine, the whole lot...)
I probably have it around somewhere but not accessable.


Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
The Wayback Machine did have the original Blog Post where Craig outlined pretty extensively how he created the Spell Checker (Word lists, algorithms, etc.) He even posted the implementation of the Levenshtein Algorithm on VFP Wiki. Link I may spend some time this weekend trying to write my own version based on his thought process.

Matt
 
I purchased Foxspell and have to say it was the easiest way to integrate a spell check into a VFP app. My only issue was the fact the dictionary files contained a vast amount of words that I'd never heard of (even at my age) and some words from the good old U S of A such as color, honor etc.

As the app I was developing was for use in the UK, I did some research and found some free UK dictionary files which I converted, merged and spent a few days going through to remove or change those words which I believed to be not much use and created three UK type DBF's for use with Foxspell.

For anyone who already uses this fantastic app will be aware that if words are not relevant or not present they can be deleted or added etc.

Maybe not the solution, but hopefully the above may assist in your quest.

Thank you

Steve
 
So I took the deep plunge and I decided to create my own spell checker. I am using the same open source dictionary from Craig's Speller Checker which is called SCOWL. I found another open source spell checker written in VB, which I am translating to VFP. Now that spell checker has the ability to underline misspelled words as you type, as in MS Word and also the ability to use the right click menu to select the proper spelling. My sights are set much lower. Just a spell check button and a dialog to iterate through the misspelled words with the suggestions from the dictionary.

At this point I am able to identify misspelled words (the easy part). Now comes the suggestions based on complex algorithms. Execution time should be interesting. I'll keep everybody posted as to my progress (if anyone cares) and upload my solution with an open license when I am finished.

Matt
 
Thanks Matt, that sounds promising.

It's a pitty Craig couldn't even yet took the time to find some place for his fine extensions to remain available, like codeplex. Even just the final zip files plus documentation. His site already began to get unusable as the comment system he uses caused more javascript errors and made his site not react. Most probably their API changed and Craig didn't keep up with these changes.

What I once did myself was creating a german dictionary also containing contemporary vocabulary from crawling online articles of a quality weekly news magazine ("Der Spiegel" - compares a bit to Time magazine), also counting a frequency of how often words were used overall, so you can decide the information value of a word better, eg keep out very common words like prepositions from key word lists.

Anyway it lacks the format of the open source dictionaries and I only did this for the german language.

Bye, Olaf.
 
Well this weekend's deep plunge was fairly successful. I am at the point where I can loop through a paragraph and determine if a word is misspelled, offer 10 suggestions, and replace the word with one of the ten suggestion or your own input. A couple of notes:

1. I haven't written the routine to strip punctuation before spell checking, then add it back in after spell check is complete
2. Current performance on determining if a word is misspelled or not: .063 seconds a word; not great but for my application it is acceptable
2. The Levenshtein Algorithm produced by far the best suggestions (actual word shows up number 1 in suggestions) but takes approximately 15 seconds per misspelled word, so I didn't use it
3. The Algorithm I used is pretty good (actual word shows up number 1 most of the time, but sometime is number 2-6 on the list, may be a weighting problem) but is much faster, taking only 2.5 seconds a misspelled word to return the top 10 suggestions.
4. I have not written the user defined dictionary, the ignore once, or ignore all routines yet

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top