
Looking up suggestions
When ActiveX Speller detects a misspelled word, you may want to display a list of suggested replacements. ActiveX Speller's built-in spelling-checker dialog does this automatically, but your application can also obtain suggestions by calling ActiveX Speller's Suggest method.
To build a set of suggestions, call the Suggest method. The Suggest method locates suggestions for the word in the MisspelledWord property. (Note that you can set the MisspelledWord property to locate suggestions for any word you like.)
After calling the Suggest method, you can access the set of suggested words by indexing the Suggestion property.
Looking up suggestions can be time consuming. ActiveX Speller controls the suggestion search with the SuggestionDepth property. SuggestionDepth determines how much of the large main dictionary is searched when locating suggestions. Stated simply, when SuggestionDepth has a low value, only words which are very similar to the word in the MisspelledWord property are considered as candidate suggestions. When SuggestionDepth has a high value, most or all words in the dictionary are considered.
Each time your application calls the Suggest method, SuggestionDepth is increased by the value of the SuggestionDepthIncrement property. Calling Suggest several times in a row results in a deeper and deeper search. When the MisspelledWord property is changed, SuggestionDepth is reset to the value of the MinSuggestionDepth property.
The suggestions are ordered from best to worst, so Suggestion(0) is the best suggestion (or tied for first place).
Internally, ActiveX Speller maintains a score for each suggestion. The scores range from 0 (no similarity to the misspelled word) to 100 (a perfect match with the misspelled word). The Suggest method filters suggestions based on their scores according to the MinSuggestionScore and SuggestionScoreRange properties. Your application can adjust the values of these properties to control the quality of the displayed suggestions.
Any suggestions whose score falls below the MinSuggestionScore value are eliminated. If you set MinSuggestionScore to 0, no suggestions will be eliminated, and if you set it to 100, they will all be eliminated.
The SuggestionScoreRange property defines the range of scores, starting with the highest score, which are acceptable. If SuggestionScoreRange is set to 20, and the best suggestion has a score of 87, then only suggestions with scores ranging from 67 (i.e., 87 minus 20) to 87 will be offered. If you set SuggestionScoreRange to 0, no suggestions will be offered. If you set it to 100, all suggestions will be offered.
The Suggest method can locate suggestions using typographical ("looks like") matching, phonetic ("sounds like") matching, or both, based on how the PhoneticSuggestions property and TypographicalSuggestions property are set.
| << Events |

Home | Order Now | Products | Upgrades | Free Trial | Partners | About Spellex | Contact Us | Site Map | Privacy Policy
Spellex Corporation © 2008. All rights reserved












