Sentry Spelling Checker Engine - Technical Support |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Support > Sentry Spelling Checker Engine
Product: Sentry Spelling Checker Engine (all SDKs)
Version: 5.1 and later
The action codes passed to SSCE_AddToLex (or set in the Sentry DLL's Dictionary dialog box) affect the behavior of Sentry when a word is checked which matches a word in the user lexicon. While Sentry is checking the spelling of some text, it looks for each word in the set of open lexicons. When a word is found in a text lexicon, Sentry looks at the action code in the text lexicon to determine how to respond. The responses for each action code are shown in the following table:
Action |
Response |
SSCE_AUTO_CHANGE_ACTION |
The word should be unconditionally substituted for another word; the substitution should use the case pattern of the other word listed in the lexicon. When a word with this action is encountered, SSCE_CheckBlock, SSCE_CheckWord, or SSCE_CheckString returns SSCE_AUTO_CHANGE_WORD_RSLT. The otherWord parameter will contain the otherWord from the lexicon. See the tables below for information on how the case pattern of the otherWord parameter is affected. |
SSCE_AUTO_CHANGE_ PRESERVE_CASE_ACTION |
The word should be unconditionally substituted for another word; the substitution should use the case pattern of the checked word. When a word with this action is encountered, SSCE_CheckBlock, SSCE_CheckString, or SSCE_CheckWord return SSCE_AUTO_CHANGE_WORD_RSLT. The otherWord parameter will contain the otherWord from the lexicon. See the tables below for information on how the case pattern of the otherWord parameter is affected. |
SSCE_CONDITIONAL_CHANGE_ ACTION |
The word should be conditionally substituted for another word; the substitution should use the case pattern of the other word listed in the lexicon. When a word with this action is encountered, SSCE_CheckBlock, SSCE_CheckString, or SSCE_CheckWord return SSCE_CONDITIONALLY_CHANGE_WORD_RSLT. The otherWord parameter will contain the otherWord from the lexicon. See the tables below for information on how the case pattern of the otherWord parameter is affected. |
SSCE_CONDITIONAL_CHANGE_ PRESERVE_CASE_ACTION |
The word should be conditionally substituted for another word; the substitution should use the case pattern of the checked word. When a word with this action is encountered, SSCE_CheckBlock, SSCE_CheckString, or SSCE_CheckWord to return SSCE_CONDITIONALLY_CHANGE_WORD_RSLT. The otherWord parameter will contain the otherWord from the lexicon. See the tables below for information on how the case pattern of the otherWord parameter is affected. |
SSCE_EXCLUDE_ACTION |
The word should be treated as misspelled by the Sentry engine, even if it is defined in other lexicons. When a word with this action is encountered, SSCE_CheckBlock, SSCE_CheckString, or SSCE_CheckWord return SSCE_MISSPELLED_WORD_RSLT. Also, SSCE_Suggest will remove the word from the list of returned suggestions. This action can be used to effectively delete words from lexicons. |
SSCE_IGNORE_ACTION |
The word should be ignored (skipped) because it is considered correctly spelled. When a word with this action is encountered, SSCE_CheckBlock and SSCE_CheckString skip over this word and check the following word, and SSCE_CheckWord returns SSCE_OK_RSLT. |
The spelling dialog box built-in to the Sentry Windows DLL responds as follows to the action codes:
Action |
Response |
SSCE_AUTO_CHANGE_ACTION |
The word is automatically replaced in the text with the otherWord from the lexicon. See below for information on how the case pattern of the replacement word is affected. |
SSCE_AUTO_CHANGE_ PRESERVE_CASE_ACTION |
The word is automatically replaced in the text with the otherWord from the lexicon. See below for information on how the case pattern of the replacement word is affected. |
SSCE_CONDITIONAL_CHANGE_ ACTION |
The problem description in the dialog box is set to "Consider changing," and the otherWord from the lexicon is displayed in the suggestion list. See below for information on how the case pattern of the replacement word is affected. |
SSCE_CONDITIONAL_CHANGE_ PRESERVE_CASE_ACTION |
The problem description in the dialog box is set to "Consider changing," and the otherWord from the lexicon is displayed in the suggestion list. See below for information on how the case pattern of the replacement word is affected. |
SSCE_EXCLUDE_ACTION |
The word is treated as a misspelled word. The problem description in the dialog box is set to "Not in dictionary" and the suggestions list box is filled with suggested replacements. The word is never offered as a suggestions. |
SSCE_IGNORE_ACTION |
The word is skipped and treated as correctly spelled. |
The case pattern of the replacement word is affected by which AUTO_CHANGE or CONDITIONAL_CHANGE action is used. In some situations, it is desirable to have the replacement word match the case of the checked word. For example, if the checked word was capitalized because it appeared at the start of a sentence, then the replacement word should also be capitalized. In this situation, SSCE_AUTO_CHANGE_PRESERVE_CASE_ACTION should be used instead of SSCE_AUTO_CHANGE_ACTION, and SSCE_CONDITIONAL_CHANGE_PRESERVE_CASE_ACTION should be used instead of SSCE_CONDITIONAL_CHANGE_ACTION.
The following table shows how the case of the replacement word is affected by the case of the checked word when SSCE_AUTO_CHANGE_PRESERVE_CASE_ACTION or SSCE_CONDITIONAL_CHANGE_PRESERVE_ACTION is used
Checked word |
otherWord in lexicon |
||
|
cat |
Cat |
CAT |
dog |
cat |
cat |
cat |
Dog |
Cat |
Cat |
Cat |
DOG |
CAT |
CAT |
CAT |
In other situations, the case pattern of the replacement word should match the case pattern of the otherWord in the lexicon exactly. For example, when expanding abbreviations a specific case pattern is desirable in the expansion, regardless of the case pattern of the abbreviation. The following table shows how the case of the replacement word is affected by the case of the otherWord in the lexicon when SSCE_AUTO_CHANGE_ACTION or SSCE_CONDITIONAL_CHANGE_ACTION is used:
Checked word |
otherWord in lexicon |
||
|
cat |
Cat |
CAT |
dog |
cat |
Cat |
CAT |
Dog |
cat |
Cat |
CAT |
DOG |
cat |
Cat |
CAT |
Copyright © 2015 Wintertree Software Inc.