Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Recent issues

Article Preview


Buy Now

Print:
PDF:

Feature

REALWord

Improve Your Spelling

Issue: 6.4 (May/June 2008)
Author: JC Cruz
Article Description: No description available.
Article Length (in bytes): 22,207
Starting Page Number: 20
RBD Number: 6410
Resource File(s):

Download Icon 6410.zip Updated: Thursday, May 15, 2008 at 11:18 AM

Related Web Link(s):

http://en.wikipedia.org/wiki/Code_refactoring

Known Limitations: None

Excerpt of article text...

Today, I will show how to make a better spell-check engine. First, I will base the engine on the rbc_fsmCore class. Next, I will add features that are absent in the basic engine. I will also show how to make these changes using code refactoring.

For A Better Spelling

In my last article "Mind Your Spelling", I showed how to build a basic spell-check engine. This engine can detect any suspect words in a target phrase. It lets users edit the suspect word or replace it with one from a list of possible spellings. It also lets users ignore a suspect word if they deemed it to be correct.

But most modern engines do more than just check and correct words. They recheck an edited word to see if it is still correct. They build a list of user-defined words and save that list to a file for later use. They replace all instances of a suspect word with one that the user provides. They also ignore words that match a certain pattern.

Some engines will also do basic style checks. Style checks, however, are beyond the scope of this article. Nevertheless, I will show how to add two simple checks to the basic engine.

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com