Specifies the Spelling language for the language checking of the checking subsystem.
Declaration:
|
Copy Code |
AT_ERRCOUNT ACCUAPI IG_REC_spelling_language_set(
enumIGRecLanguages Lang
);
|
Arguments:
Name |
Type |
Description |
Lang |
enumIGRecLanguages |
Identifier of the Spelling language to be set. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
This function does not process image pixels.
Example:
|
Copy Code |
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;
ErrCount += IG_load_file("Image.tif", &higImage);
ErrCount += IG_REC_image_import(higImage, &higRecImage);
//...
ErrCount += IG_REC_spelling_is_enabled_set(TRUE);
ErrCount += IG_REC_correction_is_enabled_set(TRUE);
ErrCount += IG_REC_spelling_language_set(IG_REC_LANG_ENG);
ErrCount += IG_REC_image_recognize(higRecImage);
//...
ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);
|
Remarks:
- Spelling language is a page-level setting. Once spell checking is specified, it is applied to all zones on the page, except in zones with their IG_REC_ZCF_LANGDICT_PROHIBIT flag set. This is useful for excluding zones containing mostly proper names or text in a different language.
- When the SpellLang parameter is IG_REC_LANG_NO, or if it specifies a language for which there is no language dictionary available, the language checking won't be activated during recognition.
- When the SpellLang parameter is set to IG_REC_LANG_AUTO, the language checking will be performed according to the actual recognition language selection (IG_REC_languages_set) as follows:
- If the recognition language selection is empty, there won't be language checking.
- If one language has been set for the Language environment of the Character Set, that language will be automatically selected for language checking assuming that the appropriate Language dictionary is available.
- If two or more languages are selected for recognition, language checking will be done for all selected languages for which a Language dictionary is available.
- The available spelling languages can be enumerated through the IG_REC_spelling_language_first_get and IG_REC_spelling_language_next_get functions. They will enumerate those dictionaries present in the Recognition Binary directory.
- The application should call this (and other checking-related functions) BEFORE calling the IG_REC_image_recognize function.
- If this function is not called to specify the Spelling language, the default value of IG_REC_LANG_AUTO is applied.