In "Mind Your Spelling", JC 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, we will show how to add two simple checks to the basic engine.