Page 1 of 1

Spell Checker

Posted: Sat Oct 02, 2004 5:53 am
by Paul
Needed a spell checker for a project I was working on but could not find a free one on the web anywhere (there where quite a few for $$$). I decided to quickly whip one up in PureBasic. It worked quite well for what I needed so I have made it available for others to use also. I compiled it as a handy DLL so it can be used in other languages besides PB.

DLL Archive... Dictionary.zip

Posted: Sat Oct 02, 2004 7:42 am
by J. Baker
Nice work Paul, I'm sure this will come in handy. :D

Posted: Sat Oct 02, 2004 9:52 am
by thefool
thanks! its really nice!.

Btw, how does it work? It takes word for word and then
compares with a database, and if word is not in database it complains?



btw i found 2 small bugs:

1)
type in "worrld" (yes world with 2 r's)
ok it should complain and it does..
if you correct the mistake and write more after the word "world", so there
stands "world is sleeping", then all is highligted.

2)
any number you write it takes as an spelling error.


(want to share the source, or keep it private?)

Re: Spell Checker

Posted: Sat Oct 02, 2004 12:11 pm
by NoahPhense
Nice work. How about a userlib with now msgbox at the end, and a data
file so that words can be added/removed from the list?

- np

Posted: Sat Oct 02, 2004 4:59 pm
by Paul
thefool wrote: btw i found 2 small bugs:

1)
type in "worrld" (yes world with 2 r's)
ok it should complain and it does..
if you correct the mistake and write more after the word "world", so there
stands "world is sleeping", then all is highligted.
Not a bug.
Did you press the "spellcheck" button after you made your changes?
The example program performs a spell check when the "spellcheck" button is pressed. If you want the program to check as you type, you have to adjust the code accordingly.


2)
any number you write it takes as an spelling error.
Not a bug.
This is a spell checker, it checks the spelling of words.
"Two" is a word... "2" is not a word.
All numbers will show as spelling errors because they are not words. If you want to check the spelling of a number, then type the number as a word ;)

How about a userlib with now msgbox at the end, and a data
file so that words can be added/removed from the list?
A 400kb user library?? Little excessive don't you think ?!?
DLL's are accepted as excess baggage, especially in this type of situation.

I posted a newer version that allows for an external dictionary file so you can add your own words. Keep in mind that the DLL is optimized for its own built in dictionary (over 110,000 words)... any extra dictionary data will slow the checking process down. (especially if the extra dictionary file grows to a large size)


Enjoy! :)

Posted: Sat Oct 02, 2004 10:42 pm
by NoahPhense
I didn't mean to make the words part of the lib.. Just the core. Then the
data file can be the baggage.

Just a thought.

- np

Posted: Thu Dec 08, 2005 3:00 am
by Intrigued
Paul, just a heads up. It seems I have found an anamoly with Dictionary_SOWPODS.dll.

I typed the following:

H man! What it be?

As you can see "H" is not a word and the spell checker did not catch such.

Sincerely,

Posted: Thu Dec 08, 2005 4:18 am
by rsts
Now this will come in handy!

Thanks Paul.

Posted: Thu Dec 08, 2005 1:11 pm
by srod
Excellent work Paul.

btw, how did you compile the dictionary? I'm not suggesting for a mo that you typed in 110000 words... :D

Thanks.

Posted: Sun Dec 11, 2005 2:09 pm
by Thorsten1867
It's a great work. But I'm looking for a german spellchecker. Is it possible to change the internal dictionary to an external dictionary to use the lib with other languages. Perhaps the source-code could be helpfull too, to create a german dictionary. :wink: