Wintertree Software Inc.

Sentry Spelling Checker Engine - Support

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Support > Sentry Spelling Checker Engine > Mixed Digits/Mixed Case explanation

Explanation of Mixed Digits and Mixed Case options

Product: Sentry Spelling Checker Engine Windows SDK, Sentry Spelling Checker Engine Source SDK

This topic contains an explanation of how SSCE_IGNORE_MIXED_CASE_OPT, SSCE_IGNORE_MIXED_DIGITS_OPT, SSCE_REPORT_MIXED_CASE_OPT, and SSCE_REPORT_MIXED_DIGITS_OPT operate. (In the Sentry Windows SDK, these options may be accessed through the IgnoreMixedCase, IgnoreMixedDigits, ReportMixedCase, and ReportWordsWithDigits properties.)

When the Sentry engine checks spelling, it performs the following steps for each word:

  1. It determines if the word matches the criteria for any enabled "SSCE_IGNORE" options, and if so, it skips the word and proceeds to the next word without performing the next step.

  2. It determines if the word matches the criteria for any enabled "SSCE_REPORT" options, and if so, it reports the word through a bit set in the value returned by SSCE_CheckWord, SSCE_CheckBlock, or SSCE_CheckString. (In the Sentry Windows DLL, the word may be reported to the user if a function such as SSCE_CheckBlockDlg or SSCE_CheckCtrlDlg was called.)

The two steps above are performed in the order listed. Thus, a word that has been ignored is essentially filtered out, so no further tests (including spelling) are performed on it. For this reason, enabling both options SSCE_IGNORE_MIXED_CASE_OPT and SSCE_REPORT_MIXED_CASE_OPT is pointless. A word containing mixed case will be filtered out (because SSCE_IGNORE_MIXED_CASE_OPT is enabled), and will therefore never be reported as containing mixed case. SSCE_IGNORE options take precedence over similarly named SSCE_REPORT options because the SSCE_IGNORE options are applied first.

The tests performed in Step 2 above are independent of each other. The tests for spelling, doubled words, mixed-case words, or words containing digits can all be enabled and disabled independently by enabling and disabling the corresponding SSCE_REPORT options. All tests indicated by any enabled SSCE_REPORT options are carried out, even if one or more of the other tests proves positive. Thus, the result returned by one of the SSCE_Check functions may indicate several conditions (problems) with a single word: The word may be misspelled, uncapitalized, doubled, contain mixed case, and contain mixed digits all at once. This is why the value returned by the SSCE_Check functions is a bit-mask, so several conditions can be reported at once.

The presence of a word in a dictionary or lexicon affects only its spelling. If a word exists in a dictionary with the default SSCE_IGNORE_ACTION, the Sentry engine will not report it as misspelled. However, if the word matches the criteria for a test indicated by one of the other enabled SSCE_REPORT options, the word will still be reported even if it exists in a dictionary. For example, assume both SSCE_REPORT_MIXED_CASE_OPT and SSCE_REPORT_SPELLING_OPT are enabled, and that the word "PrintScreen" does not exist in any open dictionary. SSCE_CheckString will return both SSCE_MISSPELLED_WORD_RSLT and SSCE_MIXED_CASE_WORD_RSLT for "PrintScreen". If "PrintScreen" is then added to an open dictionary, SSCE_CheckString will still stop when it encounters "PrintScreen", but this time it will return only SSCE_MIXED_CASE_WORD_RSLT. Adding the word to a dictionary does not change the fact that it contains mixed case, and because SSCE_REPORT_MIXED_CASE_OPT is enabled, the Sentry engine will still report to your application that the word contains mixed case.

The same situation exists when "Ignore All" is selected as the disposition for a reported word. Usually, selecting "Ignore All" for a reported word adds the word to a temporary dictionary, which prevents it from being reported as misspelled (i.e., prevents an SSCE_Check function from returning SSCE_MISSPELLED_WORD_RSLT for the word). However, as we have seen, adding a word to a dictionary (including a temporary dictionary) does not alter the fact that the word contains mixed case, so selecting "Ignore All" does not prevent an SSCE_Check function from subsequently reporting the word with SSCE_MIXED_CASE_WORD_RSLT.

Note that all of the above is true for SSCE_REPORT_MIXED_DIGITS_OPT as well, when a word contains embedded digits, such as "Win2000".

You might consider not setting SSCE_REPORT_MIXED_CASE_OPT or SSCE_REPORT_MIXED_DIGITS_OPT. As stated above, these options cause the Sentry engine to perform separate, special tests against each word, and to report the results of those tests through bits set in the return values from SSCE_Check functions. But unless you have some specific need to know if a word contains mixed case or embedded digits, the tests may be superfluous. Even if these two SSCE_REPORT options are disabled, words such as "PrintScreen" or "Win2000" will still be reported as misspelled if they are not contained within an open dictionary, and presumably if they are contained in a dictionary, the intention is that they are correct and should not be reported for any reason. Case errors such as "TUesday" and missing-space errors such as "June5" will still be reported as misspellings (unless "TUesday" and "June5" happen to exist in an open dictionary).

Home Site index Contact us Catalog Shopping Cart Products Support Search

Copyright © 2015 Wintertree Software Inc.