Spellcheck

My spelling in these posts is normally far from perfect. ( and this is no exception. ) there are wordpress plugins to do spellchecking, but most of them require pspell to run. This server doesn’t have pspell :’(. Well, just installing a plugin is no fun anyway. I decided to see if I could create my own spellcheck algorithm, which is no easy task. The algorithm picks the correct word, most of the time, but it can take up to 30 seconds to give suggestions for some words. ( due to the large volume of words it has to check against. ). I have been able to speed it up considerably just by making the code more stream line. I have come up with several ways to limit the number of items pulled from the database, but none of them has done quite enough. If I ever want this to work, I fear I’ll have to research spellcheck algorithms :’(… The current algorithm I am using gives x points for each matching property of a word. The words with the highest number of points are therefore the most likely canditates. searching for “taht” takes <2 seconds and returns only one result, the correct one. Searching for defenestrare returns several results, but the correct word, defenestrate is the best match. Same goes for fenestrate. By using a checksum test, the alogithm is able to account for typos ( i.e. Hitting r instead of t because they are right next to each other. ) Well, have to be going to school right now… I’ll keep me posted if I make any more progress with this.

3 Responses to “Spellcheck”

  1. Sean B Says:

    Dude, awesome. totally sweet. that must be wicked…wicked…hard work. Peace homedawg. fo shizzle.

  2. Josh Says:

    Awesome Job! Keep up the good work!

  3. Greggy Says:

    I don’t know if it will be good work until I can actually get reasonable times… gives me a newfound respect for search engines.

Leave a Reply