Creates a listing of the available Spelling languages (together with the IG_REC_spelling_language_next_get function).
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_spelling_language_first_get( enumIGRecLanguages * pLang ); |
Arguments:
pLang | Address of a variable to get the first language. |
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.
Remarks:
This function returns with the enumIGRecLanguages language identifier of the first Spelling language available for the current recognition engine configuration.
- The content of the resulting list depends on the configuration of the recognition engine, i.e., the presence of the Language dictionary files in the Recognition Binary directory. For the list of the supported languages, see the specification (Language Dictionary List topic)
- When there is no available Spelling language (e.g., if the Binary directory does not contain any language dictionary file at all), the warning IGW_LAST_ITEM_REACHED is added to the warning stack. Function IG_warning_check() returns non-zero value in this case, signaling that the list is complete.
Example:
Copy Code | |
---|---|
AT_ERRCOUNT ErrCount = 0; HIG_REC_IMAGE higRecImage = 0; HIGEAR higImage = 0; enumIGRecLanguages eLang = IG_REC_LANG_NO; 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_spelling_language_set(IG_REC_LANG_GER); ErrCount += IG_REC_spelling_language_first_get(&eLang); ErrCount += IG_REC_image_recognize(higRecImage); //... ErrCount += IG_REC_image_delete(higRecImage); ErrCount += IG_image_delete(higImage); |