Sentry Spelling Checker Engine Technical Support
You are here: Home > Support > Sentry Spelling Checker Engine > Tips and hints
This document contains various tips and hints for using Sentry Spelling Checker Engine effectively.
Windows SDK: If the showContext parameter in SSCE_CheckBlockDlg is True, the built-in spell check dialog appears briefly even if the text contains no misspelled words. If you want to prevent the dialog from appearing, first determine if the text contains any misspelled words: Call SSCE_OpenBlock and SSCE_CheckBlock. If SSCE_CheckBlock returns SSCE_END_OF_BLOCK_RSLT, then the text contains no misspelled words so there's no need to continue. If SSCE_CheckBlock returns something other than SSCE_END_OF_BLOCK_RSLT, the text contains at least one misspelled word. Call SSCE_CheckBlockDlg to check the text interactively. Don't forget to call SSCE_CloseBlock, regardless of the return value from SSCE_CheckBlock.
If you want to check text in two or more languages, don't open dictionaries for both languages at the same time. Having dictionaries for two languages open at once increases the probability that a misspelled word in one language will match a valid word in the other language, and therefore will not be detected. Also, having two main dictionaries open at once will increase the time required to check spelling and look up suggestions. Instead, open two (or more) Sentry sessions, and open the dictionary for one language in each session. At run time, use the appropriate session to check text based on the text's language. Alternatively, close the dictionary files for the first language then open the dictionary files for the second. Note that this does not apply to Wintertree's medical or legal dictionaries: the medical or legal dictionaries are supplements to the English dictionary and can be opened at the same time as the English dictionary.
Don't open ssceam.tlx, ssceca.tlx, or sscebr.tlx as a user dictionary. Although these files are text lexicons and technically can be used as user dictionaries, they are not intended to be used this way. These files should be opened as part of the main American, Canadian, or UK English dictionary. This applies to the sscexx.tlx files included with dictionaries for other languages as well.
Importing a large word list into a user dictionary may take a long time, because the entire user dictionary is written on each update. If your word list is formatted as a text file with one word per line, you can just open it as a user dictionary. Sentry will treat the file as an external user dictionary, which is the same way it handles user dictionaries created by other applications. If the user dictionary is updated, Sentry will write the words in the file in alphabetical order.
If you want to obtain a random word from the dictionary (in a game, for example), use this technique: Generate a random "word" by stringing letters together randomly (e.g., "neucmdoq"). Call SSCE_Suggest to look up suggestions for the random "word." Use the first suggestion offered, or pick one at random.
Copyright © 2015 Wintertree Software Inc.