Defining the blacklist of characters
Contents
[
Hide
]
Image defects such as dirt and scratches may cause recognition errors. For example, dots or other print defects next to letters can be incorrectly recognized as punctuation or diacritical marks.
To ignore certain characters during recognition, provide them in setIgnoredCharacters
method of recognition settings object as a case-sensitive string:
AsposeOCR api = new AsposeOCR();
RecognitionSettings recognitionSettings = new RecognitionSettings();
recognitionSettings.setIgnoredCharacters("Áá");
RecognitionResult result = api.RecognizePage("source.png", recognitionSettings);
System.out.println("Recognition result:\n" + result.recognitionText + "\n\n");