Gets all word suggestions for the recognized data of the specified image.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_REC_word_suggestions_get( HIG_REC_IMAGE hImage, AT_WCHAR *** lplplpSuggestions, LPAT_INT lpSuggestionsCount ); |
Arguments:
hImage | Image handle. |
lplplpSuggestions | Pointer to an array of AT_WCHAR strings, to receive the array of word suggestions. The array and the strings are be allocated by the toolkit. |
lpSuggestionsCount | Pointer to a variable to return the total number of suggestions in the array. You shall pass this count to IG_REC_wstring_array_free to properly free the array. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.Supported Raster Image Formats:
See IG_REC_image_import.
Remarks:
This function gets an array of wide char strings containing all word suggestions for the specified image. Each string contains one suggestion. Word suggestions for each letter are stored consecutively in the array.
In the array of recognized letters, the first letter of each word may point to one or more word suggestions for this word. The AT_REC_LETTER structure contains WordSuggestionIndex and WordSuggestionsCount fields, which specify the index of the first word suggestion string in the array returned by IG_REC_word_suggestions_get, and the number of alternative suggestions.
The function can be called after a successful IG_REC_recognize call.
Use IG_REC_wstring_array_free to free the array when it is no longer needed.
Example:
Copy Code | |
---|---|
AT_ERRCOUNT ErrCount = 0; HIGEAR higImage = 0; HIG_REC_IMAGE higRecImage = 0; AT_WCHAR** lplpWords = 0; AT_INT iWordCount = 0; ErrCount += IG_load_file("Multipage.tif", &higImage); ErrCount += IG_REC_image_import(higImage, &higRecImage); ErrCount += IG_REC_zones_locate(higRecImage, NULL); ErrCount += IG_REC_image_recognize(higRecImage); //... ErrCount += IG_REC_word_suggestions_get(higRecImage, &lplpWords, &iWordCount); ErrCount += IG_REC_wstring_array_free(lplpWords, iWordCount); //... ErrCount += IG_REC_image_delete(higRecImage); ErrCount += IG_image_delete(higImage); |