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 > Most or all words reported as misspellings


Most or all words reported as misspellings

Product: Sentry Spelling Checker Engine Source SDK (and Windows SDK with Core API only)

Problem: When checking text, the Sentry engine reports all or most words as misspellings.

Discussion

Note: If your application uses the Sentry Windows SDK and does not call SSCE_OpenLex directly, please see Most or all words reported as misspelled (Windows SDK).

The main American English dictionaries are shipped as two files: ssceam.tlx and ssceam2.clx (substitute "br" for "am" in the file name for British English, and "ca" for "am" for Canadian English). The first file contains about 1,000 of the most commonly used words. The second file contains about 100,000 of the most commonly used words. Words in the first file are also present in the second file.

If the Sentry engine accepts words such as "the" or "of" but doesn't accept less common words such as "engine" or "improvement", the most likely cause is failure to open the ssceam2.clx file. If Sentry rejects all words including very common words such as "the" and "of", the most likely cause is failure to open any dictionary files. This problem is almost always the result of a configuration error on your system. Your application passes the name of the dictionary file to open to SSCE_OpenLex. In response, the Sentry engine asks the operating system to open the file. If the operating system is unable to open the file for any reason (i.e., it returns an error code), the Sentry engine will not be able to open the file, either. Because the dictionary cannot be opened, its contents cannot be loaded into memory, and any words contained within the dictionary file will be reported as misspelled. Typical reasons the operating system will be unable to open the dictionary file include:

An important point to consider is that the Sentry engine passes the file name you pass to SSCE_OpenLex to the operating system verbatim. If you pass "/myapp/dict/ssceam2.clx" to SSCE_OpenLex, the Sentry engine asks the operating system to open "/myapp/dict/ssceam2.clx". If the operating system returns an error code, the Sentry engine returns an error code to your application and stops attempting to open the dictionary file. It doesn't search for the dictionary file in other directories, try different spellings of the dictionary file name, or magically blast through the operating system's permissions to open the file at all costs. The Sentry engine merely tries to open the file your application asks it to open, and if it can't, it fails.

Another, though less common, cause of dictionary open failure is file corruption. ssceam2.clx (and all dictionary files with a .clx extension) are binary files. If these files are transferred from one system to another using "ASCII" or "Text Mode" file transfer, they will be corrupted. If the dictionaries were once openable but the Sentry engine suddenly started returning errors on attempts to open them, and no other changes took place on the run-time system, it's possible that the dictionary files became corrupted through file system corruption or some other cause. Replacing the files should solve the problem.

A problem related to corruption is attempting to open a dictionary file which is in a format inappropriate for your version of the Sentry engine. This usually happens only with compressed dictionary files (which have a .clx extension). The "2" in the dictionary file name (e.g., ssceam2.clx) indicates the internal format version of the dictionary file. A "2" format version is compatible with the Sentry engine version 5.1 and later. If you are using, for example, version 5.15 of the Sentry engine, the .clx files you use should have names like sscexx2.clx. When you purchase supplemental dictionaries from Wintertree Software, dictionary files in both the current "2" format version and the older "1" format version will be included. For example, Wintertree Software's French dictionary product includes files sscefr1.clx and sscefr2.clx. You must use the file appropriate to your version of the Sentry engine. If you attempt to open sscefr1.clx with a Sentry engine version 5.1 or later, the open will fail. Similarly, if you attempt to open sscefr2.clx with Sentry engine version 4.22 or earlier, the open will fail.

If the dictionary files open successfully (SSCE_OpenLex returns >= 0) but many words are still reported as misspelled, a potential cause is passing a relative path name to SSCE_OpenLex. Under some circumstances, the Sentry engine will re-open a compressed (.clx) lexicon file while checking spelling or looking up suggestions to load parts of the dictionary not cached in memory. To re-open the file, it uses the file name passed to SSCE_OpenLex. If the path to the dictionary file is relative, and the calling application's current directory has changed, the attempt to re-open the file may fail. As a result, the needed parts of the dictionary are not loaded into memory, and the words contained within those parts are reported as misspelled. The path names passed to SSCE_OpenLex should therefore always be absolute (i.e., should start from the file system's root directory).

If SSCE_OpenLex returns SSCE_BUFFER_TOO_SMALL_ERR, the memBudget parameter is too small. Try increasing it. Unfortunately, there is no easy way to determine the minimum allowable memBudget parameter for a given dictionary file.

Here are some things you can try to diagnose the cause and solve the problem:


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.