Identify

For page identification purposes, creates page variables whose values reflect the most closely matching layout template in the Fingerprint database for the current page.

Important: These actions are technology preview code. Preview code is not intended for use in production; you use this code as is and without IBM support. If you use any preview code in your application, you might need to make updates to your application in later Datacap releases. Report any issues with the ClassifyLayout preview code on the Datacap developerWorks forum.

Member of namespace

ClassifyLayout

Syntax

bool Identify()

Returns

True if the action completes without errors. Otherwise, if the action is called for an object other than a page object or if an internal error occurs, the action returns False.

Level

Page level.

Details

Use this action to search the previously learned layout templates to find the closest match to the current page layout. The layout must contain a title in order for matching to succeed. If a similar layout is found, the following page variables are set:
Page variable Variable value
acidType

The associated page type of the most closely matching layout template.

acidPageNo

The page number of the most closely matching template. For example, if the most closely matching template was for the second page of a three page document, the acidPageNo value is “2/3”. If the most closely matching template has no associated page number, the acidPageNo value is “0/0”.

acidTitle

The page title, if any, of the most closely matching template.

Before you call this action, you must call an OCR action that produces an XML layout file for the current page. Two examples of such actions are the Recognize actions in the OCR_A and OCR_S libraries.

Example
// Mandatory prerequisite: An action that performs OCR for the page
// The OCR action must create an XML layout file (such as OCR_SR/recognize or OCR_A/recognize)
Recognize()

// Identify page type
Identify()

// Optionally copy the acidType field value as the page type
rrSet("acidType", "Page type")