Recognize

Recognizes the internal content of a document or page, and saves the resulting data for use by subsequent activities.

Remarks

This activity detects and reads the presentation elements which convey information in a document, such as text segments, barcodes, lines, check boxes, and other shapes. The resulting character data and layout information is saved on the Batch Folder or Batch Page object being processed, where it is available to subsequent activities which depend on recognition results.

Recognize should be executed in a Batch Process after any permanent image cleanup has been applied, and before any activities which depend on recognition output. (See further discussion below.) It can be executed at the page level or at the folder level.

Page-Level Operation

When executed at the page level, recognizes one page at a time. If the input page has PDF content (i.e. was created by splitting a PDF document), then the page will be handled as a PDF page for the purposes of native text extraction. Otherwise, the page will be processed as an image, and text extraction will be purely OCR-based.

Page-level processing is the preferred operating mode in many cases, as it maximizes the benefits from parallel processing.

Folder-Level Operation

When executed at the folder level, recognizes all pages of a multipage document at once. The input folder must have a PDF or image-based document attached. To recognize other document formats such as Microsoft Word, HTML, and etc., use the Render activity to generate a PDF version prior to executing this activity.

Due to the CPU-intensive nature of recognition, folder-level processing may be unsuitable for large documents. For example, a single task running recognition on a 1000-page document could take 20 minutes to complete. This can result in long-running tasks which appear hung and services which are difficult to start and stop. In such cases, split the document into pages (see Content Action) and run recognition at the page level.

Activities Depending on Recognize

Any activity which accesses the internal content of a document will require recognition results in order to function properly. The following are specific examples of cases where other activities depend on the output from Recognize:

Inherits from: Unattended Activity

Properties

The following 9 properties are defined.

Property Name Description
General
OCR Profile Type: OCR Profile

Specifies the OCR Profile to be used for text recognition. The OCR Profile specified here is used to perform full-page OCR, and to detect layout objects such as lines, check boxes, barcodes, and shapes.

The IP Profile assigned to the OCR Profile should include IP Commands which detect the set of layout objects needed for data extraction. See the 'Layout Detection Summary' property for more information.

Page Filter Type: String

Restricts recognition to specific page numbers. If this value is blank, recognition will be performed on all pages. Otherwise, recognition will only be performed on pages specified in the filter.

Layout Detection Summary Type: String

Summarizes the non-text features to be detected based on the configured OCR Profile. Layout Data is information describing the non-text elements of a page, such as lines, check boxes, barcodes, and shapes. It is important to capture and save layout data in cases where data extraction logic relies on the location of these elements.

Layout Data is generated when the OCR Profile is configured with an IP Profile containing certain IP Commands. For example, Line Detection, Line Removal, Box Detection, Box Removal, Barcode Detection, Barcode Removal, Shape Detection, and Shape Removal are all examples of commands which generate layout data. Generally speaking, it is best to use the dropout flavor of these commands during pre-OCR image processing.

PDF Options
Native Text Extraction Type: TextExtractMode, Default: Full

Specifies how text should be extracted from PDF files. Can be one of the following values:

  • Full - Native text segments and form fields will be extracted.
  • Simple - Only native text segments will be extracted.
  • None - No effort will be made to read native text segments. PDF pages will be treated as images and processed through OCR.
When enabled, reads native PDF text segments directly, rather than through OCR. In applicable use cases, this mechanism delivers 100% accurate character extraction, avoiding the uncertainty of OCR.

Note that the text extraction process operates against all text objects drawn on the page - whether they are actually visible or not. Unexpected results can occur when the input document contains text drawn transparently or behind other objects.

This setting is only applicable if the input is PDF content. When running at the folder level, this means that the input document must be a native PDF document, or must have a PDF version generated by the Render activity. When running at the page level, this means that the page object must have been created by splitting a PDF document.

OCR Assist Type: OcrAssistMode, Default: Auto

Specifies the extent to which OCR will be used in conjunction with Native Text Extraction. Can be one of the following values:

  • Auto - OCR will be applied selectively to PDF pages which contain images, text annotations, or other features requiring OCR.
  • Always - OCR will be performed on all PDF pages.
  • None - No OCR will be performed on PDF pages. Use this mode if processing documents which are 100% text-based PDF files.
It is common for PDF pages to be constructed from mixed content, where information is presented as a combination of native text, text annotations, and/or text drawn on images. In these cases, OCR Assist supplements the native text extraction using OCR. OCR results obtained through this process are combined with the native text segments to produce a complete output document.

Alternate IP Type: IP Profile

An optional IP Profile used for detecting layout elements on PDF pages, in cases where OCR will not be used. The IP Profile specified here should contain IP Commands such as Line Detection, Box Detection, Barcode Detection, and Shape Detection. This IP Profile is used for detection purposes only, and the output image will be discarded.

Processing Options
Error Disposition Type: IssueDisposition, Default: Flag, Log

Determines what happens when an error occurs processing an activity.

Maximum Consecutive Errors Type: Int32, Default: 0

The maximum number of consecutive errors, after which a critical stop will be raised. A critical stop will cause services to stop running.

Concurrency Mode Type: ConcurrencyMode, Default: Multiple

Specifies the parallel processing mode for this activity. Can be one of the following values:

  • Multiple - Multiple instances can run concurrently.
  • PerMachine - Only a single instance can run per machine.
  • Single - Only a single instance can run per Grooper repository.
This value determines the type of Thread Pool on which the activity can be executed.

See Also

IP Profile, OCR Profile

Used By

Batch Folder - Apply Activity, Batch Process Step