This callback function has been deprecated and will be removed from the public API in a future release.
Declaration:
Copy Code | |
---|---|
DWORD ACCUAPI FNIG_REC_WORD_CHECK( int nZone, LPCWSTR pTobechecked, enumIGRecCheckWordReturnCode* pOpinion, void* pReserved ); |
Arguments:
Name | Type | Description |
nZone | int | Zone list index of the zone containing the string to be checked. |
pTobechecked | LPCWSTR | UNICODE string (or line) to be checked by the function. |
pOpinion | enumIGRecCheckWordReturnCode* | Pointer to variable to hold the returned value. |
pReserved | void* | Internal use only. |
Return Value:
IGE_REC_EXT_OK. This callback function should always return with this value.Supported Raster Image Formats:
See IG_REC_image_import.
Remarks:
The user-written checking callback function.
The FNIG_REC_WORD_CHECK callback function allows user-written checking of recognition results. It gives the application the ability to influence recognition results at the zone level. This checking can be called back by some recognition modules (MOR, MAT) through the checking subsystem during the recognition of a particular zone. The value returned in the pOpinion parameter can influence a recognition module decision about the recognized result. It is the task of the function to check the pTobechecked UNICODE recognized string and to decide whether it is acceptable for that zone. The pOpinion parameter of the function should make a judgment on the acceptability of the recognized string through one of the enumIGRecCheckWordReturnCode values.
To use user-written checking for a zone:
- The address of a user-written checking function should be specified in the zone's CheckWordCB field.
- The zone's IG_REC_ZCF_CHECKCBF_PROHIBIT flag must be off.
- The checking module must be enabled (see IG_REC_spelling_is_enabled_set).
The following are some examples where the enumIGRecCheckWordReturnCode value is to be returned by the integrating application:
- If the zone to be recognized and checked is allowed to contain digits and only certain values are allowed, and the application can confirm that the recognized text fulfills the requirement of a pre-defined check-digit algorithm assigned to the zone, the function is to return IG_REC_CW_SURE.
- If the text from the same zone fails to fulfill any of these strict requirements, the function is to return IG_REC_CW_IMPOSSIBLE.
- If the zone has a requirement "digits only" but no further strict ones (e.g., check-digit ones), then - if the application determines that the recognized text contains digits only - it is to return IG_REC_CW_POSSIBLE.
- If the zone has a requirement "digits only" but no further strict ones (e.g., check-digit ones), then - if the application determines that the recognized text contains digits plus some punctuation (e.g., a comma or period) - it is to return IG_REC_CW_UNLIKELY.
The callback function should not contain calls to any IG_REC_... functions.