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):
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.
|






