ImageGear for C and C++ on Windows v19.1 - Updated
Spell Checking
User Guide > How to Work with... > OCR > How to... > Improve Accuracy with Checking > Spell Checking

Spell checking uses third-party language-specific spell checkers. There are two kinds of spell checkers:

The Capture SDK is delivered with twenty one different Language dictionaries (English, German, Dutch, Polish, Russian, etc.). These are generic language dictionaries; they contain between 100,000 and 200,000 entries.

Vertical dictionaries apply to special professions, and in the toolkit they can be treated as extensions to the Language dictionaries, though they can even be used when no Language dictionary is specified.

The Capture SDK is delivered with 9 different Vertical dictionaries for three professions (financial, medical, and legal) in four languages (English, German, French, and Dutch).

Specifying the Spelling language (Language dictionary) and/or a Vertical dictionary is page-level setting. Once a Language dictionary has been specified, the language checking will be applied to all zones on the page, unless their IG_REC_ZCF_LANGDICT_PROHIBIT flag is set.

Similarly, once a Vertical dictionary has been specified, the vertical language checking will be applied to all zones on the page, unless their IG_REC_ZCF_VERTDICT_PROHIBIT flag is set.

Available vertical dictionaries can be enquired using IG_REC_vertical_dict_available_count_get(), IG_REC_vertical_dict_available_desc_len_get(), and IG_REC_vertical_dict_available_desc_get() functions.

This topic provides information about the following:

Example: Recognizing Dutch Legal Texts

C
Copy Code
AT_ERRCOUNT nErrCount;
char legaldut[] = "Dutch Legal Dictionary";
nErrCount = IG_REC_spelling_language_set(IG_REC_LANG_DUT);
nErrCount = IG_REC_vertical_dict_enable(legaldut);

Enabling Spell Checking

In addition to enabling the Checking Subsystem (as explained in Improve Accuracy with Checking), you also need to specifically enable spell checking.

The spelling languages available in the current recognition engine configuration can be enumerated with the IG_REC_spelling_language_first_get() / IG_REC_spelling_language_next_get() function pair and the IG_REC_vertical_dict_available_count_get(), IG_REC_vertical_dict_available_desc_len_get(), IG_REC_vertical_dict_available_desc_get() functions. The application can specify a language setting as the spelling language, valid for the next page or pages with the IG_REC_spelling_language_set() subroutine.

Additionally, vertical language checking can also be activated when one of the Vertical dictionaries (e.g., "Dutch Legal Dictionary") has been set through the IG_REC_vertical_dict_enable () call.

Configuring English Spell Checking

C
Copy Code
AT_ERRCOUNT nErrCount;
nErrCount = IG_REC_spelling_is_enabled_set(TRUE);
nErrCount = IG_REC_correction_is_enabled_set(TRUE);
nErrCount = IG_REC_spelling_language_set(IG_REC_LANG_ENG);

When the spelling language is set to IG_REC_LANG_NO, or when it specifies a language for which there is no Language dictionary, the language checking will not be activated for the zones of the page.

Configuring Automatic Language Selection

In the special (default) case, when the specified Spelling language is set to IG_REC_LANG_AUTO, the language checking will be performed based on the recognition language selection ( IG_REC_languages_set() ) as follows: