ImageGear for C and C++ on Windows v19.1 - Updated
IG_REC_correction_is_enabled_set
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Spelling Settings Functions > IG_REC_correction_is_enabled_set

Enables or disables the Correction mode setting of the checking subsystem.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_correction_is_enabled_set(
   AT_BOOL bCorrection
);

Arguments:

Name Type Description
bCorrection AT_BOOL Set to TRUE to enable correction.

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;
AT_BOOL bIsCorrectionEnabled = FALSE;
ErrCount = IG_REC_correction_is_enabled_get(&bIsCorrectionEnabled);

Remarks:

If this mode is enabled, non-compliant words may be automatically corrected during recognition. The Correction mode is a page-level setting; i.e., when it is enabled, it will be applied to all zones of the page for which at least one of the three possible checking algorithms have been enabled.

The application should call this (and other checking-related functions) BEFORE calling the IG_REC_image_recognize function.

If bCorrection is FALSE, non-compliant words will be flagged, but no auto-correction will be done. If bCorrection is TRUE, all unchanged non-compliant words will be flagged, while some characters may also be changed by the checking subsystem.

Though the Correction mode is a page-level setting, it can be disabled for any particular zone by setting the IG_REC_ZCF_CORRECTION_DISABLE flag of the zone's Checking field.

You can control whether the correction feature should ignore or handle proper names. Enabling the zone-level IG_REC_ZCF_CORRECT_PROPERNAME flag allows words after the first in a sentence beginning with an uppercase letter to be checked, and if necessary flagged or changed. Disabling the flag, which is the default, means such words (typically but not always proper names) will not be checked or changed.

The correction feature will construct possible solutions from two sources only: any second or third character guesses for the characters in the word or character-pair solutions in the TEV.SZO file, designed to handle typical OCR-misrecognitions. These solutions are passed to the checking subsystem, which may result in a refused word being changed.

If this function is not called to specify the Correction mode, the default value of TRUE is applied, i.e., auto-correction is enabled.