Introducing ABBYY FlexiLayout Studio

About ABBYY FlexiLayout" Studio

Capturing data from unstructured documents

Creating a FlexiLayout


About ABBYY FlexiLayout™ Studio

ABBYY FlexiLayout Studio is a software application that allows you to create formalized descriptions (FlexiLayouts) of documents with variable layouts (so-called semi-structured documents). The created FlexiLayouts are then used by documents processing applications to capture data from the documents which they describe. FlexiLayout Studio is built on ABBYY’s groundbreaking IPA technology which imitates the way living beings recognize objects.

Semi-structured documents are different from fixed documents in that the exact location of the fields on such documents is not known in advance. For this reason, a data capture application needs additional information about the data fields in order to locate them on the documents and read the information they contain. ABBYY’s FlexiLayout technology allows you to create formalized descriptions which tell the data capture program how and where to find particular fields. Used in conjunction with a data capture application, e.g. ABBYY FlexiCapture, ABBYY FlexiLayout Studio will allow you to automate capturing data from such semi-structured documents as invoices, order forms, and many others.

ABBYY FlexiLayout Studio allows you to describe the layouts of simple and complex documents quickly and easily.

Used in conjunction with a documents processing solution built on ABBYY FlexiCapture technology, FlexiLayout Studio allows you to capture data from unstructured documents such as invoices, waybills, headers of incoming documents, etc.


Capturing data from unstructured documents

A document includes fields to be filled in by hand or by means of a printing device. Documents may have one or more pages.

Documents can be divided into 'fixed' and 'semi-structured' documents. In the case of 'fixed' documents, the identical fields have exactly the same locations on all the documents in a batch. Fixed documents can be processed by means of documents processing applications which read information from the data fields and export it into database, document management systems, or archiving applications. Data are captured for such documents by means of Document Definition, which describes the locations of the fields and the type of information they may contain. One and the same Document Definition is used to capture data from all the documents in a given batch. It tells the documents processing application where to look for specific data on a document and how to make sure that the data have been captured correctly.

In the case of 'semi-structured' documents, the locations of identical data fields vary from one document to another. Additionally, not all fields may be present on all of the documents in a batch (e.g. one some documents may contain a signature field while others may not). A good example of a semi-structured document are various payment documents.

Letters, registration forms and legal documents are another good example of semi-structured documents. Documents of the same type will have similar structures but their may still be discrepancies among their fields. For example, letters will contain the name and address of the sender at the top of the page, legal documents will contain the names of the parties and their details, the effective date, etc.

Since the exact location of fields on semi-structured documents is not known in advance, data cannot be captured from such documents by means of a Document Definition. This means that traditional data capture systems cannot extract data from such documents.

ABBYY FlexiLayout Studio allows you to formally describe unstructured documents and provide the program with a search algorithm, enabling it to find data fields and extract information from these fields. A formal description relies on mutual relationships among the fields on an unstructured document and the nature of the data within the fields. Created descriptions can be tested on document images to make sure that information can be reliably extracted.

Formalized descriptions created by means of ABBYY FlexiLayout Studio are called FlexiLayouts. In order to start capturing data from unstructured documents by means of a FlexiLayout, you must export it into a data capture application such as ABBYY FlexiCapture. ABBYY FlexiCapture technology offers a wide range of data capture capabilities, enabling you to process practically any type of document.


Creating a FlexiLayout

A FlexiLayout is a formalized description of a set of unstructured documents which enables a data capture application to locate data fields on the documents and extract information from these fields.

For each object or a group of objects which must be detected on a document image a FlexiLayout element is created. The properties of the element describe the properties of the corresponding object. Thus the element will tell the program whether the object to look for is a picture, a text fragment or a barcode, how large it is and where it is most likely to be found on a document image.

A FlexiLayout block tells the program where to look for objects from which data must be captured. Block coordinates may be specified directly or by means of elements.

ABBYY FlexiLayout Studio offers a user-friendly visual interface which allows you to create FlexiLayouts consisting of elements and blocks. However, FlexiLayout creation requires a certain degree of creativity, as one and the same object can often be detected in more than one way, and the user must decide on which detection strategy to use.

FlexiLayout creation consists of the following stages:

Creating a FlexiLayout Studio project

A project is a file which contains all the FlexiLayout data. It records the formalized description of the layout and is used for compiling and testing the FlexiLayout.

More...

Creating a batch of document images

A batch is a set of sample document images which must be representative of the entire batch of documents which are to be processed.

More...

Pre-recognition

Pre-recognition is a process whereby ABBYY FlexiLayout Studio detects atomic objects on an image, such as text fragments, separators, check boxes, etc. Pre-recognition gives you an idea of what you can look for on the documents in a batch.

More...

Analyzing pre-recognition results

Once a document has been pre-recognized, you need to analyze it in order to find objects which can be reliable detected on all of the documents in the batch. Here is what you should look for:

·Objects which are located in exactly the same place on all of the documents (these can be logos, headers, titles and similar objects);

·Objects which have been reliably recognized and which are present on all of the document images;

·Objects which are almost unaffected by the quality of printing or scanning;

If there is a sufficient number of such objects, you can describe the locations of all the other objects on the documents relative to these objects. At this stage you can also select the best way to look for a particular object on the document.

More...

Creating FlexiLayout elements and blocks

First you need to create elements for objects which can be detected without resorting to other objects on the document (for example, a title or another text fragment which occurs on each document). Then the locations of the other objects are described relative to already created elements. The FlexiLayout elements will form a tree of elements - from the most reliable objects to the least reliable.

If the document contains objects which distinguish one set of documents from the other sets, elements for such objects should be created first. These objects will be used as identifiers so that FlexiLayouts created for one set of documents are not matched with the documents from another set by mistake. This will speed up documents processing and make data capture more reliable.

Only the user can decide which elements and blocks must be created first. However we recommend testing the FlexiLayout after each new element or block has been created to make sure that the new element can indeed be used to detect the object it describes on all of the sample images.

It can be useful to visually divide the document into several logical parts and sequentially describe image objects of each part. This will facilitate further debugging of the FlexiLayout.

More...

Compiling the FlexiLayout

When you build a FlexiLayout, the program checks its logic and consistency.

More...

Testing the FlexiLayout by matching it with document images and testing it

In order to test your FlexiLayout you need to try matching it with sample document images. The FlexiLayout must not only match all of the sample images, but also enable the program to detect the corresponding objects correctly. We recommend testing your FlexiLayouts after each new element or block has been added to it. It is much easier to detect errors in the FlexiLayout at this stage than in a complete FlexiLayout, particularly if your documents have sophisticated layouts.

More...

Exporting the FlexiLayout

Once the FlexiLayout is complete, it must can be exported from ABBYY FlexiLayout Studio and imported into a data capture application.

More...


What's New In ABBYY FlexiLayout Studio 12

Advanced classification based on images and text

galochka

ABBYY FlexiLayout Studio 12 contains image- and text-based classification technologies, enabling you to optimize your enterprise content management processes. The image-based classification technology uses convolutional neural networks are used to detect the type of each incoming document. The text-based classification technology uses statistical and semantic analysis. Users can use either technology or a combination of both.

Classification

Ability to protect your FlexiLayouts and classifiers from unauthorized use

galochka

You can protect any FlexiLayouts or classifiers you have created from unauthorized use, so that no one will be able to edit, use, or provide support for these FlexiLayouts without a license.

Protecting FlexiLayouts and classifiers from unauthorized use

Ability to pass named parameters to FlexiLayouts

galochka

ABBYY FlexiLayout Studio 12 allows you to specify input and output parameters for a FlexiLayout. When applying a FlexiLayout, its output parameters are passed on to all additional and trained FlexiLayouts that are allowed to accept them as input.

Named parameters can be used, for example, to check if certain data are present or to modify field detection algorithms. For example, fields may be detected using databases which must be selected based on the type of the batch at hand. Now you can pass the required batch type from a batch registration parameter to a named FlexiLayout parameter.

Named parameters

Improved field search algorithm for repeating groups

galochka

The algorithm used for detecting repeating group fields has been improved. Now you can search for fields of a repeating group instance in the region of the preceding instance. This is useful for extraction of skewed lines. In the previous versions of the program, the region of the preceding instance was excluded from the search area of the current region.

Repeating Group

Document filtering

galochka

When working with a large number of documents, you may need to display only some of them.

ABBYY FlexiLayout Studio 12 allows you to filter documents based on various parameters. The filter is invoked by right-clicking a column in the list of documents.

Batch window

Backing up FlexiLayouts and classifiers

galochka

Now you can back up a project and restore a FlexiLayout or classifier from the backup copy.

Backing up FlexiLayouts

Support for documents in popular office formats

galochka

Besides PDF files, ABBYY FlexiLayout Studio allows you to add and process documents in other popular office formats.

Supported formats

Main and additional FlexiLayouts

galochka

In ABBYY FlexiCapture 12, you can now use a main FlexiLayout and any number of additional FlexiLayouts.

Creating a Document Definition based on a flexible description


Installing, running, and removing ABBYY FlexiLayout™ Studio

Navigation: »No topics above this level«

Return to chapter overview

Installing, running, and removing ABBYY FlexiLayout™ Studio 12

ABBYY FlexiLayout Studio is installed and removed together with ABBYY FlexiCapture.

To run ABBYY FlexiLayout Studio select:

·Start → All Programs → ABBYY FlexiCapture 12 → Tools → FlexiLayout Studio for Standalone version;

·Start → All Programs → ABBYY FlexiCapture 12 Stations → Tools → FlexiLayout Studio for Distributed version.

note Note.For Windows 10 the path is Start → All Programs → ABBYY FlexiCapture 12 / ABBYY FlexiCapture 12 Stations → FlexiLayout Studio.

warning Important!A protection key is required for the correct operation of ABBYY FlexiLayout Studio. Make sure that your protection key is installed before running the program. Otherwise the program won't start.

As in the standard package ABBYY FlexiLayout Studio is supplied together with ABBYY FlexiCapture, you should use the same protection key for working with ABBYY FlexiLayout Studio as for ABBYY FlexiCapture.


ABBYY FlexiLayout™ Studio interface

The GUI of ABBYY FlexiLayout Studio allows you to create FlexiLayout elements and blocks, specify and adjust their properties, and view the results of matching your newly created FlexiLayout with document images.

Please note that the layout of the main window in the figure above may differ from the layout on your screen. You can customize the view of the main window by clicking the title bar of a window or the border of a toolbar and dragging it to a desired location. Selecting View → Status Bar toggles the status bar at the bottom of the window.

Right-clicking inside a window displays the corresponding shortcut menu.


Batch window

Show/Hide Hidden Text

The Batch window contains a table of images collected for the purpose of creating or fine-tuning a FlexiLayout.

The table's columns contain information about the operations performed on each image.

Working with multiple batches

warning Important!The same FlexiLayout/Classifier is used for all the images in all the batches in the project.

ABBYY FlexiLayout Studio lets you work with multiple batches within one project. This lets you put images from different sources into groups and work with each group separately.

By default, every new project contains one batch. You can add, remove, and edit batches, provided that there remains at least one batch in the project.

How to create and edit a batch

To create a new batch or edit an existing one, open the Batches dialog box by clicking Batches... on the Batch menu or by clicking the Batches button in the Batch pane. The Batches dialog box contains a list of all existing batches and the following information about each batch:

·Name – the name of the batch

·Path – the name of the folder that contains information about the batch (the full path to this folder is indicated in the batch properties)

·Comment – user comments

·Total Pages – the number of pages in the batch

·Created – the date and time when the batch was created

·Modified – the date and time when the last change to the batch was made

Batch properties

To open the properties dialog box of a batch, click the Edit button.

The General tab contains the following information:

·Name – the name of the batch

·Comment – user comments

·Batch path – full path to the folder that contains all information about the batch (this path can be copied to the Clipboard)

·Pre-recognition – pre-recognition parameters of the batch

note Note.By default, project settings are applied to all the batches in the project.

Batches can also have named parameters, which you can create and edit on the Named parameters tab of the properties dialog of a batch.

Managing batches

You can switch between batches using the drop-down list in the Batch pane or by selecting a batch in the Batches dialog box.

You can also move images from one batch to another. To do so, right-click an image and select Move Pages to Batch... on the shortcut menu or click Move Selected Pages to Another Batch on the Batch menu.

Shortcut menu commands for FlexiLayouts

Right-clicking the title of the window ("Batch") brings up a shortcut menu that can be used for adjusting the width of table columns and to display or hide columns.

·Fit Column Width fits the width of the column to the longest field.

·Fit All Columns Width fits the width of each column to the width of the longest field it contains.

The shortcut menu also displays all of the available properties of the pages contained in the batch.

·Use for Training indicates whether or not the page is used for training.

·Page No. shows the page number.

·Analyzed indicates whether or not a FlexiLayout has been applied to the page.

·Reference Alternative shows reference FlexiLayout alternative.

·Matched Alternative shows the name of the FlexiLayout applied to the page.

·Excess Areas shows the ratio (in percent) of the total area of blocks that were found when the FlexiLayout was applied but are not present in the reference layout to the total area of all blocks in the reference layout.

·Missing Areas shows the ratio (in percent) of the total area of reference layout blocks that were not found on the image when the FlexiLayout was applied to the total area of all blocks in the reference layout.

·Match Quality – the ratio (in percent) of all fields for which the applied region matches the reference region by more than 90%; this is a measure of how well the FlexiLayout matches the page. For text blocks, the percentage is calculated based on the number of correctly found characters. For all other fields, the percentage is calculated based on the area of the corresponding recognition objects.

·Comment shows the comment added for the image.

·Pre-recognized indicates whether or not pre-recognition was performed.

·Has source PDF indicates whether or not the text layer should be used.

·Reference Document Number shows the number of the document to which the page must be assigned according to the reference assembly.

·Reference Sequence Number shows the number of the page in the document that must be assigned to it based on the reference assembly. The number is followed by an (H) if a Header element must occur on the page, or by an (F) if a Footer element must occur on the page.

·Matched Document Number shows the number of the document to which the page was assigned when the FlexiLayout was applied.

·Matched Sequence Number shows the number that was assigned to the page when the FlexiLayout was applied. The number is followed by an (H) if a Header element was found on the page and an (F) if a Footer element was found on the page.

·Source shows the path to the image source file.

·Set Filter filters pages by column values. The name of the column whose values are used as filtering criteria will be marked with [image] . Not all columns may be used for filtering. To reset the filter, right click the name of the column and select Reset filter on the shortcut menu.

note Note.Several values and/or columns can be used as filtering criteria, in which case pages that do not satisfy at least one criterion will be hidden. This feature is available for Analyzed, Reference Alternative, Matched Alternative, Reference Document Number, Reference Sequence Number, Matched Document Number, Matched Sequence Number, and Source.

·Training Layout State indicates how well the document matches the FlexiLayout, making it easier to find pages that were not completely marked up, e.g. when the document contains a different set of fields and reference elements. The Training Layout State item is only available in training mode and will only display the state of pages from training sets.

o No elements marked — No elements marked: no fields or reference elements are marked on the page.

o Has unmarked elements — Has unmarked elements: the page contains unmarked fields and/or reference elements; some unmarked elements have not been classified as missing.

o Has unmarked required element — Has unmarked required element: a required element has not been marked on the page.

o All elements marked — All elements marked: all elements have been marked; unmarked elements have been classified as missing.

o No reference class set — No reference class set: no reference class has been specified for a training page.
Shortcut menu commands for the classifier

·Fit Column Width fits the width of the column to the longest field.

·Fit All Columns Width fits the width of every column to the width of the longest field it contains.

·Use for Training indicates whether or not the page is used for training.

·Page No. shows the page number.

·Classification Fidelity indicates whether or not the value in the Classification Result column matches the value in the Reference Class column.

·Reference Class shows the reference classification result.

·Classification Result shows the classification result (text string).

·Comment shows the comment added for the image.

·Pre-recognized indicates whether pre-recognition was performed.

·Source shows the path to the image's source file.

·Set Filter filters pages by column values. The name of the column whose values are used as filtering criteria will be marked with [image] . Not all columns may be used for filtering. To reset the filter, right click the name of the column and select Reset filter on the shortcut menu.

note Note.Several values and/or columns can be used as filtering criteria, in which case pages that do not satisfy at least one criterion will be hidden. This feature is available for Classification Fidelity, Reference Class, Classification Result, and Source.
Width settings and hiding columns

You can choose to display a column or hide it by clicking its name in the shortcut menu. A flag is displayed next to the names of visible columns. The batch window must contain at least one visible column, and the last visible column cannot be hidden.

The width and location of a column can also be changed using the mouse. To change the width, drag the column's edge until it is of the desired width. If you change the column's width to 0, it becomes hidden.

note Note.The contents of the shortcut menu may differ depending on the situation. For example, if the Allow multipage documents parameter in the FlexiLayout properties is set to false, the commands related to multipage documents will not be available on the shortcut menu. If a project has only one alternative, the Match Selected Alternative item will not be available on the shortcut menu.
Tooltips

A tooltip is a small window that appears when you position the mouse pointer over an element of the graphical user interface and contains a brief description of the element. The tooltip of an interface element can change. For example, the tooltip for the [image] icon in the Analyzed column can be either "Matching assembling differs from etalon" or "Matched with no reference alternative" depending on the state of the page.

note Note.You can read more about the commands in the shortcut menu of batches in the Image shortcut menu article.


FlexiLayout window

The FlexiLayout window displays the tree-like diagram of the current FlexiLayout. The tree has the following branches:

·Blocks, in which blocks are located

·SearchElements, in which elements are located. A tree may contain several branches of this type, each corresponding to a layout alternative.

Blocks and elements may be grouped together, forming new nesting levels.

You can move (drag-and-drop) and copy (Ctrl + drag-and-drop) elements and blocks in the tree.


Classifier window

The Classifier window displays the list of created classes (the Classes group) and the classification structure in the form of a tree-like diagram. The root folder of the tree corresponds to the classifier in its entirety.

Each node in the tree corresponds to a classification stage. A node contains a group identifier element (named Id by default) and nested nodes. Depth of nesting is not limited.

You can move (drag-and-drop) and copy (Ctrl + drag-and-drop) classification stages in the tree.

See more:

Classification


Properties window

Show/Hide Hidden Text

The Properties pane contains information about the currently selected element. This can be a page, tree node, or a marked-up element of an image. You can edit a parameter displayed in this pane by clicking its value in the Value column. The way the value is edited varies between different types of parameters.

Uneditable parameters

The values of these parameters cannot be changed in the Properties pane. They are displayed in gray and can only be selected and copied. Uneditable parameters include element types, the number of child elements, and classification statistics.
Sinle-line text

These parameters are edited in a single-line, unconstrained text box. New values will be checked when you try to set them. If the new value is incorrect, an error message will be displayed in the text box, unless you are editing an element's name. Incorrect element names will be replaced with the default value.
Multiple-line text

The text box always contains the first line of a parameter's text. If there is more than one line of text, the [image] button will be displayed in the text box. To edit multiple-line parameters, open the text editor by clicking the [image] button. The value will be set when you click the [image] button again, or when you activate another interface element by clicking it.

Drop-down list

The value of these parameters can be selected from a drop-down list. You can type the value, but it will be ignored if it does not match any of the items in the list.
Complex parameters

Complex parameters are edited by selecting items from a drop-down list. The value of a complex parameter can be made up of several pre-determined values. The text box contains the selected values separated by a vertical line. Values can be typed, and all incorrect values specified in this way will be ignored when the value of the parameter is set.
Integers

Parameters of this type are edited in a text box with buttons for increasing and decreasing the value. Values can be typed, and new values are checked, including a check against a range of acceptable values. A notification will be displayed if a value is incorrect.
Numbers

Parameters of this type are edited in a standard text box. New values are checked, including a check against a range of acceptable values. A notification will be displayed if a value is incorrect.
Percentages

The editor for percentages is the same as the editor for numbers, except the value is always followed by a percent sign.
Distance in custom units

This editor looks exactly the same as the numbers editor. The value will be updated if the measurement unit is changed.
FlexiLayout element

To edit parameters of this type, click the [image] button next to the text box. A dialog box in which you can select a tree node will open. Incorrect element names specified by the user will be ignored.
File

To edit these parameters, click the [image] button next to the text box. A dialog box in which you can select a file will open. Manually specified values are not checked.
Recognition language

Click the [image] button next to the text box to edit parameters of this type. A dialog box in which you can select recognition languages will open. The text box contains languages separated by vertical lines, and you can type the names of languages. Incorrect language names will be ignored.
Fuzzy interval

To edit parameters of this type, open the editor by clicking the [image] button next to the text box. Values can be typed. New values and their formats are not checked. Incorrect values are ignored.
Recognition area

Click the [image] button next to the text box to edit parameters of this type. A dialog in which you can specify recognition area properties will open. Values cannot be typed.
Named parameter

Click the [image] button next to the text box to open the properties dialog box of the FlexiLayout, batch, or page, where you can edit named parameters. For details, see Named parameters.

In most cases all user-specified values will be checked. Incorrect user-specified values are either changed back to the default value or displayed in the text box with an error notification. A separate dialog box with an error message is not displayed in such cases.

Parameters that have no meaning given the current properties of the element will be hidden. For example, the Search text, Database connection string and File name parameters cannot be displayed at the same time. One of these parameters is selected based on the search algorithm specified in the Static Text parameter, and the other two are hidden. The names of child parameters are indented relative to the name of the parent parameter.


Image window

The Image window displays the image of the page selected in the Batch window. The title of the Image window displays the number of the document, the name of alternative layout, the number of the selected page, and the view mode. Additionally, the Header/Footer indicator is displayed, if available for the given page in the current view mode.

The following views are available in the Image window:

·The Matched layout view displays the results of matching the FlexiLayout with sample images. Click [image] on the Layout toolbar to enable this view. Use the arrow to the right to select the objects to be displayed: blocks, elements, or both.

·The Reference layout view displays the reference layout. Click [image] on the Layout toolbar to enable this view.

·The Difference layout view displays the difference between matching the FlexiLayout and matching the reference layout. Click [image] on the Layout toolbar to enable this view.

note Note.The difference between matching the FlexiLayout and matching the reference layout becomes available only after you have created a reference layout.


Hypotheses window

The Hypotheses window displays the tree of hypotheses generated by the program as a result of matching your FlexiLayout with a sample image. The program generates a hypothesis for each of the FlexiLayout elements. The left-hand pane displays the elements in the order in which they occur in the tree. The right-hand pane displays the tree of hypotheses.

The Hypotheses window becomes available after you have matched the FlexiLayout with an image (FlexiLayout → Match). In the Image window, click [image] (Matched layout) on the toolbar to display the Hypotheses window.


Classifier Log window

Navigation: Program interface >

Return to chapter overview

Log window

The Log pane contains the event log for the current project and statistics related to application of FlexiLayouts and classifier performance. The event log contains messages about processes that take some time to complete, such as recognition, application of FlexiLayouts, classifier training and FlexiLayout training. These messages include notifications, warnings and error messages.

Notifications begin with the name of the operation that caused them, and end with a line containing the word "Done". The text of a notification's body is indented relative to the name of the operation. Warnings and error messages begin with an icon, which is followed by the numbers of pages on which the errors occurred, followed by the text of the message.

The Log is displayed automatically when any messages other than notifications about the beginning and completion of operations are added to the event log. You can close the log and open it at any other time by clicking Log on the View menu or pressing Alt + 6.

You can save parts of the log or the entire log by right-clicking inside the Log pane and clicking one of the following items on the shortcut menu:

·Copy Selected Text to copy selected text to the clipboard.

·Export Log to save the entire log as a text file (*.txt).

Log entries and statistics for classification

When a classification task begins, the Classifying pages... notification appears in the event log. This is followed by information about classification results for every page:

·An icon indicating the degree of classification confidence (displayed only for classified pages);

·Page number;

·Status (Classified / Not classified);

·The class or classes of the page as determined by the classifier;

·The reference class;

·Results from an automatic classifier (if an automatic classifier is used).

When a classification task completes, general statistics are added to the event log. This includes the number and percentages of images classified with various degrees of confidence and statistics on images that could not be classified.

·Succeeded indicates that a classification result is a perfect match for a reference value.

note Note.The statistic for successfully processed pages includes pages for which no reference class was specified and no class was determined by the classifier.

·Classified as extra indicates that the only classification result contains a reference class from the Extra classes of this classification result set.

·Fuzzy classified indicates that the classification result contains two or more classes, including the reference class.

·Not classified indicates that the classifier failed to determine the class even though a reference class was specified for the image.

·Wrongly classified indicates that the classification result contains at least one class, but the reference class was either not specified or is different from the classification result.

Log entries and statistics for FlexiLayout application

When the program begins applying a FlexiLayout, the Matching the FlexiLayout... message appears in the event log. This is followed by information about application results:

·An icon indicating the degree of confidence in the FlexiLayout variant detection result.

·The page's number in the batch.

·Status (Matched / Unmatched).

·The name of the applied FlexiLayout variant and the page's number in the document.

·The reference FlexiLayout.

·Image analysis statistics, including the number of blocs detected with various degrees of confidence.
Messages from this group are indented relative to general information about application results.

Event log entries are followed by statistics for all processed pages, grouped by blocks from the FlexiLayout. These statistics include the amount of pages for each block and the numbers of pages on which the block was found with various degrees of confidence.

·Succeeded indicates that the detected block region matches the reference region and recognition objects of the corresponding type also match.

·Fuzzy matched indicates that the detected region of the block largely matches the reference region.

·Wrongly matched indicates that the detected region of the block is largely different from the reference region.

·Not matched indicates that there is a reference region for the block on the image, but no matching region was detected.

·Excessively matched a region was detected for a block even though there is no reference region.

The confidence score of a region match is determined by evaluating how well sets of recognition objects of the same type as the block match each other. The confidence score of a region match for tables is determined based on how well individual cells match.

See more:

listPicture Classification

listPicture FlexiLayout


Toolbars

Show/Hide Hidden Text

Standard toolbar

The Standard toolbar contains buttons which correspond to the standard commands such as creating, opening and saving FlexiLayouts.

The buttons on the Standard toolbar:

Button | Description
Open | Opens the Open Project dialog box where you can select a project file to open.
Save | Saves the current project.
Cut | Deletes the selection and places it into the Clipboard.
Copy | Copies the selection (text in the Properties window, blocks in the Image window, pages in the Batch window, blocks or elements in the FlexiLayout window) into the Clipboard.
Paste | Pastes the selection from the Clipboard.
Previous Page | Opens the previous page in the project.
Next Page | Opens the next page in the project.
Previous Document | Opens the previous document in the project.
Next Document | Opens the next document in the project.

Extracted Objects toolbar

The Extracted Objects toolbar contains buttons which allow you to show/hide the objects detected during pre-recognition.

The Extracted Objects toolbar buttons:

Button | Description
Recognized Words | Displays only the objects classified as Text during pre-recognition.
Recognized Lines | Displays only the objects classified as Recognized Lines during pre-recognition.
Separators | Displays only the objects classified as Separators during pre-recognition.
Barcodes | Displays only the objects classified as Barcodes during pre-recognition.
Raw Objects | Displays only the objects which the program managed to classify during pre-recognition.

Block-Drawing Tools toolbar

The Block-Drawing Tools toolbar contains buttons which allow you to edit the reference layout.

The Block-Drawing tools toolbar buttons:

Button

Description

Select Region

Selects a region on the image and moves the selected block.

Sometimes a block may be too small to be moved, as its borders are very close to one another and pointing the mouse on any of them will activate the "change size" mode. Hold down the Ctrl key to move such blocks.

Measure Rectangle

Detects the coordinates and sizes of objects on the image and copies them to the Clipboard.

To measure an object on the current image, activate the Measure Tool and select the rectangular area to be measured: right-click one corner of the area, drag the mouse diagonally into the opposite corner, and release the mouse. The Measure Tool dialog box displays the coordinates and the width and height of the measured object in the user-defined units of measurement.

If you select Automatically copy results to Clipboard in the Measure Tool dialog box, the coordinates of the rectangle will be copied to the Clipboard so that you can easily paste them, for example, on the Search Constraints tab in the Properties dialog box of any element to define its search area.

Scroll Tool

Scrolls the image in the Image window.

Create Element

Creates a new block or element and allows you to specify its properties based on the pre-recognized image.

Draw Location

Draws an area on the image corresponding to the selected block or element.

note Note.The button is available in the Reference layout mode and Training Mode.

Add Block Part

Adds a rectangular area to the selected area.

note Note.The button is available in the Reference layout mode and Training Mode.

Cut Block Part

Cuts a rectangular area from the selected area.

note Note.The button is available in the Reference layout mode and Training Mode.

Delete Box

Deletes a block or element from the image.

note Note.The button is available in the Reference layout mode and Training Mode.

Add Vertical Separator

Adds a vertical separator to the selected Table block.

note Note.The button is available in the Reference layout mode and Training Mode.

Add Horizontal Separator

Adds a horizontal separator to the selected Table block.

note Note.The button is available in the Reference layout mode and Training Mode.

Delete Separator

Deletes a separator from the selected Table block.

note Note.The button is available in the Reference layout mode and Training Mode.

Layout toolbar

The Layout toolbar contains buttons which allow you to view the test images in different modes.

The Layout toolbar buttons:

Button | Description
Matched layout | Displays the image in Matched layout mode. Use the arrow to the right to select the objects to be displayed: blocks, elements, or both.
Reference layout | Displays the image in Reference layout mode.
Difference layout | Displays the image in Difference layout mode.

Image Tools toolbar

The Image Tools toolbar contains buttons which correspond to the standard commands such as rotating and scaling the selected image(s).

The buttons on the Image Tool toolbar:

Button | Description
Rotate Clockwise | Rotates the image by 90° clockwise.
Rotate Counter-Clockwise | Rotates the image by 90° counter-clockwise.
Rotate Upside Down | Rotates the image by 180°.
Correct Page Orientation | Auto corrects the orientation of pages. The correct orientation is selected automatically based on the selected pre-recognition language and the settings made in the Options dialog box (Tools → Options).
Invert | Inverts the image (turns black into white and vice versa).
Despeckle | Removes excess dots from the image.
Zoom In | Makes the image twice as large.
Zoom Out | Makes the image twice as small.
Scale | Scales the image.

note Note.When you perform image operations, all the pre-recognition and FlexiLayout matching results are deleted. When rotating and flipping images, the Reference Layout is also deleted.


Status bar

The status bar displays the result of an operation, brief tips for interface elements, and the coordinates of the object currently selected on the image.


Menu commands

Show/Hide Hidden Text

File menu

Command | Description
New Project... | Opens the Create New Project dialog box, where you can specify a name and location for your new FlexiLayout or Classifier project.
Open Project... | Opens the Open Project dialog box, where you can select a project file.
Close Project | Closes the current project.
Save | Saves the current project.
Save Project as... | Opens the Save Copy dialog box, where you can save the current project under a new name.
Export... | Opens the Export FlexiLayout dialog box for FlexiLayout projects or Export Classifier dialog box for Classifier projects where you can enter a name for the export file. For FlexiLayout projects, the file is exported in the *.afl format. For Classifier projects, the export file has the *.cfl format.
Recent Projects | Displays a list of recent projects.
Exit | Closes FlexiLayout Studio.

Edit menu

Command |  | Description
Cut |  | Cuts the selection and places it into the Clipboard.
Copy |  | Copies the selection (text in the Text window, blocks in the Image window, pages in the Batch window, blocks or elements in the FlexiLayout window) and places it into the Clipboard.
Paste |  | Pastes the selection from the Clipboard.
Delete |  | Deletes the selection.
Delete Page Data |  | Opens the Select Data to Delete dialog box, where you can select the page data to be deleted.
Image | Correct Orientation | Auto corrects the orientation of pages in the batch. The correct orientation is selected automatically based on the selected pre-recognition language and the settings made in the Options dialog box (Tools → Options...).
 | Rotate Clockwise | Rotates the image by 90° clockwise.
 | Rotate Counter Clockwise | Rotates the image by 90° counter-clockwise.
 | Rotate Upside Down | Rotates the image by 180°.
 | Flip Horizontally | Flips the image horizontally.
 | Flip Vertically | Flips the image vertically.
 | Invert | Inverts the image (turns black into white and vice versa).
 | Despeckle | Removes excess dots from the image.
Select All |  | Selects all the pages in the Batch window or all the blocks and elements on the image.
Find in Code... |  | Finds and replaces strings in the entire code on all the Advanced tabs. See Finding and replacing code strings on the Advanced tab.
Go to Page... |  | Opens the Go to Page dialog box, where you can enter the number of the page to which you wish to go.

View menu

Command |  |  | Description
Images | Scale | 10% ... 800% | Sets the scale of the Image window from 10% to 800%.
 |  | Fit to Width | Fits the width of the image to the window.
 |  | Fit to Height | Fits the length of the image to the window.
 |  | Best Fit | Fits the entire image to the window.
 |  | Zoom In | Makes the image 25% as large.
 |  | Zoom Out | Makes the image 25% as small.
 | Objects | Show All Objects | Displays all the objects detected during pre-recognition.
 |  | Hide All Objects | Hides all the objects detected during pre-recognition.
 |  | Recognized Words | Displays only the objects classified as Text during pre-recognition.
 |  | Recognized Lines | Displays only the objects classified as Recognized Lines during pre-recognition.
 |  | Separator | Displays only the objects classified as Separators during pre-recognition.
 |  | Barcodes | Displays only the objects classified as Barcodes during pre-recognition.
 |  | Raw Objects | Displays only the objects which the program managed to classify during pre-recognition.
 |  | note Note.To select multiple types of objects, hold down the Ctrl key while clicking the desired buttons on the toolbar or selecting the menu items.
 | Tool | Select | Selects an existing block on the image.
 |  | Scroll | Scrolls images.
 |  | Measure Rectangle | Detects the coordinates and sizes of objects on the image and copies them to the Clipboard.
 |  | Create Block | Draws an area on the image and creates a new block.
 |  | Create Element | Draws an area on the image and creates a new element.
 |  | Draw Location (FlexiLayout projects only) | Selects the image area that corresponds to the selected block or element.
 |  | Add Region Part (only available if you have selected the Reference layout option) | Adds a rectangular area to the selected block.
 |  | Cut Region Part (only available if you have selected the Reference layout option) | Cuts a rectangular area from the selected block.
 |  | Delete Region (only available if you have selected the Reference layout option) | Deletes the selected block.
 |  | Add Vertical Separator (only available if you have selected the Reference layout option) | Adds a vertical separator to the selected Table block.
 |  | Add Horizontal Separator (only available if you have selected the Reference layout option) | Adds a horizontal separator to the selected Table block.
 |  | Delete Separator (only available if you have selected the Reference layout option) | Deletes the selected separator from the selected Table block.
 | Show Search Area |  | Shows / hides the search area of an element after a FlexiLayout has been applied.
 | Show Pre-Recognition Area |  | Shows / hides a pre-recognition area.
 | Show Captions of Regions on Image (FlexiLayout projects only) |  | Shows / hides element captions after a FlexiLayout has been applied.
 | Show Captions of Inactive Regions (only available if you have selected the Show Captions of Regions on Image option) |  | Shows / hides the captions of all non-selected elements.
 | Hide Active Blocks or Elements |  | Hides the blocks or elements marked on the image, making it easier to review images where both the image objects and the regions of the elements and blocks have been marked. By temporarily hiding a selected element, you can see the image object obscured by the element.
 | Show Image in Black and White |  | Displays color images in black and white.
Hypotheses |  |  | note Note.This window opens after you match your FlexiLayout with an image (the Match command in the Image menu), if the Matched Layout mode was selected ( [image] button on the toolbar).
Log |  |  | Opens the Classifier Log window.
Reference browser |  |  | Opens the dependency browser, where you can search for elements and view their dependencies.
Status Bar |  |  | Displays / hides the status bar in the program’s main window.

Batch menu

warning Important!The contents of this menu depends on the type of project you select.

Command | Description
Batches... | Opens the Batches dialog box, where you can create a new batch or edit an existing one.
Set Reference FlexiLayout Alternative / Set Reference Class | Sets a Reference layout alternative / reference class for the selected pages.
Set Matched Result as Reference / Set Classification Result as Reference | Uses the matched alternative or the current classification result as a reference.
Add Images... | Opens the Open Images dialog box, where you can select one or several images to be added to the batch.
Add Images from Folder... | Opens the Add Images from Folder... dialog box, where you can specify a folder to load the images from.
Import Pages from FLS Project... | Opens the Import Pages from FLS Project… dialog box, where you can select a FlexiLayout Studio project from which you want to import pages.
Move Selected Pages to Another Batch | Moves the selected pages to another batch.
Export Pages to Files... | Opens the Export Images to Folder...dialog box, where you can specify export options for the selected images.
Delete Duplicates | Suggests deleting duplicate images if they are found.
Next Page | Opens the next image in the batch.
Previous Page | Opens the previous image in the batch.
Next Document | Opens the next document in the project.
Previous Document | Opens the previous document in the project.
Match on Navigation | Automatically applies the FlexiLayout when you go to the next document.
Copy Matched Layout to Reference | FlexiLayout project: Creates a reference layout for the image on the basis of the results of FlexiLayout matching. note Note.This command is only available for images which were matched with their FlexiLayouts. Classifier project: Copies a classification result to the page properties.
Assemble to Reference Documents... (FlexiLayout projects only) | Opens Assemble to Reference Documents dialog box, where you can set the reference assembly parameters and create a reference assembly of the selected documents.
Disassemble Reference Documents | Allows a user to disassemble selected reference documents.
Change Reference Header/Footer… | Changes headers/footers in the selected documents if they are used to determine boundaries.
Properties... | Activates the Properties window.

FlexiLayout / Classifier menu

Command |  |  | Description
Match / Classify |  |  | Matches the FlexiLayout with the selected pages. / Classifies the selected pages.
Add Selected Pages to Training Set |  |  | Adds the selected pages to the training set.
Remove Selected Pages from Training Set |  |  | Removes the selected pages from the training set.
Replace Training Set with Selected Pages |  |  | Creates a training set based on the selected pages.
Add All Pages to Training Set |  |  | Adds all the batch pages to the training set.
Remove All Pages from Training Set |  |  | Deletes all the batch pages from the training set.
Add Block | Text |  | Creates a new block of type Text in the blocks branch.
 | Table |  | Creates a new block of type Table in the blocks branch.
 | Barcode |  | Creates a new block of type Barcode in the blocks branch.
 | Checkmark |  | Creates a new block of type Checkmark in the blocks branch.
 | Checkmark Group |  | Creates a new block of type Checkmark Group in the blocks branch.
 | Picture |  | Creates a new block of type Picture in the blocks branch.
 | Non-Recognized |  | Creates a new block of type Non-Recognized in the blocks branch.
 | Group |  | Creates a new block of type Group in the blocks branch.
 | Repeating Group |  | Creates a new block of type Repeating Group in the blocks branch.
Elements | Add Element | Header | Adds a Header element to the FlexiLayout, which indicates the start of a new document.
 |  | Footer | Adds a Footer element to the FlexiLayout, which indicates the end of the document.
 |  | Group | Creates a Group element.
 |  | Labeled Field | Creates a new element of type Labeled Field in the elements branch.
 |  | Line of Elements | Creates a new element of type Line of Elements in the elements branch.
 |  | First Found | Creates a new element of type First Found in the elements branch.
 |  | Static Text | Creates a new element of type Static Text in the elements branch.
 |  | Character String | Creates a new element of type Character String in the elements branch.
 |  | Paragraph | Creates a new element of type Paragraph in the elements branch.
 |  | Date | Creates a new element of type Date in the elements branch.
 |  | Currency | Creates a new element of type Currency in the elements branch.
 |  | Phone | Creates a new element of type Phone in the elements branch.
 |  | Separator | Creates a new element of type Separator in the elements branch.
 |  | White Gap | Creates a new element of type White Gap in the elements branch.
 |  | Barcode | Creates a new element of type Barcode in the elements branch.
 |  | Object Collection | Creates a new element of type Object Collection in the elements branch.
 |  | Region | Creates a new element of type Region in the elements branch.
 |  | Table | Creates a new element of type Table in the elements branch.
 |  | Repeating Group | Creates a new element of type Repeating Group in the elements branch.
 | Convert Element to ... |  | Changes the type of the selected element.
 | Disable Element |  | Disables the selected element or block (i.e. makes it temporarily unavailable). note Note.If there are elements and/or blocks in the FlexiLayout tree which refer to disabled elements, you need to either disable such elements and/or blocks or remove the references to disabled elements. Otherwise the program will fail to build the FlexiLayout.
 | Test Element |  | Tests the selected element.
Import Alternative Elements... |  |  | Imports a FlexiLayout from FlexiLayout Studio.
Export... |  |  | Exports the FlexiLayout.
Properties... |  |  | Opens the Properties dialog box, where you can view the properties of the FlexiLayout.

Training menu

Command | Description
Training Mode | Switches to the training mode. The General tab is replaced with the Training tab.
Add Field | Adds a new field to the list of fields on the Training tab.
Add Group Field | Adds a group field to the list of elements on the Training tab.
Add AnchorText | Adds a new anchor text element to the list of elements on the Training tab.
Add Separator | Adds a new separator element to the list of elements on the Training tab.
Add Barcode | Adds a new barcode element to the list of elements on the Training tab.
Project menu
Command | Description
Create Backup... | Opens the Create New Backup dialog box, where you can create a backup copy of your FlexiLayout.
Backup Manager... | Opens the Backup Manager, which allows you to manage the backup copies of your FlexiLayout.
Project Settings... | Opens the Properties dialog box, where you can view the properties of the project.

Tools menu

Command | Description
Correct Orientation | Auto corrects the orientation of pages in the batch. The correct orientation is selected automatically based on the selected pre-recognition language and the settings made in the Options dialog box (Tools → Options...).
Pre-Recognize | Pre-recognizes the selected pages.
Delete Blank Pages... | Opens a dialog box where you can delete blank pages from the batch.
Fuzzy Interval Editor... | Opens the fuzzy interval visual editor.
Options... | Opens the Options... dialog box, where you can select colors of objects and highlighting lexemes, possible page orientation, units of measurement to be used in the program, training settings and other options.

Help menu

Command | Description
Help Topics | Opens the Help file.
Tutorial | Opens the "Tutorial" section of the Help file.
Technical Support | Opens the "Technical Support" section of the Help file.
How to Buy ABBYY Products | Opens the "How to Buy ABBYY Products" section of the Help file.
ABBYY Website | Opens the ABBYY website.
Send Feedback... | Opens the Send your feedback page on the ABBYY website.
About | Opens the About dialog box which contains brief information about ABBYY FlexiLayout Studio.


Shortcut menu commands

Show/Hide Hidden Text

Batch shortcut menu

Right-click somewhere in the Batch window to display its shortcut menu.

Command |  | Description
Match / Classify |  | Matches the FlexiLayout with the selected pages. / Classifies the selected pages.
Set Matched Result as Reference / Set Classification Result as Reference |  | Uses the matched alternative or the current classification result as a reference.
Set Reference FlexiLayout Alternative / Set Reference Class |  | Sets Reference layout alternative / Reference class for the selected pages.
Clear Alternative |  | Clears the alternative.
Replace Training Set with Selected Pages |  | Creates a training set based on the selected pages.
Add Selected Pages to Training Set |  | Adds the selected pages to the training set.
Remove Selected Pages from Training Set |  | Removes the selected pages from the training set.
Add Images... |  | Opens the Open Images dialog box, where you can select one or several images to be added to the batch.
Add Images from Folder... |  | Opens the Add Images from Folder...dialog box, where you can specify a folder to load the images from.
Import Pages from FLS Project... |  | Opens the Import Pages from FLS Project… dialog box, where you can select a FlexiLayout Studio project from which you want to import pages.
Pre-Recognize |  | Pre-recognizes the selected pages.
Copy Matched Layout to Reference | Copy Matched Layout to Reference (only available for images which were matched with their FlexiLayouts) | Creates a reference layout for the image based on the results of FlexiLayout matching.
 | Copy Matched Layout to Reference | Allows you to compare the results of FlexiLayout matching against the reference layout.
Assemble to Reference Documents... |  | Opens Assemble to Reference Documents dialog box, where you can set the reference assembly parameters and create a reference assembly of the selected documents.
Move Pages to Batch... |  | Moves the selected pages to another batch.
Export Pages to Files... |  | Opens the Export Images to Folder... dialog box, where you can specify export option for the selected images.
Delete Pages |  | Deletes the selected pages from the batch.
Delete Page Data... |  | Opens the Select Data to Delete dialog box, where you can select the page data to be deleted.
Correct Orientation |  | Auto corrects the orientation of pages in the batch. The correct orientation is selected automatically based on the selected pre-recognition language and the settings made in the Options dialog box (Tools → Options...).
Create Named Parameters for Elements... |  | Opens a dialog box where you can select FlexiLayout elements for which named parameters should be created
Paste Named Parameters from Clipboard... |  | Allows you to paste named parameters into the selected elements.
Test Header |  | Tests the header of the document.
Test Footer |  | Tests the footer of the document.
Properties... |  | Opens the Properties dialog box.

FlexiLayout shortcut menu

Right-click in the FlexiLayout window to display this shortcut menu.

Command | Description
Build FlexiLayout | Builds the FlexiLayout.
Save FlexiLayout | Saves the FlexiLayout.
Rename | Renames the FlexiLayout.
Add All Pages to Training Set | Adds all the batch pages to the training set.
Remove All Pages from Training Set | Removes all the batch pages from the training set.
Add FlexiLayout Alternative | Adds a layout alternative.
Import FlexiLayout Alternatives... | Opens a dialog box where you can select the projects from which to import layout alternatives.
Paste | Pastes the selection from the Clipboard.
Pin FlexiLayout Alternative | Makes the FlexiLayout alternative always active. If there are no pinned FlexiLayout alternatives, the alternative currently selected in the FlexiLayout tree will be deemed active.
Properties... | Opens the Properties dialog box, where you can view the properties of the FlexiLayout.

Training shortcut menu

The way the Training window looks depends on whether reference elements are set to be marked up manually or automatically. When manual editing of reference elements is enabled, the Training window contains the Fields list and the Static elements list. When the program is set to detect reference elements automatically, the Training window contains only the Static elements list. The table below describes shortcut menu commands of these lists.

Command | Description
Fields
Not Present | Specifies that the field is not present on the page.
Required | Specifies that the field is required.
Add Group | Adds a field group.
Add Field | Adds a field.
Initialize Fields By Blocks | Use pre-recognition results to create fields.
Rename | Renames a field.
Delete | Deletes a field.
Delete All Fields | Deletes all fields.
Static elements
Not Present | Specifies that the element is not present on the page.
Required | Specifies that the field is required.
Add Autoreferences | Creates reference elements based on existing field layout and adds them to the current set.
Create Identifiers | Creates identifiers (required static elements that are based on frequently occurring keywords).
Add Anchor Text | Creates a Static Text element.
Add Separator | Creates a Separator element.
Add Barcode | Creates a Barcode element.
Rename | Renames an element.
Delete | Deletes an element.
Delete All Static Elements | Deletes all static elements.

Block shortcut menu

Right-click a block in the FlexiLayout tree to display its shortcut menu.

Command |  | Description
Add block | Text | Creates a new block of type Text.
 | Table | Creates a new block of type Table.
 | Barcode | Creates a new block of type Barcode.
 | Checkmark | Creates a new block of type Checkmark.
 | Checkmark Group | Creates a new block of type Checkmark Group.
 | Picture | Creates a new block of type Picture.
 | Non-Recognized | Creates a new block of type Non-Recognized.
 | Group | Creates a new block of type Group.
 | Repeating Group | Creates a new block of type Repeating Group.
Cut |  | Removes the block and copies it to the Clipboard.
Copy |  | Copies the block to the Clipboard.
Paste |  | Pastes the block into the FlexiLayout
Delete |  | Deletes the selected block.
Disable |  | Disables the selected element or block (i.e. makes it temporarily unavailable).
Build FlexiLayout |  | Builds the FlexiLayout.
Save FlexiLayout |  | Saves the FlexiLayout. note Note.When building a FlexiLayout, any changes you have made are saved automatically.
Show Matching Statistics |  | Shows in the Log window the number of pages in the current batch which have been matched with the selected block.
Show Block References |  | Opens the dependency browser, where you can view the dependencies of the selected block.
Properties... |  | Opens the Properties dialog box, where you can view the properties of the block.

Layout alternative shortcut menu

The table below describes commands in the shortcut menu of layout alternatives.

Command | Description
Add Element | Creates an element in the selected layout alternative.
Autocreate identifiers | Creates identifiers for the layout alternative currently being trained.
Train Alternative | Trains the layout alternative.
Train and Test Alternative | Trains a layout alternative and applies it to all pages of the current layout alternative.
Cut, Copy, Paste | These commands cut, copy and paste the current selection.
Disable / Enable | Disables or enables the layout alternative.
Rename | Renames the layout alternative.
Delete | Deletes the layout alternative.
Delete All Child Elements | Deletes all child elements of the layout alternative.
Import Alternative Elements... | Imports elements of a layout alternative into the FSP project.
Find in Code | Searches the code of FlexiLayout elements.
Properties... | Opens the Properties dialog box of a layout alternative.

Element shortcut menu

Right-click an element in the FlexiLayout tree to display its shortcut menu.

Command |  | Description
Add Element | Header | Adds a Header element to the FlexiLayout, which indicates the start of a new document.
 | Footer | Adds a Footer element to the FlexiLayout, which indicates the end of the document.
 | Group | Creates a new element of type Group in the elements branch.
 | Labeled Field | Creates a new element of type Labeled Field in the elements branch.
 | Line of Elements | Creates a new element of type Line of Elements in the elements branch.
 | First Found | Creates a new element of type First Found in the elements branch.
 | Static Text | Creates a new element of type Static Text in the elements branch.
 | Character String | Creates a new element of type Character String in the elements branch.
 | Paragraph | Creates a new element of type Paragraph in the elements branch.
 | Date | Creates a new element of type Date in the elements branch.
 | Currency | Creates a new element of type Currency in the elements branch.
 | Phone | Creates a new element of type Phone in the elements branch.
 | Separator | Creates a new element of type Separator in the elements branch.
 | White Gap | Creates a new element of type White Gap in the elements branch.
 | Barcode | Creates a new element of type Barcode in the elements branch.
 | Object Collection | Creates a new element of type Object Collection in the elements branch.
 | Region | Creates a new element of type Region in the elements branch.
 | Table | Creates a new element of type Table in the elements branch.
 | Repeating Group | Creates a new element of type Repeating Group in the elements branch.
Convert Element To | Header | Converts the element to Header.
 | Footer | Converts the element to Footer.
 | Group | Converts the element to Group
 | First Found | Converts the element to First Found.
 | Repeating Group | Converts the element to Repeating Group.
 | Static Text | Converts the element to Static Text.
 | Labeled Field | Converts the element to Labeled Field.
 | Character String | Converts the element to Character String.
 | Paragraph | Converts the element to Paragraph.
 | Date | Converts the element to Date.
 | Currency | Converts the element to Currency.
 | Phone | Converts the element to Phone.
 | Separator | Converts the element to Separator.
 | Barcode | Converts the element to Barcode.
 | Object Collection | Converts the element to Object Collection.
 | White Gap | Converts the element to White Gap.
 | Region | Converts the element to Region.
 | Table | Converts the element to Table.
Cut |  | Removes the element and copies it to the Clipboard.
Copy |  | Copies the element to the Clipboard.
Paste |  | Pastes the element from the Clipboard into the FlexiLayout.
Disable |  | Disables the selected element (i.e. makes it temporarily unavailable).
Rename |  | Renames the selected element.
Delete |  | Deletes the selected element.
Train Element | Train Element Parameters | Opens the Choose Trained Element Parameters dialog box, where you can compare new and old values of the element parameters.
 | Generate Element Relations | Selects elements for which to create relations.
 | Create Relation Offsets | Creates relation offsets.
Test Element |  | Tests the selected element.
Find in Code |  | Finds and replaces text in the code on the Advanced tab of the selected element and its subelements.
Show Element References |  | Opens the dependency browser, where you can view the dependencies of the selected element.
Properties... |  | Opens the Properties dialog box, where you can view the properties of the selected element.

Image shortcut menu

Right-click anywhere in the Image window to display its shortcut menu.

Command |  | Description
Match (FlexiLayout projects only) |  | Matches the FlexiLayout against the open image. The results of FlexiLayout matching are displayed as detected regions of elements and blocks in the Image window, and as element hypotheses in the Hypotheses window.
Match Reference Document (FlexiLayout projects only) |  | Matches the reference document with the image.
Classify (Classifier projects only) |  | Classifies the current image.
Show Reference Alternative in Tree (available only if a reference alternative is available for the page(s)) |  | Shows the reference alternative in the project tree.
Set Reference FlexiLayout Alternative |  | Specifies a reference FlexiLayout alternative for the selected pages.
Clear Alternative |  | Clears the FlexiLayout alternative of all the detected elements and blocks on the selected pages.
Go to Page... |  | Goes to the page with the specified number.
Pre-Recognize |  | Pre-recognizes the selected pages.
Copy Matched Layout to Reference (only available for images which were matched with their FlexiLayouts) |  | Creates a reference layout for the image.
Hide Active Blocks or Elements |  | Hides the selected blocks or elements on the image.
Show Search Area |  | Shows / hides the search area of an element after a FlexiLayout has been applied.
Show Pre-Recognition Area |  | Show / hides a pre-recognition area.
Show Captions of Regions on Image (FlexiLayout projects only) |  | Shows/hides element captions after a FlexiLayout has been applied.
Show Captions of Inactive Regions (available when the Show Captions of Regions on Image option is selected.) |  | Shows/hides the captions of all non-selected elements.
Scale | 10% ... 800% | Sets the scale of the Image window from 10% to 800%.
 | Fit Width | Fits the width of the image to the window.
 | Fit Height | Fits the length of the image to the window.
 | Fit Page | Fits the entire image to the window.
 | Zoom In | Makes the image 25% as large.
 | Zoom Out | Makes the image 25% as small.
Show Image Objects | Show All Objects | Displays all the objects detected during pre-recognition.
 | Hide All Objects | Hides all the objects detected during pre-recognition.
 | Recognized Words | Displays only the objects classified as Text during pre-recognition.
 | Recognized Lines | Displays only the objects classified as Recognized Lines during pre-recognition.
 | Separators | Displays only the objects classified as Separators during pre-recognition.
 | Barcodes | Displays only the objects classified as Barcodes during pre-recognition.
 | Raw Objects | Displays all objects identified by pre-recognition.
 | note Note.To select multiple types of objects, hold down the Ctrl key while clicking the desired buttons on the toolbar or selecting the menu items.
Tool | Select | Selects an existing block on the image.
 | Scroll | Scrolls images.
 | Measure Rectangle | Detects the coordinates and sizes of objects on the image and copies them to the Clipboard.
 | Create Block | Draws an area on the image and creates a new block.
 | Create Element | Draws an area on the image and creates a new element.
 | Draw Location (FlexiLayout projects only) | Selects the image area that corresponds to the selected block or element.
 | Add Region Part (only available if you have selected the Reference layout option) | Adds a rectangular area to the selected block.
 | Cut Region Part (only available if you have selected the Reference layout option) | Cuts a segment from the selected block.
 | Delete Region (only available if you have selected the Reference layout option) | Deletes the selected block.
 | Add Vertical Separator (only available if you have selected the Reference layout option) | Adds a vertical separator to the selected Table block.
 | Add Horizontal Separator (only available if you have selected the Reference layout option) | Adds a horizontal separator to the selected Table block.
 | Delete Separator (only available if you have selected the Reference layout option) | Deletes a separator from the selected Table block.
Delete Pages (Matched layout only) |  | Deletes selected pages. To select multiple pages, press and hold down the Ctrl key.
Image Operations | Correct Orientation | Auto corrects the orientation of pages. The correct orientation is selected automatically based on the selected pre-recognition language and the settings made in the Options dialog box (Tools → Options...).
 | Rotate Clockwise | Rotates the image by 90° clockwise.
 | Rotate Counter Clockwise | Rotates the image by 90° counter-clockwise.
 | Rotate Upside Down | Rotates the image by 180°.
 | Flip Horizontally | Flips the image horizontally.
 | Flip Vertically | Flips the image vertically.
 | Invert | Inverts the image (turns black into white and vice versa).
 | Despeckle | Removes excess dots from the image.
Test Element |  | Tests the selected element.
Properties... |  | Opens the Properties dialog box.

Hypothesis shortcut menu

Right-click somewhere in the right-hand pane of the Hypothesis window to display its shortcut menu.

Item | Description
Show Details | Displays the hypotheses for the subelements in the selected Group and Table element.
Go One Level Up | Goes one level up the tree and displays the hypotheses of the parent Group element. Available for all hypotheses with the exception of the hypotheses for the root element (SearchElements).
Expand Active | Displays all the hypotheses for the next element which originate from the current hypothesis. Available for hypotheses which have more than one child hypothesis for the next element.
Expand All | Displays all the hypotheses, including those not from the best path. Available for any hypothesis for any element.
Collapse All | Hides all the hypotheses which are not from the best path. Available for any hypothesis for any element.
Show Search Area | Shows/hides the search area for the element for which the hypothesis has been formulated.
Element Properties... | Opens the Properties dialog box, where you can view the properties of the element for which the hypothesis was formulated.

Classifier Log window, shortcut menu

Right-click the Classifier Log window to open its shortcut menu.

Command | Description
Display Hypotheses | Displays the hypotheses generated for the elements of the classifier.
Copy Selected Text | Copies the selected text to the Clipboard.
Export Log | Opens the Export classification log dialog box, where you can save the log as a text file.
Clear Log | Clears the log.


Projects

A project is a set of files created in ABBYY FlexiLayout™ Studio and containing information about the elements and their properties, the test images, etc.

Projects fall into the following two types:

·FlexiLayout projects. These projects are used to develop FlexiLayouts to detect data fields on documents.

·Classifier projects. These projects are used to develop classifiers to group documents into classes.

Within projects, FlexiLayouts and classifiers are build, tested, and debugged.

A project includes:

·the descriptions of the elements (a FlexiLayout or a classifier)

·the batch of images based on which the FlexiLayout is created and debugged

A FlexiLayout project has the extension *.fsp. A classifier project has the extension.fcp. The default storage location of the images you add to the batch of images is [project name]Batch, and the default location of the FlexiLayout is [project name]Template.

To start working with ABBYY FlexiLayout Studio, you need to create a new project or open an existing one.

More:

Working with projects


FlexiLayout projects

A FlexiLayout project contains information about the FlexiLayout, i.e. information about its blocks, elements and their properties, test images etc.

In the FlexiLayout project, you create layout alternatives, add elements and blocks, and specify their properties. The project also allows you to debug the FlexiLayout, build it, and test it.

A FlexiLayout project includes:

·the layout alternatives consisting of blocks and elements

·the batch of images based on which the FlexiLayout is created and debugged

More:

FlexiLayouts

Working with projects


Classifier projects

Classifier project contains a set of elements that can be used to quickly identify the pages. The classification result is saved in the properties of each page as a text string. For example, the name of the appropriate FlexiLayout (or layout alternative) may be saved in the page properties.

In the project, you need to create a classifier, specify its structure, add identifier elements, and specify their properties. The project also allows you to debug the classifier, build it, and test it.

A classifier project includes:

·the classifier, with the required classifying stages and identifier elements

·the batch of images based on which the classifier is created and debugged

More:

Classification

Working with projects


Working with projects

When you start working with ABBYY FlexiLayout Studio, you need to create a new project or open an existing project.

To create a new project:

1.On the File menu, click New Project....

2.In the Create New Project dialog box, enter a project name, specify a location for the project, and specify what type of project you want to create (ABBYY Classifier Project Files (*.fcp), ABBYY FlexiLayout Project Files (*.fsp) or FlexiLayout Project...).

Once you have created your new project, you can add images to the batch and create a FlexiLayout.

To open an existing project:

1.On the File menu, click Open Project....

2.In the Open Project dialog box, select the file of the project that you wish to open.

To view the properties of the project, click Project → Project Settings... The paths to the project file and to the image batch will be displayed. You can add a comment to the batch if required. To manage your image enhancement profiles, click the Image Enhancement Profiles tab.

To close the project, click Close Project on the File menu.


Managing image enhancement profiles

Image enhancement profiles allow all necessary image transformations to be applied automatically to all uploaded images.

There are two built-in default profiles in the program:

·Photo (includes recommended enhancements for images of photographed documents)

·Scan (includes recommended enhancements for images of scanned documents)

These profiles are identical to the built-in ABBYY FlexiCapture image enhancement profiles. Their purpose is to ensure that FlexiLayouts and ABBYY FlexiLayout Studio classifiers are created using images identical to those imported into ABBYY FlexiCapture.

The built-in profiles cannot be deleted.

Custom image enhancement profiles

You can also create custom image enhancement profiles. Custom image enhancement profiles are created on an ABBYY FlexiCapture Scanning Station, on the Project Setup Station (in the case of ABBYY FlexiCapture Distributed) or on the Administrator Station (in the case of ABBYY FlexiCapture Standalone). To use a custom image enhancement profile in ABBYY FlexiLayout Studio, you must export it from a Scanning Station, from the Project Setup Station or from the Administrator Station and then import it into your FlexiLayout Studio project settings. Custom profiles are exported as XML files.

To import an image enhancement profile into ABBYY FlexiLayout Studio:

1.Click Project → Project Settings... to open the Properties dialog box, click the Image Enhancement Profiles tab, and then click Import....

2.Select the appropriate profile file and click Open.

You can delete or export an imported image enhancement profile, but you cannot modify a profile in ABBYY FlexiLayout Studio or view its settings. To view the settings of an image enhancement profile, open its settings on the Scanning Station, on the Project Setup Station or on the Administrator Station.


Protection features for FlexiLayouts and сlassifiers

FlexiLayouts and classifiers may be developed for use by third parties. ABBYY FlexiLayout Studio includes protection features for FlexiLayouts and classifiers that prevent their unauthorized use and enable you to provide technical support to your end users.

To use these protection features, you need a developer's license. A developer's license enables the developer to sign FlexiLayouts and classifiers and then edit the signed FlexiLayout and classifiers when providing technical support. To obtain an developer's license, contact the nearest ABBYY office.

To protect a FlexiLayout or classifier, enable the Sign FlexiLayout option on the Protection tab of its properties dialog box. The following protection options are available for protected components:

·Name of author
Contains the developer's name as specified in the developer's license. Read-only.

·Component name
The name of the FlexiLayout component as specified by the developer.

·License info
Contains additional licensing information.

The protection module will contain the developer's name (as specified in the developer's license) and the name of the module (as specified by the developer). When the project is exported to an *.afl or *.cfl file, these parameters will also be written to that file.

To access a protected FlexiLayout or classifier, a user will need to contact an ABBYY office in order to acquire a user license. This license will contain the developer's name and the name of the module. Access permissions will be checked when a protected FlexiLayout or classifier is added to a FlexiCapture project. The user will be able to use a protected FlexiLayout or classifier in a project, but will not be able to edit it, deactivate the protection features, or change any of the protection properties.

If a user does not have a license for a protected FlexiLayout or classifier, the user will be able to add it to a FlexiCapture project but will not be able to use it.


Batches

A batch is a collection of test images (pages) which are used for debugging the FlexiLayout.

The more test pages a batch contains, the better the resulting FlexiLayout. Test pages must be representative, i.e. they must include all the elements that may occur on the real-life documents to be processed and cover as many layout variations as possible.

You can add images of various formats to a batch. For a full list of supported formats, see the Supported images formats page.

A batch may contain images of different resolutions. You can also add images of one and the same document scanned at different resolutions. Thus, when creating and testing your FlexiLayout, you will be able to select the resolution that ensures the best quality of optical recognition and object detection.

More:

Adding, viewing, and deleting test images

Working with images


Adding, viewing, and deleting test images

Show/Hide Hidden Text

Adding images

There are three commands that can be used to add images into a batch:

·Add Images... adds one or more images into the batch.

·Add Images from Folder... adds all images from a specified folder into the batch.

oImport pages from FLS projects imports images from any FSP and FCP projects in the specified folder. Images will be imported from all the batches in the project.

oAdd images from subfolders adds images from subfolders.

·Import Pages from FLS Project... imports pages from an existing FlexiLayout Studio project. If the project contains multiple batches, the user will be prompted to select batches from which images should be imported. When this command is used to import images, information about the classes or alternative layouts associated with the pages is retained. Any pre-processing results from the existing FlexiLayout Studio project will also be imported.

The above commands are available in the File menu and in the shortcut menu of the Batch pane. They are also available as buttons in the Batch pane when you create a new batch.

When importing images into an existing project, a new batch will be created and the pages will be added into that batch.

Image processing settings

You can specify image processing settings when adding images. In the Open Images dialog box, click the Image Preprocessing Settings button and in the dialog box that opens, select the required settings.

Under Assemble to reference documents, you can specify how your reference document assembly should be created:

·One document per file creates a separate document for each image file.

·Group by page count creates a document from the specified number of image files. For more information, see Reference assembly.

Under Image processing, you can specify additional image processing settings:

·Pre-recognize images on adding automatically recognizes an image immediately after it has been added.

Under Image enhancement, you can specify image enhancement profiles for the uploaded images.

Basic image processing uses the basic image processing settings. You can view them by clicking Settings.... More details

General contains the general image processing settings:

oRotate images by rotates an image in the specified direction (90° clockwise, 90° counterclockwise or 180°).

oConvert color and gray images to black-and-white automatically converts color images to black-and-white when they are added to a batch.

oDespeckle images clears noise from images. Despeckling can only be used on black-and-white images.

warning Important! If the source text on an image is too bright or is printed in a very thin font, make sure that applying Despeckle images does not remove important elements such as punctuation marks or thin letter elements.

oRemove all color marks removes all color marks from images. This option can be used to remove stamps or signatures in colored ink, for example.

Recommended for photos contains settings for improving images of photographed documents.

oCorrect resolution of photos automatically selects the optimal resolution for photographs.

oAutocrop automatically searches for page boundaries on an image and crops the area containing relevant information. It also corrects skew and distortion.

oReduce ISO noise removes digital noise from images.

oWhiten background cleans up image backgrounds.

For automatic skew correction, use the following options:

oUse separators to correct skew

oUse black squares to correct skew

oUse text to correct skew

The above options are enabled by default and are used to correct skew on uploaded images based on black squares, vertical and horizontal separators, or text. We recommend that you do not disable skew correction, except in cases where it is performed incorrectly. For example, a poorly aligned stamp or a sloping graph may be treated as separators, resulting in incorrect skew correction.

·Use image enhancement profile applies a previously created image enhancement profile. If there are photographs among the images that are being processed, you can apply enhancements designed specifically for photos. To do this, select the Use special profile for photos option and select an appropriate secondary profile.

Under Processing of PDF files, the following options are available:

·Auto (FlexiLayout Studio will choose between PDF text layer and OCR) automatically chooses the correct file processing option depending on the availability and quality of a text layer.

·Prefer PDF text layer if available uses the available PDF text layer.

·Use OCR only performs optical character recognition even there is a text layer available.

Under Processing of office documents, you can specify import settings for common office files. When importing files in commonly used office formats, the program converts them to PDF, using either its own conversion module or third-party software.

To use third-party software for conversion to PDF, select either or both of the following options:

·Allow the use of LibreOffice® (supports LibreOffice 4.2, 4.3, 4.4, and 5)

·Allow the use of Microsoft® Office (supports Microsoft Office 2010, 2013, and 2016)

note Note.

1.Processing results may vary depending on which third party software is selected.

2.If both options are selected, the program will select the most suitable office application automatically. The selected application will be indicated in the respective task log.

3.If the Allow the use of Microsoft® Office option is selected:

§Your copy of Microsoft Office must be activated.

§You must run the program as an administrator (click the Authentication... button to open the authentication settings dialog box).

Specifying a reference alternative or class

When should I use a reference alternative or class?

We recommend using a reference alternative or class when dealing with a FlexiLayout or classifier that has multiple alternatives. This will insure that the FlexiLayout is applied correctly. Also, automatic selection of a reference alternative or class for imported images will decrease the workload of operators when dealing with large batches that contain images from different sources.

When do image import settings apply?

A reference alternative or class is created when images are imported from existing an FSP or FCP project (i.e. when you use the Import Pages from FLS Project... or Add Images from Folder... command on the File menu, the specified folder contains an FSP or FCP project, and the Import pages from FLS projects option is enabled).

You can change the import settings in the Image Preprocessing Settings dialog box (click the Page Import Settings button in the Add Images from Folder... dialog box or click the Page Import Settings button in the Import Images from Project... dialog box). Note that the reference alternative or class creation settings you specify when adding images by clicking File → Add Images from Folder... will also apply when you add images by clicking File > Import Images from Project...) and vice versa.

Page import settings

You can set up the way images are imported from existing FlexiLayout Studio projects in the Page Import Settings dialog box.

Options in the Batches group determine which batch the new images are added to.

·Import all pages to current batch all images from all detected batches will be added to the current batch.

·Create new batches creates a new batch and adds images from all detected batches to the new batch.

Options in the Page class group determine how the reference alternative or class is created.

The Maintain page reference alternative/class (will be set to <None> if unchecked) determines whether any information about the reference alternative or class of imported pages is imported. If it is not selected, no information about the reference alternative or class of imported pages will be added to the project.

·Use alternative/class of the same name if exist: if a reference alternative or class is found in the project from which images are being imported, and its name matches that of a reference alternative or class in the current project, a new reference alternative or class will not be created, and the existing reference alternative or class will be used.

·Always create new alternative/class: if a reference alternative or class is found in the project from which images are being imported, and its name matches that of a reference alternative or class in the current project, a new reference alternative or class will be created and a prefix will be added to its name. You can find the prefix settings in the New Alternative/Class name prefix option group (see below). Headers and footers from the old reference alternative (the one that was detected in the project from which images are being imported) will be imported to the newly created one. No other elements from the old reference alternative will be imported.

Options in the New Alternative/Class name prefix group determine how new reference alternatives or classes should be named.

·Project name: the name of the new alternative is a combination of the name of the current project and the name of the reference alternative or class from the project from which images are being imported: <Project name>_<Original name of alternative or class>. So if the current project is named Halloween_Form, and the images from the old project have a reference alternative or class named Main_Group, a reference alternative named Halloween_Form_ Main_Group will be created when the images are imported.

·Custom prefix: the name of the new alternative is a combination of the custom prefix you specified and the name of the reference alternative or class from the project from which images are being imported: < Custom prefix >_<Original name of alternative or class>. So if the current project is named Halloween_Form, the custom prefix you specified is My_Prefix, and the images from the old project have a reference alternative or class named Main_Group, a reference alternative named My_Prefix_ Main_Group will be created when the images are imported.

Viewing and deleting images

To open a page image, double-click it in the Batch pane.

You can see the properties of an open image in the Properties dialog box.

To go to a page with a specific number, select Image → Go to Page... from the main menu and then enter the number of the desired page.

To delete one or more pages from the batch, select them in the Batch pane and then select Delete Pages from the Batch menu or from the shortcut menu of the batch.

You can also add images into a batch using the drag-and-drop feature of Windows Explorer.


Working with images

ABBYY FlexiLayout Studio provides the following operations that can make your work with images in the program more convenient:

·Rotating the image (90° clockwise or counterclockwise, or 180°) and auto correcting image orientation

·Flipping the image (horizontally or vertically)

·Inverting the image

·Despeckling the image

·Rescaling the image

If the image is opened in the Image window, you can use the buttons of the Image Tools toolbar, the commands of the menu, or the commands of the shortcut menu of the Image window:

If you want to... | click | or select the following command in the menu
Rotate the image 90° clockwise | RotateClockwise | Edit → Image → Rotate Clockwise
Rotate the image 90° counterclockwise | RotateCounterClockwise | Edit → Image → Rotate Counter Clockwise
Rotate the image 180° | RotateUpsideDown | Edit → Image → Rotate Upside Down
Correct image orientation | CorrectOrientation | Edit → Image → Correct Orientation
Invert the image (replace white dots with black dots and vice versa) | InvertImage | Edit → Image → Invert
Despeckle the image (remove the noise from the image) | DespeckleImage | Edit → Image → Despeckle
Zoom in to 2x | ZoomIn | View → Images → Scale → Zoom In
Zoom out | ZoomOut | View → Images → Scale → Zoom Out

note Note.When you perform image operations, all the pre-recognition and FlexiLayout matching results are deleted. When rotating and flipping images, the Reference Layout is also deleted. You can also delete the page data by selecting the Batch → Delete Page Data command in the main menu.


Saving images

To save images of the selected pages:

1.In the Batch window, select the pages you wish to save.

2.From the page shortcut menu select Export Pages to Files....

3.In the dialog that opens specify the path to the folder.

4.Click Export options... to select desired saving options.

You can select the following options:

Option | Description
Name prefix | File name prefix
Name suffix | Select how the name suffix is composed: ·as page number ·continiously If the suffix changes continiously, specify the number to start enumeration with.
Format | The following saving formats are available: ·*.bmp ·*.dcx ·*.pcx ·*.png ·*.tif
Color type | Select a desired color type: ·Black and white ·Color ·Grey
Rewrite existing files | Select this option if you wish to rewrite existing files with new files with the same names.


Deleting page data

In the Select Data to Delete dialog box you can delete data from pages selected in the Batch window. To open the dialog box, select the Delete Page Data command from:

·the Batch menu
or

·the batch shortcut menu
or

·the page shortcut menu

You can delete the following page data:

warning Important!Please note that these changes cannot be undone.

·Extracted image objects - Deletes information about objects detected during pre-recognition.

·Matched layout - Deletes information about detected blocks and elements obtained when matching the FlexiLayout.

·Reference layout - Deletes information about the reference layout.

·Training layout - Deletes information about the training layout.

note Note.When you perform image operations, all the pre-recognition and FlexiLayout matching results are deleted automatically. When rotating and flipping images, the Reference Layout is also deleted.


FlexiLayouts

A FlexiLayout is a formalized description of the structure of a document which allows a data capture program to detect image areas which correspond to data fields. A FlexiLayout has a tree-like structure and consists of one block branch and several element branches, each branch corresponding to a layout alternative.

Elements describe image objects that must be detected. In order to enable a data capture application such as ABBYY FlexiCapture to detect an object, you need to create a FlexiLayout elements corresponding to this object and in the element's properties specify the type of the object (i.e. whether it is a text fragment, a picture, a barcode, etc.), its geometrical data (length, width, etc.), and search area where the object is most likely to be found.

Blocks describe data fields from which data must be captured. The location of the blocks can be either specified relative to the location of elements or directly by entering their presumed c coordinates on the document. The purpose of any FlexiLayout is to provide a data capture application with an algorithm of finding blocks.

Blocks of a FlexiLayout are independent of one another. Elements, on the other hand, can be grouped together to form a complex hierarchy where elements are logically interconnected and the location of one element determines the location of another. The order of the elements in the tree determines the order in which they are searched - a data capture program will look for the topmost elements first, find the corresponding objects on the image, and then use this information to locate blocks.

By default, a new FlexiLayout Studio project has the name FlexiLayout. Its elements and blocks branches are empty.

More:

FlexiLayout properties

Training a FlexiLayout

Blocks

Elements


FlexiLayout properties

To view or edit the properties of a FlexiLayout, click Properties... on the FlexiLayout menu or on the shortcut menu of the core node of the FlexiLayout tree. The Properties of %name% dialog box will appear which contains the following options:

The General tab:

·Name
The name of the FlexiLayout.

·Version

·The version of the FlexiLayout. You can create and use several versions (or "editions") of one FlexiLayout.

·Comment
User's comment to the FlexiLayout (optional). This field may contain any text

note Note.The Comment field will be available for viewing in the Document Definition editor of ABBYY FlexiCapture. When you create a Document Definition from an *.afl file (these files are generated when exporting FlexiLayouts from FlexiLayout Studio), the comment to the FlexiLayout will be displayed in the Document Definition properties in read-only mode. This field can be used to add information about the author of the FlexiLayout.

·Pre-recognition
Pre-recognition settings.

·Allow multi-page documents
Allows documents that contain multiple pages.

oMinimum number of pages
The smallest possible number of pages in a document.

oMaximum number of pages
The largest possible number of pages in a document.

The Constants tab:

·Global constants which can be used when specifying additional search criteria

The Named parameters tab:

·Named parameters for FlexiLayouts can be specified on this tab. Named parameters are used for debugging FlexiLayouts.

The Protection tab contains options for protecting the FlexiLayout from unauthorized use.

More:

listPicture Pre-recognition

listPicture Pre-recognition parameters

listPicture Identifying and processing FlexiLayouts in ABBYY FormReader

listPicture Global constants

listPicture Named parameters

listPicture FlexiLayout protection features


Layout alternatives

Sometimes you may encounter documents with identical sets of parameters (blocks), identical rules, and written in the same language, but with element positions varying greatly from one document to another. In this case, for the sake of convenience, you may create a FlexiLayout that includes several alternative layouts, each layout corresponding to a particular subset of documents with identically positioned elements. Apart from the layouts, the other processing parameters (pre-recognition/languages, rules, number of pages, etc.) will remain the same for all such documents described by the FlexiLayout.

Layout alternatives are specified as separate branches in the tree of elements. Thus, instead of one Group element (named SearchElements by default), you can create several elements, each having its own layout alternative represented by a branch of elements that described one particular subset of documents. The layout alternatives are independent, and elements in one branch should not refer to elements in another.

The names of layout alternatives (i.e. root elements) should be unique. We recommend selecting descriptive names that reflect the nature of the corresponding document subset.

When matching the FlexiLayout, the program will apply the layout alternatives one by one, top to bottom. If more than one layout alternative match a document, the first match will be used.

Image areas are specified for the blocks in each layout alternative (see the Blocks section for more information).

When debugging the FlexiLayout, you can choose just one layout alternative. To choose a layout alternative, select either the Select Layout item from the shortcut menu of the element, or the Select Alternative Layout item from the shortcut menu of the FlexiLayout.

To create a layout alternative:

1.Select the root element of the layout.

2.Select Add FlexiLayout Alternative from the shortcut menu. The layout alternative will be added to the list.

3.Double-click the layout alternative or select Properties... from the alternative shortcut menu to open the layout properties dialog box.

4.Specify a name and properties for the layout.

note Note.The name of a layout alternative must start with a letter or an underscore, which may be followed by letters or digits. You may not use spaces or any of the following special symbols: ' . ', ' , ', ' : ', ' - ', ' \ ', ' / '. The name may not coincide with any of the reserved keywords.

To copy a layout alternative:

Select the layout alternative you wish to copy. Holding down the Ctrl key and the left mouse button, drag a copy of the layout alternative to the desired location. Alternatively, you can copy a layout by selecting the Copy / Paste commands from its shortcut menu or be pressing the Ctrl+C / Ctrl+V combinations.

Generally, it is easier to copy an existing layout alternative and make some adjustments to it than create a new layout alternative from scratch.

To import layout alternatives from another FlexiLayout:

1.Select the root element of the layout.

2.Select Import FlexiLayout Alternatives... from the shortcut menu.

3.Select the FlexiLayout from which you wish to import layout alternatives and click Open.

note Note.When you try to import a layout alternative from a project with multiple layout alternatives, the program will prompt you to select the layout alternatives you want to import.

For the blocks that have identical names in the two FlexiLayouts, the image areas will be added. If the FlexiLayout from which you import layout alternatives has additional blocks, the will also be copied to the current FlexiLayout.

To import elements and blocks from another FlexiLayout:

1.Select the layout alternative to which you wish to add elements from another FlexiLayout.

2.Select Import Alternative Elements... from the shortcut menu.

3.In the dialog box that opens, select the project from which you want to import blocks and FlexiLayout elements and then click the Open button.

note Note.When you try to import blocks and FlexiLayout elements from a project with multiple layout alternatives, the program will prompt you to select the layout alternatives from which you want to import blocks and elements. If the name of an element or block being imported is identical to that in the current FlexiLayout, a number will be added to the name of the imported element or block.

To delete a layout alternative

1.Right-click the layout alternative (i.e. the branch in the tree of elements) you wish to delete.

2.Select Delete from the shortcut menu or press Del.

You can temporarily disable a layout alternative by selecting Disable from its shortcut menu.

To change the order of layout alternatives:

Click the layout alternative you wish to move and, holding down the left mouse button, drag it to the desired location.


Global constants

note Note.Global constants are used to specify additional search criteria (element's Properties dialog box, Advanced tab, Advanced pre-search relations and Advanced post-search relations sections; block's Properties dialog box, Expression field).

Global constants are set for the entire FlexiLayout and accessible in all sections of the program code.

When creating a global constant, you must specify its name and value. The name of a constant must start with a letter or an underscore character, then it can consist of letters and digits. Constant names must not contain blank spaces or special symbols. The name of a constant must be unique for the FlexiLayout in which it is to be used and cannot coincide with any of the reserved words. This means that you may not declare variables in the code whose names coincide with the names of the global constants.

Constants may be of any type which has a constructor in the FlexiLayout language. The type of a constant is either defined explicitly by calling its constructor, or is derived by the program from its value (e.g. type String). When you use a constant in your code, the compiler will check that this type of constant may be used in the given context. This check is performed when you build the FlexiLayout or when you ask the program to check the code in a particular field.

You can create global constants using global functions and other already created global constants.

Examples of global constants:

Name | Value | Type
RomanNumerals | "I V v X x" | String
SomeRect | Rect( 5mm, 10mm, 20mm, 50mm ) | Rect
FirstPageRect | Page( 1 ).RectGlobal | Rect
UpperHalfOfFirstPage | Rect(FirstPageRect.Left, FirstPageRect.Top FirstPageRect.Right, FirstPageRect.Height / 2 ) | Rect
UpperHalfOfFirstPage 1 | Region( UpperHalfOfFirstPage ) | Region
TotalLineHeightOfFirstPage | Page( 1 ).AverageLineHeight() + Page( 1 ).AverageInterlineInterval() | Distance
Q_50_Percent | Quality( 0.5 ); | Quality

Adding, changing, and removing global constants

To add a global constant:

1.Select the Properties... command from the FlexiLayout menu (or right-click in the FlexiLayout window and select the Properties... command from the shortcut menu).

2.In the Properties dialog box, click the Constants tab.

3.Click Add...

4.Type a name and/or value for the constant and click OK.

To change a global constant:

1.Select the Properties... command from the FlexiLayout menu (or right-click in the FlexiLayout window and select the Properties... command from the shortcut menu).

2.In the Properties dialog box, click the Constants tab and select the constant you wish to change.

3.Click Edit...

4.Type a new name and/or value for the constant and click OK.

To remove a global constant:

1.Select the Properties... command from the FlexiLayout menu (or right-click in the FlexiLayout window and select the Properties... command from the shortcut menu).

2.In the Properties dialog box, click the Constants tab and select the constant you wish to remove.

3.Click Delete.

note Note.A constant name must be a valid identifier, i.e. it must consist of the characters "_ a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" and digits. The first character in the name must not be a digit. Constant names must not contain blank spaces or special symbols.


Auto-creating a FlexiLayout

Show/Hide Hidden Text

ABBYY FlexiLayout Studio lets you create FlexiLayouts by training the program on marked-up fields and static elements. Static elements are elements that appear on documents of the same type. The most common type of static elements is static text (a word, a part of a word, or a line of text), less common examples include separators and barcodes. Fields are blocks which the program has to detect in order to extract the text (a word, a part of a word, a line or a paragraph) or barcode from them.

FlexiLayouts created this way can be used in ABBYY FlexiCapture to detect fields on document images based on their positions relative to static elements. Using training to create FlexiLayouts can be a lot easier than creating them manually.

ABBYY FlexiLayout Studio also lets you create several layout alternatives. Layout alternatives are versions of a FlexiLayout that have different static element settings but share the same set of fields. They can be trained using the training mode or while editing a FlexiLayout.

When training FlexiLayouts, keep the following considerations in mind:

·The program uses images from the training set for training. You can add images to the training set at any point prior to generating a FlexiLayout. The training set must contain at least 3 pages.

·You can only edit the static elements of a layout alternative. All alternatives of a FlexiLayout have the same fields.

·If the page contains unmarked fields or static elements when you edit a layout alternative, the FlexiLayout will be automatically applied to the page. Any new field blocks detected in this way will be added to the FlexiLayout, while existing field regions will not be changed.

·If you add blocks to an existing FlexiLayout, these blocks will not appear in the training mode. You can create these blocks using the Initialize Fields By Blocks command on the shortcut menu of the FlexiLayout.

Creating FlexiLayouts in the training mode

To create a FlexiLayout using training, complete the following steps:

1.Create a new project or open an existing project that already contains a FlexiLayout.

2.Switch to the training mode by clicking the [image] button or by selecting Training Mode from the Training menu.

3.In the Batch pane:

a.Pre-recognize the images (select all images, right-click them and click Pre-Recognize on the shortcut menu or open the Batch menu and click Pre-Recognize).

b.Double-click any image to open it. Study the recognition results, specify the fields and static elements which you want to use for training the FlexiLayout.

4.In the Training window:

a.Select a layout alternative from the Reference Alternative drop-down list or create a new one.

b.If you want to generate reference elements automatically, leave the Auto references option enabled. If this option is disabled, you will have to specify reference elements [image] manually.

note Note.

oIf the Auto references option is disabled, automatically generated reference elements will be added to the Static elements list, and their positions will be marked on pages. You can remove unnecessary elements or add new ones. If the Auto references option is enabled, manually added elements will be deleted.

oThe contents of the Training window depend on whether the Auto references option is enabled or disabled. If it is disabled, the Training window will contain two areas: the Fields area with a list of fields and the Static elements area with a list of static elements. If the Auto references option is enabled, only the Fields area will be present in the Training window.

5.Mark the areas of fields and static elements on the page in the Image window:

oUse the Create Block [image] tool to mark area of blocks on the image. The names of the blocks you have marked will appear in the Fields list.

oUse the Create Element [image] tool to mark areas of static elements. The names of marked elements will appear in the [image] Static elements list.

note Note.

oThe program uses recognized text near marked fields and elements to generate their names. These names will appear in bold font when the area of the field or element has been detected on the page.

oThe Create Block and Create Element tools can be used when viewing a Reference Layout or Difference Layout, but the Create Element tool is only available when creating reference elements manually.

oYou can also use commands on the shortcut menu to mark fields and static elements on the image. Use the Draw Location [image] tool to mark a field or element, right-click the marked area and click the desired command on the shortcut menu.

6.After you have finished marking fields and static elements, add the pages to the training set by selecting them in the Used For Training column of the Batch window.

7.Click Predict Draft Layout on the shortcut menu of images.

8.Check whether fields and elements were detected correctly on all images in the batch and correct the markup where necessary. Add all pages where the program failed to detect fields or elements to the training set.
Elements that are not present on the page can be marked as such. To do this, click Not Present on the shortcut menu of an element, click the [image] button or click the middle mouse button on the area of the element on the image. The names of the elements marked as not present will be displayed in strike-through font.
The status of pages is indicated by icons in the Training Layout State column:

o No elements marked No elements marked
Indicates that no fields or reference elements have been marked on the page.

o Has unmarked elements Has unmarked elements
Some fields and/or reference elements have not been marked on the page or not all unmarked elements have been marked as not present.

o Has unmarked required element Has unmarked required element
A required element has not been marked on the page.

o All elements marked All elements marked
All elements have been marked on the page or marked as not present.

o No reference class set No reference class set
The reference class of the training page has not been specified.

9.Click the [image] button to generate the layout alternative. If the project uses more than one reference alternative, specify which layout alternatives you want to update.

Training FlexiLayouts during debugging

ABBYY FlexiCapture 12 lets you train FlexiLayouts while debugging them. To do so, use the Train Alternative command on the context menu of a layout alternative. The reference layout will be used to generate the new layout alternative, and reference elements will be created automatically. The Train and Test Alternative command trains a new layout alternative and applies it to all pages of its class.

Training mode options

The Training tab of the Options... dialog contains training settings.

Settings in the Navigation group determine how the program navigates pages when you click the [image] or [image] buttons:

·any unmarked element

Cycles pages that contain any unmarked element. This is the default setting.

·unmarked selected element

Cycles pages that contain the currently selected unmarked element.

The Draft layout prediction group contains settings that determine how layout alternatives are applied during training:

·Predict layout automatically on navigation ( [image] button)

Automatically applies the draft layout when you switch to a different page.

·Replace existing regions of fields on batch prediction

Replaces existing blocks of fields and elements with blocks detected when the layout alternative was applied.

The Template generation group contains one option:

·Create Identifiers on Generation automatically creates identifiers for the layout alternative being trained (see the Identifiers section of this article for details).

Identifiers

Identifiers are distinctive features of documents that can be used to classify it as belonging to a specific type. Examples of identifiers include distinctive words and phrases, specific barcode values and separators.

When you train a layout alternative, the program will put together a set of words that occur frequently in documents belonging to the layout alternative and do not occur in other types of documents.

Identifiers of layout alternatives are stored in the Identifiers group, which is marked as required. This group includes a list of elements of the static text type, each of which contains a word that only occurs in documents belonging to the layout alternative. Relationships between groups of identifiers cannot be created.

Toolbar buttons
Button | Description
 | Enables/disables the training mode.
 | Creates a field and marks its area.
 | Creates an element and marks its area.
 | Draws an area.
 | Edits an existing area.
 | Deletes and area.
 | Creates layout alternatives using pages from the training set.
 | Automatically generates fields based on existing areas in the FlexiLayout.
 | Marks the selected element as not present on the page.
 | Marks an element as required.


Multi-page FlexiLayout

ABBYY FlexiLayout Studio allows you to create FlexiLayouts for multi-page documents. The program will treat the document as one whole and look for the elements irrespective of the pages on which they are located.

In the FlexiLayout properties you must specify the minimum and maximum possible numbers of pages in the document. You can specify the exact number of pages in the document using the SetPagesCount function of the FlexiLayout description language.

For details, see:

Using Header and Footer elements to detect the beginning and end of a document

Matching a multi-page FlexiLayout

Support for multi-page documents in ABBYY FlexiLayout Studio


Using Header and Footer elements to detect the beginning and the end of a document

To detect the beginning and the end of a document, the use of special Header and Footer elements is recommended. These are compound elements and must be placed at the beginning of the branch of elements. In the tree of elements, Header elements are marked with Header and Footer elements are marked with Footer.

The Header element is positioned on the first page of the document and may not occur on any of the subsequent pages. We recommend selecting a Header element which uniquely identifies the documents described by the FlexiLayout.

The Footer element is positioned on the last page of the document and may not occur on the preceding pages.

The Header and Footer elements are part of the FlexiLayout and their hypotheses may be used to search for other elements.

When applying a multi-page FlexiLayout, the Header and Footer elements are used to detect the first and last pages of the document respectively.

The use of Header and Footer elements greatly improves detection of documents and speeds up the FlexiLayout matching process. Be sure to use these elements whenever possible.

More:

Header and Footer

Matching a multi-page FlexiLayout


Matching a multi-page FlexiLayout

To match a FlexiLayout with multiple pages, select the pages in the Batch or in the Image window and then select Match FlexiLayout from the shortcut menu. The application will attempt to match the FlexiLayout as follows:

1.The selected pages are pre-recognized. For each page, the correct orientation is automatically selected based on the pre-recognition language.

2.The first page in the document is detected.

3.The last page in the document is detected.

4.The FlexiLayout is matched with the detected pages.

5.If the FlexiLayout matches the pages, steps 2-4 are performed for the page following the recognized document. If the FlexiLayout does not match, the steps are performed starting with the next page.

The first page in the selection becomes the first page of the document. Next, the program will treat the page following the last page of the previous document as the first page of the new document.

If the FlexiLayout has a set number of pages (the possible number of pages is specified in the FlexiLayout properties), the last page is detected based on the specified number of pages. If the number of pages may vary in the range [MinPages, MaxPages], the program will check if a Footer element is present on the last page with the number MinPages. If this page contains a Footer element, it is deemed to be the last page in the document. Otherwise, the program will check the following conditions for each next page starting from MinPages+1):

1.Whether this page is redundant (its number in the document is greater than the maximum number of pages MaxPages).

2.Whether this page contains a Header element (this check is performed with the Footer element is optional).

3.Whether this page contains a Footer element.

If 1 or 2 is true, the preceding page is selected as the last page in the document. If 3 is true, the current page is selected as the last page in the document.


Support for multi-page documents in ABBYY FlexiLayout Studio

Multi-page sheet and coordinates

The multitude of all the pages of a document is termed a multi-page sheet. A multi-page sheet is obtained by merging together the pages of the document top down, without any joints or gaps, the left edges of all the pages are placed on the same axis that goes through the point (0,0). The sequence of the pages in the sheet depends on their order in the batch.

Two coordinate systems are used – global (goes through the entire document) and local (bound to a particular page. The only difference between the global and local coordinate systems is that the global system has parallel shifts, each page having its own shift.

Example.

Let there be 3 pages in document 3 having the following sizes: 2500x3500, 2400x3400, and 2300x3300.

Then the global coordinates of the pages are: [0, 0, 2500, 3500], [0, 3500, 2400, 6900], [0, 6900, 2300, 10200] (in the order [left, top, right, bottom]).

For relations between elements, the global coordinate system is used, so that the relations, such as BELOW, are interpreted correctly.

Multi-page hypotheses

Hypotheses for the following elements may be located on multiple pages:

·Group

·Repeating Group

·Table

·Region

·Object Collection

Region and Object Collection elements contain all the appropriate objects within the search area.


Pre-recognition

Pre-recognition is the first stage of processing a semi-structured document. Unlike fixed documents, which are designed with computer processing in mind, unstructured documents have different structure and data fields are placed in different parts of page. For this reason, pre-recognition is used to detect objects on the document which could signal the location of data fields.

Pre-recognition is the first stage of document analysis. Since pre-recognition may take considerable time, FlexiLayout Studio allows you to carry out pre-recognition once independently of FlexiLayout matching, so that you can concentrate entirely on creating and testing your FlexiLayout.

However, you need to assess the quality of the pre-recognition results before you start creating your FlexiLayout. The quality of pre-recognition depends on the quality of the test images in the batch. The quality of the test images, in its turn, depends on the scanning parameters such as brightness, contrast, and resolution. If you are not satisfied with the quality of the pre-recognition results, you may need to change the scanning options and re-scan your test documents. Note also that FlexiLayout Studio allows you to add images scanned at different resolutions, so that you can experiment with pre-recognition and FlexiLayout matching and select the optimal scanning options.

Pre-recognition can be run in fast or full mode (see Pre-recognition parameters for details). When FlexiLayout is being developed, pre-recognition need not be perfect. There is always a way of finding practically any data field even if several recognition errors have been made. Indeed, sometimes pre-recognition speed is more important than quality - the quality of recognition may be tackled at a later stage in a data capture application where you can specify data types for each field, thereby greatly improving the quality of recognition.

During pre-recognition, the program analyzes the locations of dots of various colors, detects basic objects, and merges text fragments into words and lines.

The program detects the following types of basic object:

·Text

·Picture

·Punctuation mark

·Inverted text

·Separator

·Barcode

·Checkmark

Once basic objects have been detected, the program starts recognizing the text objects. Recognized text can be viewed of the following two types:

·Recognized Words

·Recognized Lines

More:

listPicture Pre-recognition parameters

listPicture Running pre-recognition and viewing the results

listPicture Analyzing images


Pre-recognition parameters

FlexiLayouts and classifiers have a variety of user-defined settings, including pre-recognition settings such as recognition languages, text type, pre-recognition modes and areas. Selecting the right pre-recognition settings will help you create FlexiLayouts and Classifiers that are well-suited for processing your documents.

You can change pre-recognition settings in the Pre-recognition Properties dialog box. To open this dialog box:

·Click Properties... on the FlexiLayout or Classifier menu or on the shortcut menu of the FlexiLayout or Classifier.

·Click the Advanced Pre-recognition Properties... button on the General tab of the Properties of %Name% dialog box.

The Pre-recognition Properties dialog box will open. The options available in this dialog box are listed below.

Option

Description

General tab

Name

The method that was used for printing the text on the documents:

·Typographic,

·Matrix printer,

·Typewriter.

Determine the type of text and evaluate its quality before selecting these options.

Pre-recognition mode

Three pre-recognition modes are available: Fast, Balanced and Thorough.

In the fast mode, color and grayscale images are first binarized (i.e. converted to black and white). Fast mode saves time and produces good results for most documents. In the balanced mode, color-sensitive recognition is applied. The balanced mode is slower than the fast mode, but it provides better recognition quality. The through mode is recommended if poor quality documents are used and other modes result in too many errors.

By default the balanced mode is selected.

Languages tab

Text languages

The languages used in the documents. You can select one or several languages from the drop-down list. For the full list of available languages, see OCR languages supported in ABBYY FlexiLayout™ Studio.

User dictionaries

This group of options lets you add user dictionaries. User dictionaries are used to improve recognition quality by supplementing built-in dictionaries with specialized vocabulary, abbreviations, company names, etc.

Advanced tab

Barcodes

This group contains two barcode processing options:

·Disable barcode extraction – Select this option if barcodes should not be found on your images. This will speed up document recognition considerably.

·Extract 2D barcodes: Data Matrix, Aztec, QR Code – Select this option if the images you need to process contain Data Matrix, Aztec and QR Code barcodes. If this option is not enabled, these barcodes will not be detected by the program on images, and will not be available in the Barcode element's properties.

·Extract post barcodes - Select this option if your images contain postal barcodes, e.g. Australia Post. If this option is not selected, postal barcodes will not be found on images and will not be available in the Barcode element properties.

warning Important! Extracting postal barcodes slows down recognition.

CJK

Contains options for processing CJK (Chinese, Japanese, and Korean) languages.

·Separated furigana mode – Select this option to improve recognition quality when processing Japanese text with furigana (pronunciation aids).

NER recognition

Extract named entities – Select this option to extract meaningful information from a field or field group using NLP methods.

note Note. This option is only available for licenses that include an NLP module.

Vertical text extraction

Vertical text extraction parameters:

·Extract for all languages – Detects vertically-oriented text written in any of the supported languages.

·Do not extract – Prevents the detection of vertically-oriented text.

·Extract for CJK languages – Detects vertical text written in Chinese, Japanese or Korean.

Pre-recognition area

The area to be pre-recognized. You can specify position of pre-recognition area relative to page edges.

User pattern

This option allows you to add a user pattern created in ABBYY FineReader Professional/Corporate Edition 9.0. We recommend using these user patterns if your documents contain non-standard fonts and characters.


Running pre-recognition and viewing the results

To run pre-recognition:

1.In the Batch window, select one or more images in the batch.

2.Right-click in the Batch window or in the Image window, and select Prerecognize.

to display the recognized objects on the image:

1.Open the image.

2.Select the objects you wish to view (View → Images → Objects):

oShow All Objects (or click all the buttons on the Extracted Objects toolbar),

oRecognized Words (or click [image]),

oRecognized Lines (or click [image]),

oSeparators (or click Separators),

oRaw Objects (or click [image]),

oBarcodes (or click Barcodes).

note Note.To select multiple types of objects, hold down the Ctrl key while clicking the desired buttons on the toolbar or selecting the menu items.

You can view the properties of each object on the image in the Properties window. Click the object whose properties you wish to view. The properties of the selected object will be displayed in the Properties window.


Analyzing images

You need to analyze the images in the batch in order to find objects which can form the backbone of your FlexiLayout, i.e. you need to find objects which are present on all of the images and which can be reliably detected by the program.

Another important decision you need to make when analyzing the images is in which order to describe the objects, as this order determines the order in which the program will use the elements when matching the FlexiLayout with images.

The general scenario is as follows:

1.Look through the images in the batch.

2.Visually try to find objects which are present on most of the images and occur on each image only once. Such objects will be created in the beginning of FlexiLayout creation.

3.Find an object (or objects) which can be used as the identifier. This can be the title or any other object which unambiguously identifies the document as belonging to a particular type. The identifier object must be present on all of the documents and, if possible, recognized without errors. We recommend marking the element which will describe the identifier object as required element. If the program fails to find the object corresponding to this element, FlexiLayout matching will be stopped, which will mean that the document does not belong to the document type described by the FlexiLayout

4.Consider the order in which you will create elements and how they will be arranged in the FlexiLayout tree. The order of elements in the tree will determine the order in which the program will look for the corresponding objects on the images.

5.Consider the methods that can be used to find each of the objects. In the FlexiLayout, these methods will be described by means of element properties. Start with the most reliable objects, i.e. those which are present on most of the images and which do not occur too often on the same image. Later they can be used as starting points, or reference elements, to look for less reliable elements.
Be sure to select the strictest search criteria, so that the program formulates the most reliable hypothesis.
To prevent an uncontrollable growth of the tree of hypotheses, we do not recommend changing the default value in the Number of surviving hypotheses field.

6.Consider grouping some of the elements into Group elements. Group elements are convenient for testing parts of the FlexiLayout which are independent of one another. For example, a FlexiLayout made up of a total of 100 elements, may include only 3 Group elements at the highest level - the title, the body, and the bottom of the document. Each of the three Group elements may be made up of Group elements which describe smaller portions of the document. Such nesting of Group elements reduces the number of possible search combinations and makes debugging the FlexiLayout easier, as you can work with each part of the FlexiLayout independently.


Elements

An element describes one or more image objects, such as separators, static text, pictures, etc. An element contains information about the type of the object, its geometrical features, its likely location, and relationships with other objects. The program uses the properties of an element to look for the object it describes and determines a region for the object. A region is made up of one or more rectangles enclosing the object. Next the program uses the detected objects to locate blocks.

Elements fall into simple (Static Text, Separator, White Gap, Barcode, Character String, Paragraph, Object Collection, Date, Phone, Named Entity, Currency, Region, which do not contain any other elements, and compound (Group, Repeating Group, First Found, Labeled Field, Header , Footer). You can convert elements of one type into elements of another type but you cannot convert compound elements into simple elements or vice versa. A Table element is neither simple nor compound and cannot be converted into an element of any other type. To convert an element, select the Convert To command on its shortcut menu.

An element may be displayed differently depending on its properties:

·disabled elements are shown in gray

·required elements are marked with green checks

·prohibited elements are marked with red checks

Elements are joined together to form layout alternatives. In the project tree, each layout alternative is marked with [image].

More:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional Search Constraints

listPicture Training elements


Creating, copying, and deleting elements

To create an element:

1.Activate the FlexiLayout window.

2.Go down the FlexiLayout tree to the nesting level where you wish to create an element (SearchElements is the first nesting level).

3.Select the type of the element in FlexiLayout → Add Elements → [Type].

4.Specify the element’s properties, search area, and additional search constraints if required. For a detailed description of each element and its properties, consult the corresponding section of this help file.

warning Important!The name of an element may contain letters (Roman characters, Roman characters with diacritics, Cyrillic characters), digits, and underscores. The name of an element must start with a letter or an underscore. The name of an element must not contain spaces or any the following special symbols: '.', ',', ':', '-', '\', '/'.

When viewing pre-recognition results, you can quickly create elements based on the current image. The following methods are available.

1.Point the mouse to a recognized object and double-click it. A Select Element Type dialog box appears.

2.Select the desired element type and click OK to confirm.

Alternatively:

1.On the toolbar, click NewElementButton to activate the element creation mode.

2.Point the mouse to a corner of the rectangle from which the new element is to be created.

3.Holding down the left mouse button, drag the mouse pointer diagonally to the opposite corner. A rectangle will be displayed from which the new element is to be created.

4.Release the mouse. A Select Element Type dialog box appears.

5.Select the desired element type and click OK to confirm.

You can move the created element to another level in the FlexiLayout tree using the drag-and-drop function. Note, however, that if the FlexiLayout tree contains elements or blocks which refer to the moved element, you will need to adjust the corresponding properties of the elements and blocks concerned. FlexiLayout Studio will automatically highlight the elements affected by such move.

note Note.Once you have created a Group element, you need to add simple or Group elements into it. To add elements into a Group element:

·Drag and drop the element you wish to add,

or

·Click the Group element in question and create new elements of the required types within this element.

To move or copy elements:

1.Select the desired element in the branch. To select multiple elements, hold the Ctrl key and click the elements you want to copy. To select several consecutive elements in the branch, hold the Shift key and click the first and last element you want to copy.

2.Move or copy the selected element(s):

oHold down the Ctrl key and use the mouse to drag the element to the desired location in the tree of elements.

oCopy elements using the Copy and Paste commands on the Edit menu or the shortcut menu, or the Copy and Paste buttons on the toolbar.

You can copy any existing element, including Group elements. You may have to edit the properties of the copy, but it is still faster than creating several similar elements from scratch. The name of the copy is built from the name of the original elements and the number of the copy.

To delete an element:

1.Switch to the FlexiLayout window.

2.Select the element you wish to delete. To select multiple elements, hold the Ctrl key and click the elements you want to delete. To select several consecutive elements in the branch, hold the Shift key and click the first and last element you want to delete.

3.Right-click the element and select Delete from the shortcut menu.

More:

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints


An overview of element properties

Properties of elements are specified in the Properties of %element name% dialog box or in the Properties pane. To open the Properties of %element name% dialog box, right-click an element and click Properties on the shortcut menu. After the FlexiLayout has been applied, you can also open the Properties of %element name% dialog box by double-clicking an element in the hypotheses tree.

All properties of an element other than its name and comment serve to describe the object that needs to be found (the object represented by the element), i.e. they describe its properties and search area. Properties of elements can be divided into the following groups:

·General properties
These properties do not depend on the type of element and are specified on the General tab:

oName is the name of an element. The name of an element may contain letters (Roman characters, Roman characters with diacritics, Cyrillic characters), digits, and underscores. The name of an element must start with a letter or an underscore. The name of an element must not contain spaces or any of the following special symbols: ' . ', ' , ', ' : ', ' - ', ' \ ', ' / '. The name of an element may not coincide with any of the reserved words or FlexiLayout language predefined types.

oFull name is the full name of the element. It consists of the name of the FlexiLayout to which the element belongs and the name of the element itself.

oComment is a comment or description of an element provided by the user.

oSearch Control specifies whether the element is required, optional, or prohibited. For details, see the Required, optional, and prohibited elements section.

oNull hypothesis quality is the quality of the null hypothesis (this property is available if Optional element is selected in the Search Control section). The default value is 0.97.

oDo not find element if can be used to specify a condition that, when satisfied, prevents the program from looking for the element. The condition is based on whether or not the reference element was detected. If you specify more than one condition, the Do not find element if command will only work if all of the conditions are satisfied.

oNumber of surviving hypotheses - the user can use this parameter to limit the number of hypotheses which the program may use when looking for the subsequent element. By default, this parameter is set to 5 for simple elements, and to 1 for Group elements.

oMin number of found subelements is the minimum number of detected subelements to consider the element detected. This property is available only for compound elements (i.e. Group , Header, Footer, Repeating Group , and Line of Elements).

·Properties that describe the geometrical features of an object

These properties are specified on the tab which names the type of the element. Each type of element has its own set of geometrical properties. For details, see the section of this help file where the corresponding element is described.

·Properties that describe the search area

These properties are specified on the Search Constraints tab. For the Currency, Date, Phone, Character String, Static Text, and Paragraph elements, vertical text recognition is additionally available.

·Properties that define the search area of an object relative to other elements

These properties are independent of the element type and are specified on the Relations tab.

·Properties that describe additional search constraints

These properties are specified on the Advanced tab and are checked during and after the search.

·Element fields

An element field is a typed variable that belongs to an element. Element fields are defined ion the Advanced tab. For more about element fields, refer to the Element fields section.

You can open several properties dialog boxes of elements at a time. This makes it possible to copy the properties of one element to another, but only properties that are inherent to the target element (so you cannot, for example, copy the Max width property to a Static Text element). You can also copy the value of an object's property from the Properties dialog box and paste this value to the properties dialog box of an element.

More:

listPicture Required, optional, and prohibited elements

listPicture Search area

listPicture Additional search constraints


Required, optional, and prohibited elements

A distinguishing feature of semi-structured documents is that sets of fields may vary from one document to another. For this reason, when creating an element, one must bear in mind that the objects(s) described by the element may be absent on some of the image and therefore will not be detected. Additionally, image information may be lost if incorrect scanning results in dark or bright patches on an image. In this case the objects located in such patches will not be detected either. FlexiLayout Studio can go on searching for elements even if a particular element has not been detected. To allow FlexiLayout Studio to continue matching the FlexiLayout even if a particular object has not been detected, you need to mark this object as optional.

Objects described by required elements must always be present on the images and the program must find then when matching the FlexiLayout with images. If the object is not detected, FlexiLayout Studio stops matching the FlexiLayout.

Use required elements to find identifier objects. An identifier object prevents matching the FlexiLayout with a document that belongs to a different type not described by the current FlexiLayout. You can also use required elements to describe objects whose absence means that any further search would be useless.

In all other cases, use optional elements to describe image objects.

Objects described by such elements need not be present on the image or the program may not detect them when matching the FlexiLayout. The matching will still continue and the program will detect the objects described by other elements.

By default, all simple elements are optional.

note Note.Unlike simple elements, all Group elements are required by default.

The presence of a certain element in a chain of hypotheses may mean that the chain is not correct and should be discarded. These elements are termed prohibited elements. When the program hits on a prohibited element, it stops generating hypotheses in the branch where the prohibited element has been encountered.

Thus, elements may be used to identify a document (required elements), to detect blocks (required and optional elements), and to discard incorrect hypotheses (prohibited elements). Prohibited elements may be used, for example, to prevent false FlexiLayout matching.

You can specify how an element should be used it its Properties dialog box (General tab).

Required and prohibited elements are indicated as follows:

·required element are marked with green checks:

·prohibited elements are marked with red checks:


Element properties

Header and Footer

Group

Labeled Field

Line of Elements

First Found

Static Text

Character String

Paragraph

Date

Currency

Phone

Named Entity

Separator

White Gap

Barcode

Object Collection

Region

Table

Repeating Group


Header and Footer

The program uses Header and Footer elements to detect the beginning and the end of a document. These are Group elements and have all the properties of Group elements, but may occur in a FlexiLayout only once.

In the tree of elements, the Header element is marked with Header and the Footer element is marked with Footer. The Header and Footer elements are located at the top of the tree.

To add a Header or Footer element, right-click in the FlexiLayout and select Header / Footer.

A Group element may be converted into a Header or Footer element by selecting the Convert to Header or Convert to Footer command on its shortcut menu. You can also convert a Header or Footer element into a common Group element by selecting Convert to Group on its shortcut menu.

To test the Header and Footer elements on a particular page, use the Test Header and Test Footer commands.

See also:

listPicture Multi-page FlexiLayout

listPicture Using Header and Footer elements to detect the beginning and the end of a document


Group elements

Group is a collection of several elements (termed subelements). Subelements, in turn, can be Group elements.

Group elements are marked with Group in the FlexiLayout tree.

note Note.Group elements also include: Header , Footer, First Found and Repeating Group. Use Header and Footer elements to detect the beginning and the end of a document. Header and Footer elements may each occur in a document only once. Repeating Group is a recurring Group element. A Labeled Field element may also be represented as a compound element.

If required, you can specify the minimum number of subelements to be detected. If applying the FlexiLayout detects fewer elements, the compound element will be deemed not detected.

A Group element, just like a simple element, can be required, optional, or prohibited. If an optional Group element includes a required element, the failure to match this element with an object will result in a null hypothesis for the Group element and the program will continue trying to match the FlexiLayout.

Be sure not to keep empty compound elements (i.e. compound elements without any subelements). If the program encounters an empty compound element when compiling a FlexiLayout, it will display a warning message. If you FlexiLayout makes no use of the compound Header and Footer elements, which are added by default, delete these redundant elements.

Group elements are useful in the following cases:

·to make testing independent parts of a FlexiLayout easier. For example, a FlexiLayout made up of 100 elements may include only 3 Group elements - the title, the body, and the bottom of the document. Each of the three Group elements will contain Group elements describing smaller portions of the document. This approach both limits the number of possible variants to consider and makes debugging the FlexiLayout easier, as each group can be edited and tested independently.

·to make navigation in the FlexiLayout tree easier.

·to reduce the number of possible element hypotheses, thereby speeding up the formulation of the final hypothesis. Grouping elements together allows the program to consider a set of elements as one whole, for which a single hypothesis has been formulated (albeit consisting of the hypotheses for subelements) and for which the quality can be calculated. Considering various combinations of subelement hypothesis goes inside the group and only a set number of the best group hypotheses are used in the search down the tree. The default number of best hypotheses for a Group element is 1.

note Note.We do not recommend increasing the maximum number of hypotheses, as this may lead to an uncontrollable growth of the tree and failure to match the FlexiLayout with the images.

·A Group element allows you to specify a search constraint common to all of the subelements. The search area for a particular element will be calculated as an intersection of the search area specified in the subelement and the search area of the entire group.

note Note.Sometimes, the intersection of the search area of a Group element and one of its subelements may be empty, and the program will fail to find the subelement. Try to specify only simpler relations for Group elements, e.g. "Above: PageRect.Top + PageRect.Height/2;" (i.e. "look for the element in the upper half of the image"), or not specify any relations at all.

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints


Labeled Field

Navigation: Elements > Element properties >

Return to chapter overview

Labeled Field

Show/Hide Hidden Text

Labeled Field is a compound element which the program uses to search for fields that have names. A Labeled Field element includes the following subelements:

·Static Text, which contains the name of the field

·White Gap, which describes the gap between the name and the data of the field

·an element which describes the contents of the field; the type of this field depends on the type of field contents

Labeled Field elements are marked with [image] in the tree.

If required, a Labeled Field element may be represented as a group.

When searching for the name of a field, the program will consider the Recognized Words and Recognized Lines objects detected by pre-recognition and falling within the element's search area. Once the name of the field is detected, the program searches for a field whose contents matches the description provided in the element.

Name properties

The name of a field is described by a Static Text element.

The properties of the name are specified on the Label tab of the element's Properties dialog box. To open the element's Properties dialog box, in the FlexiLayout window, right-click the element and select Properties... from the shortcut menu.

Show Properties dialog box, Label tab

Position of a field relative to its name

The position of a filed relative to its name is specified on the Field Position tab.

Show Properties dialog box, Field Position tab

·Field Position
Specifies the position of the field relative to its name (to the right, to the left, above, or below).

·Field alignment
Specifies the alignment of the field's search area relative to the rectangle enclosing the name. The value here depends on the value of the Field Position field:

oIf the field is positioned to the right or to the left of the name, its search area may be aligned by the top or bottom boundary, or it may be centered

oIf the field is positioned above or below the name, its search area may be aligned by the left or right boundary, or it may be centered

·Minimum space
Specifies the minimum space between the name and the field (in user-defined units of measurement)

·Search area width
Specifies the width of the search area (in user-defined units of measurement)

·Search area height
Specifies the height of the search area (in user-defined units of measurement)

·Detect indent size
A flag that specifies whether a White Gap element should be used to detect the distance between the field and its name. If this option is cleared, the search area of the distance begins from the value specified in the Minimum space field. Otherwise, starting from this distance, an auxiliary White Gap element is generated and the search area begins after this element.

Field search constraints

The search constraints for a field are specified on the Field Position tab.

Show Properties dialog box, Field tab

Field Content - specifies the type of the field's contents. Depending on the type of the field, the Field Position tab may include additional search constraints:

Fixed variants

This type coincides with type Static Text and has the same properties.

Number This type has the following properties:

·Value interval
The range of possible values. Possible values range from -2147483648 to 2147483647.

·Signs and Separators includes two settings that determine whether the program should look for signs and fraction separators:

oTake sign into account indicates that the number can have a sign.

oCan be fractional indicates that the number can include a fractional part.

Currency

This type has the property Currency names, which is completely identical to the property of the Currency type of the same name.

Date

This type coincides with type Date and has the same properties.

Phone

This type has the properties Min number of digits and Max number of digits, which are completely identical to the corresponding property of type Phone of the same names.

Character string

This type has the following properties:

·Alphabet specifies a set of allowed characters. Works in the same way as the Alphabet property from the Character String type.

·Regular expression specifies the expression to be used as the search pattern. This property is completely identical to the property of type Character String of the same name.

·Min length specifies the minimum length of the string

·Max length specifies the maximum length of the string

More:

listPicture Creating, copying, and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for a Labeled Field element


Line of Elements

A Line of Elements is a group-type element for detecting simple child elements of various types when they are positioned in one line. Detectable child elements are Static Text, Character String, Date, Currency, Phone, fragments of text (Any Text) and numbers (Number).

The Line of Elements can be used to detect:

·Table headings.

·Headings in documents the content of which is almost identical.

Lines of Elements are represented by the [image] icon in the project tree.

When the program searches for elements, it examines Recognized Words objects that were found during pre-recognition and are located in an element's search area.

The search area of the Line of Elements element is the area between the left-most and right-most child elements (these child elements are included in the search area).

Line of Elements settings that affect child elements

You can edit the properties of a Line of Elements on the Line of Elements and Child Elements tabs of the element properties dialog. To open this dialog, right-click an element in the FlexiLayout window and then click Properties… in the shortcut menu.

The Line of Elements tab contains the following settings:

·Elements line accuracy
Determines the maximum vertical offset between child elements. The default setting is 20 units.

·Allow text between elements
If this option is enabled, the program will detect child elements that are described in the Line of Elements element even if there is text between these child elements.

You can specify the child elements of a Line of Elements and their properties on the Child Elements tab.

To add a new sub-element, click the Add new button. Then, in the Add New SubElement dialog box, specify the new child element's name and select its type from the drop-down list. The following sub-element types are available: Static Text, Character String, Any Text, Date, Currency, Phone and Number. A sub-element's type can only be specified when the sub-element is created and cannot be changed later.

To delete an element, select it and click the Delete button.

Child elements are listed in the Child Elements field. When a FlexiLayout is applied, the program attempts to detect the child elements in the same order in which they are described in the Line of Elements. You can change the order of child elements using the [image] and [image] buttons.

The properties of any selected element are displayed in the Element parameters group. The appearance of the element properties editor changes depending on the type of element that was selected.

Changes to the parameters of a child element are applied when you select a different child element or tab. To apply all changes to the list and to child element properties, click the Apply button.

More:

Creating, copying, and deleting elements

An overview of element properties

Search area

Additional search constraints for Labeled Field element


FirstFound

Navigation: Elements > Element properties >

Return to chapter overview

First Found

First Found - is a group element used to detect the first occurrence of a subelement of the group. The search is carried out until a subelements of the group is found, then the search stops. The search result is the element which is found first.

In the project tree, First Found elements are marked with firstfound.

A First Found element can be used for sequential search for the same block first with a more reliable condition and then, if the block is not found, a less reliable condition is used.

Possible use:

·Searching for a date on the image, where the program searches for an element of the Date type first, and then if the element is not found, an element of the Character String type is searched for.

A First Found element is different from a Group element in that you needn't manually specify stopping conditions for the search when using the First Found element. You only need to include all required subelements in the First Found group element in the right order. The conditions under which the search continues or stops apply automatically.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for First Found element


Static Text

Show/Hide Hidden Text

Static Text is an element of a FlexiLayout which describes some pre-defined text. The text may consist of a word or of a phrase. Phrases are different from words in that they contain at least one space. A phrase may be written in several lines.

Static Text elements are marked with [image] in the FlexiLayout tree.

The program uses Static Text elements to search for static text, i.e. for text which is known in advance. The program will consider Recognized Words and Recognized Lines objects detected during pre-recognition and located in the element’s search area as static text candidates.

Usually all or many images in the batch include static text. This may be the heading of the document (e.g. Invoice) or the names of fields (e.g. Date, to:, From:). Such objects are detected as Recognized Words during pre-recognition are usually used as "signposts" when looking for any text which may be entered in their corresponding fields: for example, it is natural to expect a date next to the static text "Date".

The properties of a Static Text element

Click the Search text from file tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Static Text tab

·Search text
the text to find on the image.
If you need to find a phrase or several words and you know that they will always be located on the same line, it is recommended to ignore spaces (i.e. leave unchecked the option Take spaces into account), as this will speed up the search. In this case, you can type in your search phrase without spaces - the program will remove them anyway if the Take spaces into account option is not selected.

E.g.:

to find the name 'Purchase Agreement' which is written in one line on all of the documents, you need to enter PURCHASEAGREEMENT.

Use a vertical line (the symbol '|') to separate variants.

E.g.:

If similar documents may have such names as Contract or Agreement, you need to enter CONTRACT|AGREEMENT.

Variants of phrases are enclosed in curly braces and separated by a vertical line: { }|{ }. You can list variants of words within phrases (the Take spaces into account option must be selected).

E.g.:

If you enter {SALE|PURCHASE AGREEMENT|CONTRACT}|{CUSTOMER|CLIENT APPLICATION} in the Search text field, the program will look for the following phrases: sale agreement, purchase agreement, sale contract, purchase contract, customer application, client application.

To enter long strings, click Button which opens a separate data entry window.

·Search text from database
You can search for a text fragment from a database on your image. An SQL query starting with the SELECT command is used to search for the relevant fields in the table. The program will search on the image for the text contained in the found field.

oEnter the data base connection string in the Connection string fields or click Button to open the standard database connection dialog box.

oType your query in the Query text field. You can also click Button to open a separate data entry window where you can type in your query.

·Search text from file
You can search for a text fragment from a file. Click the Browse... button to select the desired file. For details about using databases and files, see Using databases and text files in the FlexiLayout language.

·Max number of errors
- the maximum number of errors in the word. The program will check each word in the phrase if the words in the phrase are separated by spaces. Otherwise the phrase will be considered to consist of only one word. If the number of errors in a word is higher than the number specified in this field, the word is considered not detected. One error corresponds to one delete, paste, or replace operation required to adjust the text so that it corresponds to the text typed in the Search text field.
By default, the value of this property is unlimited.

E.g.:

Suppose the Search text field contains the word 'meet' and the maximum number of errors is set to 1. If the program finds the word 'moot' in this search area, there will be 2 errors in the word and the word 'meet' will be considered not found.

·Max error percentage
the maximum percentage of errors in the word (calculated as the ratio of the number of errors in the hypotheses to the number of letters in the hypothesis). If the percentage of errors in a word is higher than the percentage specified in this field, the word is considered not detected. The default value is 30%.

note Note.If you specify both the maximum number of errors and the maximum percentage of errors, the program will use the more strict criterion and ignore the other.

·Max space length
allows you to specify the maximum length of the space inside the detected object.

·Whole words only
searches for whole words only.

·Match case
enables case-sensitive search (the program distinguishes between small and capital letters).

·Take spaces into account
allows spaces in the search string. If this option is not selected, spaces will be removed from the search string. Ignoring spaces makes the search faster. However, if your search phrase may be located on multiple lines or if some words in the phrase may be missing, you need to enable the Take spaces into account option and type in your search phrase preserving the spaces.

The following options are available only if Take spaces into account is selected:

·Permit multiple lines - allows the phrase to be written in several lines.

·Line break penalty - sets a penalty for line breaks words. The penalty is a number from 0 to 1. The quality of the hypothesis will be multiplied by this number as many times as there are line breaks in the phrase. If line breaks are allowed in the phrase, set this parameter to 1 (multiplying the quality of the hypothesis by 1 will not downgrade its quality).

·Permit missing words - allows missing words in the phrase.

·Missing word penalty - sets a penalty for missing words. The penalty is a number from 0 to 1. The quality of the hypothesis will be multiplied by this number as many times as there are missing words in the phrase. If some words may be absent in the phrase, set this parameter to 1 (multiplying the quality of the hypothesis by 1 will not downgrade its quality).

Recommendations on creating a Static Text element

Since static text is known in advance, a Static Text element can be used as a reference element to look for other image objects. Use the following guidelines:

·to make sure that the selected static text can be reliably recognized on all of the images, view the pre-recognition results on all of the images by clicking [image] or [image] for words and phrases respectively. Make sure that the letters are correctly grouped into words and words are correctly grouped into lines.

·It is best to select static text printed in larger letters which remains the same even on poor quality scans or in which the number of OCR errors is predictable.

·If there is only small print static text on the documents which cannot be reliable recognized during pre-recognition (i.e. the number and types of errors are very different on different images), such text fragments are better described not as Static Text but as Object Collection with the Text and Punctuation mark options selected. (You may also need to select the Picture option - click [image] (Raw Objects ) on the toolbar and select the corresponding object on the image. The type of the object will be displayed in the DataType line in the Properties window.)

·It is preferable to select unique static text fragments so as to prevent wrong hits and to keep additional search constraints to a minimum.

·If there are both single-word names (which you plan to find by means of Static Text elements) and phrase names which contain the same words as single-word names, first create elements for the phrases. This will prevent the program from wrongly detecting single-word names within phrase names.

Recommendations for hieroglyphic languages

For strings in Chinese, Japanese and Korean languages, a special search parameter can be used. The parameter affects the method of counting the number of errors in the found hypothesis as compared with the specified value of the Search text element. If this parameter is enabled, then in operations of insertion/deletion/replacement a character which are counted as one error each, only characters (hieroglyphs) with similar tracing are allowed as replacement characters. Thus, replacing a character with a similar character is counted as one error, while replacing it with a dissimilar character is counted as two errors because of two performed operations which are deleting a character and inserting a new one.

Enabling this search mode affects search for strings in Chinese, Japanese and Korean languages only.

note Note.For these languages, a whole word search is not available, because texts written in these languages are often not divided into words explicitly.

To enable this search mode, enter the following code into the Advanced pre-search relations pane of the Advanced tab:

SuggestOnlySimilarChars(Logic value = true);

By default the SuggestOnlySimilarChars parameter is set to false.

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints for Static Text element


Character String

Show/Hide Hidden Text

Character String is an element of a FlexiLayout which describes a string of characters written in one line from left to right. Character strings may consist of words or parts of words.

Character String elements are marked with [image] in the FlexiLayout tree.

Character String elements are used to look for unspecified text. The program will consider as candidates the Recognized Words objects detected during pre-recognition in the element’s search area.

Usually, character strings are located next to static text. When looking for the Ref. No. of a document, for example, the program must first find the static text "Ref. No." and then look for digits next to it.

Describing the search text

Click the Character String tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Character String tab

The text to find can be described in one of two ways.

Describing search text by means of a regular expression

A regular expression defines possible combinations of characters. If you use a regular expression, the hypothesis must meets its conditions. This method is usually used on good quality documents which are recognized without errors.

To enter a regular expression, select the Regular expression option and enter the expression in the field next to it. You can also click the Button button, which opens a drop-down list of options (Any Letter, Character From Set, etc.). Select the desired option to enter the corresponding regular expression into the field.

Regular expression alphabet
Name in the list | Symbol in the field | Example
Any character | * | "k"*"t" – allows 'kit', 'kat', etc.
Letter | C | C"at" – allows cat, bat, Rat, mat, etc.
Upper case letter | A | A"at" – allows Cat, Bat, Rat, Mat, etc..
Lower case letter | a | a"at" – allows car, bat, rat, mat, etc.
Letter or digit | Х | X – allows any single letter or digit.
Digit | N | N"th" allows 5th, 4th, 6th, etc.
String | "" | "cat"
Or | | | "dr"("i"|"u")"nk" – allows "drink" or "drunk".
Character from the set | [] | [hm]"at" – allows 'hat' or 'mat'.
Character not from the set | [^] | [^b]"at" – allows 'cat', 'mat', 'rat', but does not allow bat.
Any number of repeats (applies to the expression or sub-expression to the left) | {-} | [AB74]{-} – allows any combination of A, B, 7, 4 of any length.
Number of repeats is n | {n} | N{2}"th" allows 25th, 84th, 11th, etc.
n to m repeats | {n-m} | N{1-3}"th" allows 5th, 84th, 111th, etc.
0 to n repeats | {-n} | N{-2}"th" allows th, 84th, 4th, etc.
n or more repeats | {n-} | N{2-}"th" allows 25th, 834th, 311th, 34576th, etc.
Subexpression | () |

Describing search text by means of an alphabet

An alphabet lists characters that may occur in the search text. This methods is used whenever the character string cannot be described by means of a regular expression or there are too many errors in the recognized text as a result of poor image quality. You can specify several alphabets for a Character String element. If the format of the text is unknown, no alphabets are specified. In this case the program will consider all possible characters when looking for the object corresponding to the element.

To describe search text by means of an alphabet:

1.Select a hypotheses generation mode. To use the characters in the search area to generate all the possible hypotheses, including intersecting and embedded hypotheses, select Allow embedded hypotheses. To generate hypotheses of maximum length, clear Allow embedded hypotheses.

2.Create one or more alphabets.
More about creating, editing, and deleting alphabets

To create an alphabet:

1.Click Add....

2.In the Add New Alphabet dialog box, select the required code page from the Code page list,

3.In the Character map, select the characters which occur in the search text. The selected characters and their number are displayed in the Selected on screen/selected in all field.

4.In the Percentage of alphabet characters field, specify the required percentage of alphabet characters in the search text.

note Note.You may specify several alphabets, but they must not overlap, i.e. include the same characters.

To delete an alphabet, select it in the Alphabets list and click Delete.

To add or delete alphabet characters, select the required alphabet in the Alphabets list and then click Edit....

3.In the Percentage of non-alphabet characters field, specify the allowed percentage of characters which do not belong to any of the alphabets.

Depending on the method used to describe the search text, you may need to specify the following properties:

1.Select Whole words only if you wish to find whole words only.

2.Use the Detect words by interword space option to specify how lines should be divided into words. Disable this option to detect words automatically. Enabling this option will divide a line into words whenever the space between neighboring characters is greater than or equal to the value entered in Min interword space.

note Note.In the case of automatic word detection, word ends are detected based on spaces or other symbols that separate words (e.g. " , ", " ; ", " / ", " ? " - the exact set of symbols depends on the selected pre-recognition language), or based on other attributes. To make sure that the program correctly divides lines into words, review the text objects on the test images (View → Images → Objects → Recognized Words).

3.In the Word count fields, specify the number of words in the character string. The number of words is specified by means of a fuzzy interval. The default interval is {-1,-1,INF,INF} (i.e. the program looks for hypotheses containing any number of words).

4.In the Max space length field, specify the maximum length of the space inside the object. Measured in the user-defined units of measurement. You can estimates the length of the space by looking at the coordinates of the neighboring objects. Rest the mouse cursor on a neighboring objects to display its coordinates in the status bar. When looking for a text, characters will be added to the character string until the distance between neighboring elements exceeds Max space length.

5.In the Character count field, specify the length of the character string (i.e. the number of characters in the string). The number of characters is specified by means of a fuzzy interval and assesses the quality of the hypothesis based on its length.
Use the [image] button to specify fuzzy intervals in a separate window that visualizes fuzzy intervals for your convenience.

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints for Character String element


Paragraph

Show/Hide Hidden Text

Paragraph is an element that describes a paragraph. When searching for the paragraph, the program will consider all text objects wholly or partially contained within the search area.

A Paragraph element is marked with [image] in the tree of elements.

This element is used to search for text paragraphs whose text is unknown. The program will consider the Recognized Words and Recognized Lines objects detected by pre-recognition and falling within the element's search area.

The properties of a Paragraph element

The properties of a Paragraph element are specified on the Paragraph tab of the element's Properties dialog box. To open the element's Properties dialog box, in the FlexiLayout window, right-click the element and select Properties... from the shortcut menu.

Show Properties dialog box, Character String tab

·Min line count
specifies the minimum number of lines in the paragraph (a fuzzy interval is used)

·Max line count
specifies the maximum number of lines in the paragraph (a fuzzy interval is used).

·Alignment
specifies the type of alignment.

·Max disalignment
specifies the maximum disalignment value in user-defined units of measurement.

·Allow first line indent
specifies whether to allow first line indent. The indent value is measured in user-defined units of measurement.

·Allow "hanging" line
specifies whether to include hanging lines in paragraphs.

·Max space in line
specifies, in user-defined units of measurement, the maximum allowed absolute length of the space inside the detected object; when searching for the text, characters are added to the string until the distance between the neighboring characters becomes greater than the value in Max space in line.

·Max interline space
specifies the maximum distance between the lines in user-defined units of measurement.

·Max relative interline space
specifies the maximum distance between the two lines relative to the height of the top line; if the distance between the lines is greater than this value, the second line does not make it into the hypothesis.

·Min line height
specifies the minimum line height (a fuzzy interval is used).

·Max line height
specifies the maximum line height (a fuzzy interval is used).

·Min line width
specifies the minimum line width (a fuzzy interval is used).

·Max line width
specifies the maximum line width (a fuzzy interval is used).

·Whole words only
specifies whether the hypothesis should include the parts of the words which are partially contained within the search area; enable this option if you need to exclude word fragments from the hypothesis

·Remove stamp
When recognizing payment documents, stamps placed over text may pose a problem. Typically, a stamp is placed in the bottom right corner of the text. The text fragment with a superimposed stamp is practically illegible and is recognized by the program as bits of phrases which make no sense. To avoid this, do not include the stamped text fragment into the block and key in the text manually from the image (and you won't have to remove the incorrectly recognized text).
If Remove stamp is enabled, the program will analyze the bottom right corner of the search area and remove any bits of text that may have been caused by a superimposed stamp.

·Ignore separators
specifies whether separators should be ignored when searching for the paragraph; disable this option if the paragraphs are marked off by separators

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Paragraph element


Date

Show/Hide Hidden Text

Date is an element of a FlexiLayout which describes a date.

Date elements are marked with [image] in the FlexiLayout tree.

Dates may be in many formats, but the day and year must always be designated by numbers, whereas the month may be written either in figures or as a word. The format is selected by the user.

The properties of a Date element

Click the Date tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Date tab

Format group

·Date
date format:

oDay, month, year,

oMonth, day, year,

oYear, day, month,

oYear, month, day.

note Note.You can select more than one option.

·Day
sets the number of digits in the day field.

E.g.

If the Single digit option is selected, the program will only find dates where the day is indicated by a single digit, e.g. 1.09.2005.

If the Two digits option is selected, the program will only find dates where the day is indicated by two digits, e.g. 01.09.2005.

If both options are selected, the program will find both single-digit and double-digit dates, e.g. 1.09.2005 and 01.09.2005.

·Month
sets the number of digits in the month field.

E.g.

If the Single digit, option is program, the search will only find dates where the month is indicated by a single digit, e.g. 1.9.2005.

If the Two digits, option is selected, the program will only find dates where the month is indicated by two digits, e.g. 1.09.2005.

If both options are selected, the program will find both single-digit and double-digit dates, e.g. 1.9.2005 and 1.09.2005.

If Word is selected, the month can be spelled out as a word.

note Note.If you select this option, you need to specify the language in which the name of the month will be written.

·Year
sets the number of digits in the year field.

E.g.

If Two digits is selected, the program will only find dates where the year is indicated by two digits: 01.09.95.

If Four digits is selected, the program will only find dates where the year is indicated by four digits: 01.09.1995.

If both options are selected, the program will find both 01.09.95. and 01.09.1995.

Date interval
specifies a time period: DateTimePicker1... DateTimePicker2...

E.g.

If the DateTimePicker1 contains 01.09.1995 and the DateTimePicker2 contains 1.09.2005, the date 1.05.1945 will be ignored during search.

Languages
specifies the language or languages to use when searching for the month in a date.

Supported languages: English, Czech, Danish, Dutch, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Turkish.

note Note.This property is only available if the Word option is selected for the Month property.

Separators
Day, month and year may be separated by different symbols. This property allows you to specify possible date separators. When specifying more than one symbol, do not separate them by commas or spaces. A space may also be used as a date separator, but you need not specify it as a separator - the program will still detect such date.

E.g.

.,/

In the Max space length field, enter the maximum allowed absolute length of the space inside the detected object. The space length is measured in the user-defined units of measurement. When looking for the text, the program will add characters to the string until the distance between the neighboring character reaches the value in the Max space length field.

Recommendations on creating a Date element

When matching the FlexiLayout, the program carries out a 'strict' search for dates, i.e. dates may not contain errors or excess characters. This means that dates can be found only on good quality images. Cases where the name of the month is spelled out as a word are an exception. Then 20% of errors is allowed.

If the name of the month is written in language other than supported one, you can create the following three elements to find such dates:

In a Static Text element, specify the names of all the months, separating them by '|' in the Search Text property. Be sure to enter all the possible grammatical forms.

In two Character String elements, specify digits as an alphabet, and the areas to the right and to the left of the month specify as search areas. As an additional search constraint, specify that the program must look for Character String elements only if its has already found the Static Text, element corresponding to the name of the month.

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints for Date element


Currency

Show/Hide Hidden Text

Currency is an element of a FlexiLayout which describes numerical values with a fractional part which has two digits or none at all. By default, the program allows the '-' symbol to be substituted for the fractional part, i.e. it will interpret 12.- as 12.00. The integer part of the number can be divided into orders. The default separators of the orders are . , ' and a space. The number may have a prefix or a suffix - a text element preceding or following the number. The prefix must be located on the same line as the number. This format is typical for sums of money, where prefixes are the names of currencies.

Currency are marked with Currency in the FlexiLayout tree.

The properties of a Currency element

Click the Currency tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Currency tab

To find the numerical value of the sum, you need to specify the following properties of the Currency element:

·Currency names
contains the list of possible currency names. The name of the currency may be a word or phrase or a symbol such as $ or ¥.

oTo add a currency name to the list, click the Add... button and in the Add Currency Name dialog box, enter the name of the currency;

oTo change a currency name, click Edit... and in the Edit Currency Name dialog box, make the necessary changes to the name of the currency;

oTo delete a currency, select it in the list and click Delete.

·Missing name penalty
specifies a penalty coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the program fails to find the specified name of the currency.

·Minimum value
sets the minimum value of the sum.

·Maximum value
sets the maximum value of the sum.

·Fractional part separators
the symbols that can be used to separate the integer and fractional part of the sum. A separator may consist of only one symbol. By default, the list of allowed separators includes ' , ', ' . ', and a space. When you enter separator symbols, do not separate them by commas or spaces.

·Max space length
specifies the maximum allowed absolute length of the space inside the detected object. The space length is measured in the user-defined units of measurement. When looking for the text, the program will add characters to the string until the distance between the neighboring character reaches the value in the Max space length field.

·Currency name position
the position of the currency symbol relative to the numerical value - Left of value or Right of value .

·Allow missing fractional part
specifies whether the fractional part of the number is obligatory or not. If this option is selected, the program will find such numbers as '12.' and '12.-'.

·Allow missing separator
specifies whether the fractional part separator is obligatory or not. If this option is selected, the program may find integers without separators.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Currency element


Phone

Show/Hide Hidden Text

A Phone element describes a telephone number, which is often preceded by the wordsTel.,Phone, etc. and an area or city code in brackets (see the figure below). The wordsTel., Phoneetc. and the telephone number must be typed on the same line.

Phone elements are marked with the Phone icon in the FlexiLayout tree.

The properties of a Phone element

Click the Phone tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Phone tab

You need to specify the following properties of a Phone element in order to describe a phone number:

·Prefixes for phone numbers
specify the possible words or phrases which may precede the phone number. 20% of errors are allowed in a prefix (i.e. one error for each 5 characters).

oto add a prefix to the list, click Add... and in the Add Phone Prefix dialog box, type a new prefix;

oto edit a prefix, click Edit... and in the Edit Phone Prefix dialog box, make the necessary changes;

oto delete a prefix from the list, select the desired prefix and click Delete.

·Missing prefix penalty
specifies a penalty coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the prefix is not found.

·Possible digit separators
specifies symbols that can be used to separate digits in the phone number. A separator may consist only of one symbol. By default, the list of separators includes a space. When entering several separators, do not separate them by commas or spaces.

·Minimum number of digits
specifies the minimum number of digits the phone number may contain. Hypotheses with fewer digits will be discarded.

·Maximum number of digits
specifies the maximum number of digits the phone number may contain. Excess digits will be discarded.

·Max space length
specifies the maximum allowed absolute length of the space inside the detected object. The space length is measured in the user-defined units of measurement. When looking for the text, the program will add characters to the string until the distance between the neighboring character reaches the value in the Max space length field.

·Area code/city code brackets
allows brackets for city/area codes.

oto add an opening and closing bracket, click Add... and in the Add Phone Code Brackets dialog box, type the opening bracket in the Opening symbol field and the closing bracket in the Closing symbol field;

oto change the opening and closing brackets, click Edit... and in the Edit Phone Code Brackets dialog box, make the necessary changes in the Opening symbol and Closing symbol fields;

oto delete brackets from the list, select the brackets and click Delete.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Phone element


Named Entity

Show/Hide Hidden Text

Named Entity is a FlexiLayout element that contains a description of the information that needs to be extracted from a field or field group using NLP. This can refer to names of people and companies, as well as places and addresses.

note Note. The NLP module is not included in a standard FlexiCapture installation and needs to be installed separately. It also requires a license of a specific type.

In the element tree, Named Entity is represented by the NER icon.

Named Entity element properties describing the parameters of the target object

The target object type is specified in the element properties dialog in the Named Entity Recognition tab. To open the element properties dialog, right-click the appropriate element in the FlexiLayout window and select Properties... in the drop-down menu.

Show the Separator tab in the Properties dialog

NERproperties

To show the NER objects being extracted on the image, do the following:

1.Open the FlexiLayout properties: FlexiLayout -> Properties... (alternatively, press Alt+Enter).

2.In the General tab, select Advanced Pre-recognition Properties....

3.In the Advanced tab, choose the Extract named entities option found in the Extract named entities section.

4.Click OK.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints


Separator

Show/Hide Hidden Text

Separator is an element of a FlexiLayout which describes a vertical or horizontal separator.

Separator elements are marked with [image] in the FlexiLayout tree.

The program uses Separator elements to look for separators. It will consider as candidates those Separator objects detected during pre-recognition which either fit entirely within the search area of a Separator element or overlap the search area.

The properties of a Separator element

Click the Separator tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Separator tab

·Orientation
Sets the orientation of a separator (vertical or horizontal).

·Min length
Sets the minimum length of a separator. Measured in user-defined units of measurement. Objects of smaller lengths will be ignored. You can estimate the length of a separator by clicking the corresponding object on the image and viewing its properties in the Properties window.

·Max length
Sets the maximum length of a separator. Measured in user-defined units of measurement. Objects of greater lengths will be ignored.

·Min relative length (%)
Sets the minimum relative length of a separator. This is a number ranging from 0 to 100. The relative length of a separator is calculated as [length o the separator]/[length of the search area along the separator]. Objects of smaller relative lengths will be ignored.

note Note.If you specify both Min length and Min relative length (%), the program will use the more strict criterion and ignore the other.

E.g.

Suppose that Min length =300 (i.e. 1 in or 2.54 cm) and Min relative length=30%. If the width of the search area is 21.0 cm (i.e. the width of an A4 sheet), the program will look for separators longer than 6.3 cm.

·Penalty limit for length
The minimum coefficient by which the hypothesis quality may be multiplied as a penalty for its length. When estimating the quality of a hypothesis, the hypothesis may be penalized for the length of the separator: the longer the separator object, the higher the quality of the hypothesis. The highest quality of 1 is assigned to a separator whose length is the same as the search area. When the relative length of the separator decreases from 1 to 0, the quality of the hypothesis decreases in direct proportion from 1 to Penalty limit for length.

Relative length = L/L0

[Quality] = ( 1 – [Min penalty for length] ) * [Relative length] + [Penalty limit for length].

(The quality changes linearly from 1 for a relative length of 1 to [Min penalty for length] for a relative length of 0.)

·Fits entirely within search area
Specifies that the separator must fit entirely within its search area. Clear this option to find separators which overlap the search area as in the figure below.

Space group

Sometimes separators on document images become distorted, disjointed or skewed due to low-quality printing or scanning. During pre-recognition, this may cause the program to detect multiple separators instead of one.

The Space group contains options which you can use to tell the program when it should include multiple separators in one hypothesis.

·Max length
The maximum distance between two separator objects that can be included in one hypothesis and considered to be one separator.

·Max relative length (%)
The maximum relative distance between two separator objects that can be included in one hypothesis and considered to be one separator. The relative distance is calculated as follows: [distance between separator fragments]/[total length of the separator].

note Note.If the Max length and the Max relative length (%) have both been specified, the program will use the shorter of the two distances.

·Orthogonal shift
The maximum relative distance between two parallel separator objects (along a perpendicular line) that can be included in one hypothesis and considered to be one separator.

Tips for creating Separator elements

Separators do not usually have fixed positions on unstructured documents. Since they are optional design elements, a designer may choose not to use them at all. For this reason, separators are rarely used as reference elements in FlexiLayouts. The most common function of separators in documents is to separate the text from adjoining fields, so the search areas of Separator elements tend to be small.

If you use separators as reference elements, you should check whether they were detected during pre-recognition. To make sure that the program can detect a separator on all test images, once pre-recognition completes, click the Separators button on the toolbar to highlight the separators, and then look through all of the test images and check the location of separators. This check is especially important if the separators are thin, because in this case their detection will depend on image quality and the scanning settings.

note Note.When creating Separator elements, pay attention to the number of hypothesis you may end up with in the separator's search area. Try to avoid situations when there are multiple separator objects in the same search area and the FlexiLayout has a group containing several Separator elements. If this is the case, the program may generate an abnormally large number of hypotheses when applying the FlexiLayout, because a hypothesis can be generated for every object and the program will try every combination of possible hypotheses. If possible, try to minimize the number of hypotheses for Separator elements by limiting their search area.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints


White Gap

Show/Hide Hidden Text

White Gap is an element of a FlexiLayout which describes a rectangular area on the image which contains almost no objects of the specified type.

To look for White Gaps, the program creates histograms for objects. When creating histograms fro the objects in the search area, the program calculates the sum of the projections of all the objects on the horizontal axis (to look for a vertical gap) or on the vertical axis (to look for a horizontal gap). If the sum of the projections is smaller than the specified threshold, the program considers the area to be a White Gap.

Building a histogram for a vertical gap

For more about histograms, see White Gap hypotheses.

The search area may contain accidental objects. The maximum allowed number of such objects is specified in the properties of the element.

White Gap elements are marked with [image] in the FlexiLayout tree.

The properties of a White Gap element

Click the White Gap tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, White Gap tab

·Orientation
sets the orientation of a White Gap:

oVertical White Gaps have top and bottom boundaries coinciding with the top and bottom boundaries of the search area. The left and right boundaries must be detected. An example of a vertical White Gap is the space between two text columns.

oHorizontal White Gaps have left and right boundaries coinciding with the left and right boundaries of the search area. The top and bottom boundaries must be detected. An example of a horizontal White Gap is the space between two paragraphs of text.

·Min width/height sets the minimum width/height of a White Gap in the direction perpendicular to Orientation. Gaps of smaller width/height will be ignored. Measured in the user-defined units of measurement. The default value is 20dot.

·The Search among objects of type property sets the type of objects among which to look for the White Gap. Select the desired objects by checking the boxes next to them.

The properties of the histograms of objects which may occur in the search area

·Lower threshold limit sets the minimum level of the histogram. This property allows other objects in the search area. If the height of the histogram of the objects is greater than the number specified in this field, the program will consider the search area to contain no gaps. Measured in the user-defined units of measurement. The default value is 37dot.

·Upper threshold limit sets the maximum level of the histogram. This property allows excluding false histogram maximums which may be caused by large numbers of vertically arranged accidental objects in the search area when looking for a vertical gap or horizontally arranged objects when looking for a horizontal gap. Measured in the user-defined units of measurement. The default value is 150dot.

·Threshold coefficient (%) sets the maximum relative level of the histogram. The relative level of the histogram is calculated as [level of histogram]/[histogram maximum in search area]. The default value is 20.

note Note.

1.The values of Lower threshold limit, Upper threshold limit and Threshold coefficient (%) can only be selected by trial and error. We recommend starting with the default values. If the results are unsatisfactory, try finding the values enabling the program to detect the White Gap on all of the test images.

2.If the value of the Threshold coefficient (%) is smaller than the value of the Lower threshold limit, the Lower threshold limit will be used. If the Threshold coefficient (%) is greater than the Upper threshold limit, the Upper threshold limit (i.e. the program will use the most strict criterion).

See also:

Creating and deleting elements

An overview of element properties

Search area

Additional search constraints for White Gap element

White Gap hypotheses


Barcode

Show/Hide Hidden Text

Barcode is an element of a FlexiLayout which describes barcodes used to encode various information in a series of black and white lines.

Barcode elements are marked with [image] in the FlexiLayout tree.

Barcode elements are used for finding barcodes of the types supported by ABBYY FlexiLayout™ Studio. The program will consider Barcode objects detected during pre-recognition in the search area.

The properties of a Barcode element

Click the Barcode tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Barcode tab

Barcode type - the type of barcode.

note Note.

1.For the QRCode, Aztec and DataMatrix types to be available, the Extract 2D barcodes: Data Matrix, Aztec, QR Code option must be selected in the FlexiLayout / Classifier properties dialog box.

2.To make postal barcodes available, select Extract post barcodes in FlexiLayout / Classifier Properties.

Orientation sets the orientation of a barcode:

·Left-to-Right,

·Bottom-to-Top,

·Right-to-Left,

·Top-to-Bottom.

note Note.You can select more than one option.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Barcode element


Object Collection

Show/Hide Hidden Text

Object Collection is an element of a FlexiLayout which is used to look for sets of objects of different types each of which meets the search criteria.

Object Collection elements are marked with [image] in the FlexiLayout tree.

Object Collection elements are usually used to look for objects which cannot be found using other elements. For example, you can use an Object Collection element to look for punctuation marks which stand apart and are not marked as text objects. You can also use this element to look for non-text objects, e.g. pictures and check marks.

The properties of an Object Collection element

Click the Object Collection tab in the Properties dialog box to describe the corresponding object. To open the Properties dialog box, right-click the element in the FlexiLayout tree and select Properties... from the shortcut menu.

Show Properties dialog box, Object Collection tab

·Type
specifies the type of the objects to search: Text, Punctuation mark, Picture, Inverted text, Checkmark, Separator, Barcode. When matching the FlexiLayout with the images, only the objects of the specified types will be detected. All other objects will be ignored.

·Object size
sets the minimum and maximum widths and lengths of the objects in the user-defined units of measurement. To be able select the values for these properties, first look at the sizes of the objects in the Properties window.

See also:

listPicture Creating and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Object Collection element


Region

Navigation: Elements > Element properties >

Return to chapter overview

Region

Region is an element in a FlexiLayout which defines an area on an image without imposing any restrictions on the data inside. The search area of an element may consist of several discontinuous regions. Region elements are marked with [image] in the tree.

This element is used to compute regions regardless of the objects they contain.

More:

listPicture Creating, copying, and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints for Region element


Table

Table is an element of a FlexiLayout used to detect tables of different structures, including tables specific to financial documents and any data arranged in a tabular form.

In the tree of elements, Table elements are marked with Table.

For more information on creating FlexiLayouts for documents with tables, see Working with Tables.

See also:

An overview of element properties

Search area

Additional search constraints

Table element


Repeating Group

Show/Hide Hidden Text

Repeating Group is an element used to detect repeating groups of elements (the number of repetitions may not be known in advance). A group may repeat either on one and the same page or on a multi-page sheet.

In the project tree, Repeating Group elements are marked with [image].

If a group of elements recurs within a document, you may describe its properties only once, and specify the number of possible repetitions rather than describe each group separately.

Possible uses:

·Searching for a running name on each page of a multi-page document

·Searching for repeating data, where the exact number of repeating instances is not known in advance (e.g. tables with complex rows)

A Repeating Group element is different from a Group element in that it has certain additional search constraints and a repetition parameter.

After a FlexiLayout is applied and a repeating group of elements is detected, the captions of some of the elements may overlap with the image. To hide the captions, right-click anywhere in the Image window and clear the Show Captions of Regions on Image option on the shortcut menu.

The properties of a Repeating Group element which define the parameters of the object to be detected

The properties that define the parameters of the object to be detected are specified on the Repeating Group tab of the element's Properties dialog box. To open the Properties dialog box, right-click the element in the FlexiLayout window and select Properties... on the shortcut menu.

Show Properties dialog tab, Repeating Group tab

There are two ways to search for instances of a repeating group - either in the entire document or on individual pages. Correspondingly, you specify the minimum and maximum number of group instances either for the entire document or for individual pages.

If a repeating group contains a required element, it serves as the identifier for matching the instance. For example, if you specify the name of a repeating group of fields as a required element, the program will create as many instances as the number of names it detects.

The quality of the null hypothesis is specified for one instance and not for the entire set of instances. This parameter also serves as a criterion for forming an instance: if the quality of the generated hypothesis is lower than the quality of the null hypothesis, no instance is formed.

To search for group instances in the entire document, select the Document mode option and specify the following:

·Min repetitions - the minimum number of group instances in the document

·Max repetitions - the maximum number of group instances in the document

If the possible number of group instances is not detected in the document, the Repeating Group is considered not detected. If the maximum number of instances is detected, the search stops. In this default search mode, a group instance (which, just like the usual Group element, consists of hypotheses for its subelements) may stretch over several pages of the document.

To search for group instances on individual pages, select the Page mode option. In this mode, each instance may occur only with one page of the document. You can use this mode to search for a running name, for example. In this mode, the search is carried out top to bottom, from the first possible page to the last one. The following search parameters are available in this mode:

·Min repetitions on page – specifies the minimum number of instances per page. If the minimum number of instances is not detected on the current page, the Repeating Group is considered not detected.

·Max repetitions on page – specifies the maximum number of instances per page. If a required number of instances is detected on the current page, the search stops on the current page and continues on the next one.

Location of instances

The following constraint is imposed on the instances of an element: no two instances may intersect. This is achieved by forcibly excluding (Exclude) the already detected instances. On the Relations tab, you can set constraints for the next instance based on already detected instances.

For example, you can tell the program that it must look for each next instance below the previous one. On the Relations tab, set the BELOW constraint for your Repeating Group:

note Note.It recommended that you specify a Nearest relation for a subelement in the group, defining its position relative to the to edge of the page. Otherwise, the program will select the next instance of the group by applying the best quality criterion to all the instances in the search area (below the last detected instance). The program will look for the next instance below the current instance (whose quality is higher), which may cause the instances of poor quality located above the instance with higher quality not to be detected at all.

See also:

listPicture Creating, copying, and deleting elements

listPicture An overview of element properties

listPicture Search area

listPicture Additional search constraints

listPicture Additional search constraints for a Repeating Group element


Search area

A search area is defined by a set of search constraints and relations. It tells the program where to look for the objects described by the elements.

Search areas are made up of one or more rectangles which need not have common boundaries, i.e. search areas may be discontinuous.

A search area may be defined by absolute search constraints, i.e. by coordinates, or by relative search constraints, i.e. by relations to other elements. When specifying relative search constraints, you can use any elements located above the described element in the FlexiLayout tree (the image object corresponding to this element can only be found by using information about the already found objects described by the elements higher up in the tree).

Specifying the absolute coordinates of a search area

An absolute search area is defined on the Search Constraints tab of the element's Properties dialog box.

For multi-page documents, you can select a range of pages on which to search for an element. You can specify the absolute local coordinates of a search area in the Region property.

Excluding an element from the search area

The Exclude regions of elements property allows you to exclude from the search area the region of the found hypothesis for an element. If no hypothesis of the excluded element is found, this constraint will not affect the search area of the element.

note Note.An exception to this are cases where the user has specified additional constraints for some of the boundaries of the hypothesis for the excluded element in the Advanced pre-search relations pane. In this case, if the program fails to find the excluded element, it will cut out the rectangular search area of this element from the surrounding search area. See the Fuzzy rectangle section for details about internal rectangles.

Recognition of vertical text

For the Currency, Date, Phone, Character String, Static Text, Paragraph elements, a Search through vertical text option is available, which allows for recognition of both horizontally- and vertically-oriented text. The Top-down and Bottom-up options enable and disable the recognition of vertical text from top to bottom and from bottom to top respectively. These are enabled by default and can be disabled only when Search through vertical text is selected.

Specifying a search area relative to another element

A relative search area is defined on the Relations tab of the element's Properties dialog box. To define a relative search area, specify a reference element relative to which the boundaries will be defined and specify the relations of types "right of", "left of", "above", and "below" (the Relations property). You can specify any number of search areas for any element. The boundaries of a search area may specified relative to different reference elements. If no relative search area has been specified, the program will look for the object everywhere on the image. Each of the search constraints specifies a half-plane. The intersection of the half-plane and the image produces a rectangular part of the search area. The intersection of all the search constraints with the image produces the search area of an element.

The boundaries of a search area can be specified more accurately by means of the Element boundary and Offset properties.

The Element boundary property specifies a boundary of a search area relative to the top, bottom, left or right boundary of an element. By default, this property is set to <whole>.

When calculating a relative search area, the program may fail to find the reference element specified in the Reference element property. Lets us consider how the program calculates a relative search area both when the relative element has been found and when the relative element has not been found. If the reference element is optional and there are no objects on the image meeting the conditions specified in the element, the program will formulate a null hypothesis. The region of the null hypothesis for the reference element will coincide with the rectangle enclosing the search area of the element. If the reference element has been found, the region of the hypothesis will be built from the regions of the detected objects participating in the hypothesis and will be located inside the search area of the element.

If the reference element has been found, and the Element boundary is set to <whole>, a Right of constraint will mean "to the right of the right boundary of the reference element", a Left of constraint will mean "to the left of the left boundary of the reference element", etc. (i.e. To the right of, to the left of, below or above the hypothesis). If no hypothesis for the reference element has been formulated, this means that it could be located anywhere in the search area of the reference element (but could not be located outside the search area). Thus, a Right of constraint, when applied to a non-found hypothesis, means "to the right of any area where the hypotheses for the reference element could be located". Mathematically, this means "to the right of the left boundary of the search area of the reference element". Similarly, a Left of constraint, when applied to a non-found hypothesis, will mean "to the left of the right boundary of the search area of the reference element", a Below constraint will mean "below the top boundary of the search area of the reference element", and an Above constraint will mean "above the bottom boundary of the search area of the reference element".

If the Element boundary property is set to one of the specific values - "Left", " Top", "Right" or "Bottom" - the search area will be calculated relative to the specified boundary of the hypothesis for the reference element, no matter whether the hypothesis has been found or not. For example, in the case of a non-found hypothesis a Right of constraint coupled with the Element boundary set to "Right" will mean "to the right of the right boundary of the search area of the reference element".

The Offset property shifts a boundary of the search area by a certain distance. A positive Offset value means that that the boundary will be moved in the same direction as specified in the Relation property. A negative Offset value moves the boundary in the direction opposite to the direction specified in the Relation property.

E.g.

A FlexiLayout contains a YourPlanetName element of type Static Text which enables the program to find the YOUR PLANET NAME: field name on the image. We need to find text entered by the user in this field (in this case "MARS (satellite Phobos)"). Create a Planet element of type Character String and specify a search area located to the right of the Planet element, i.e. set the Element boundary property to Right of. The location of the search area is shown in the figure below:

Move the boundary of the search area to the right, i.e. in the same direction as specified in the Right of relation. To do this, select a positive Offset value, e.g. 200. The new location of the boundary is shown in the figure below:

Now move the boundary of the search area to the left, i.e. in the direction opposite the direction specified in the Rightof relation. To do this, select a negative Offset value, e.g. -200. he new location of the boundary is shown in the figure below:

Selecting the element located closest to a certain object

The Nearest property tells the program that, all other things being equal, it must look for a hypothesis located closest to certain element or point on the image. Specify the closest element, point, or coordinate axis in the Nearest property of the element.

Viewing a search area

When editing relation properties or selecting a relation in the Relations table, the relation is visualized in the image window. When selecting several relations, the intersection of the selected relations is displayed. In the Reference layout mode you can also drag the offset boundary with the mouse directly in the image window to change the offset value.

When matching a FlexiLayout, the program first calculates the search area of the element by using all of the specified constraints. Next, the program checks if the image objects located in the search area have the same properties as the elements. If a wrong object has been found as a result of matching the FlexiLayout, you can find out why this happened by looking at the search area of the element.

To display the search area of an element after matching a FlexiLayout, right-click the hypothesis corresponding to the element and select the Show Search Area command from the shortcut menu. The search area will be displayed in the Image window.

More:

listPicture Specifying the absolute search area

listPicture Specifying the search area relative to another element

listPicture Using instances of a Repeating Group as reference or excluded elements

listPicture Additional search constraints


Search constraints

Show/Hide Hidden Text

Search areas are specified on the Search Constraints tab in the Properties dialog box, which is displayed whenever you create a new element.

To open the Properties dialog box of an existing element:

·right-click the element in the FlexiLayout tree and select the Properties... command from the shortcut menu,
or

·double-click the element in the FlexiLayout tree.

Show Properties dialog box, Search Constraints tab

Specifying the absolute coordinates of a search area

Open the Properties dialog box for an element, click the Search Constraints tab, and select the Absolute search area constraints option.

For a multi-page document, you can specify the pages on which to search for an element by selecting one of the following five options from the Pages drop-down list: All, Even, Odd, Last or Range. If you select Range, enter the numbers of the desired pages, separating them with commas, and/or specify a page range using a hyphen: 2, 4, 6-8, 15.

You can define the absolute coordinates of a search area in the Region field. Enter the coordinates in the following format: [left, top, right, bottom]. You can specify the coordinates of several rectangles in this field. Keep the option selected to search for the element in the entire area of the pages from the range. Use the Measure tool to determine the absolute coordinates of objects.

Once you have specified the properties of the search area, click Add.... The search area will appear in the Search areas list. To edit a search area, enter the desired values in the Pages list or in the Region field and click Replace. If the Region field is empty, the program will search for the element in the entire search area of the pages from the specified range, as if the field had a value.

Excluding an element from the search area

The Exclude regions of elements property allows you to exclude from the search area the region of the hypothesis found for an element. If no hypothesis for an excluded element is generated, this constraint will not affect the search area of the element.

note Note.An exception to this are cases where the user has specified additional constraints for some of the boundaries of the hypothesis for an excluded element in the Advanced pre-search relations pane. In this case, if the program fails to find the excluded element, it will cut out the rectangular search area of this element from the surrounding search area. See the Fuzzy rectangle section for details about internal rectangles.

To exclude an element's region from the search area, click the Add... button next to Exclude regions of elements. In the Select Element to Exclude dialog box, select the element whose region must be excluded from the search area.

Recognition of vertical text

For the Currency, Date, Phone, Character String, Static Text, and Paragraph elements, a Search through vertical text option is available, which allows for recognition of both horizontally- and vertically-oriented text.

note Note.Vertically-oriented text is a line of text that has been rotated 90 degrees left or right. Text fragments where the letters are placed one under the other but retain their normal reading orientation will not be detected as vertical.

Example of a vertically-oriented text…

You can use the Top-down and Bottom-up options to enable or disable the recognition of vertical text from top to bottom and from bottom to top respectively. These are enabled by default and can only be disabled if Search through vertical text is selected.

Show Search through vertical text option, Search Constraints tab

More:

Relative search area

Additional search constraints


Relative search area

Show/Hide Hidden Text

On the Relations tab of an element's Properties dialog box, you can specify a search area relative to other elements.

Show Properties dialog box, Relations tab

The Properties dialog box is displayed when you create a new element.

·To add a new relation, click the Add button. The Add New Relation... dialog box will open.

·To edit an earlier created relation, click Edit.

·Click Duplicate if you want to duplicate a selected relation.

·To remove a selected relation, use the Remove button.

To open the Properties dialog box for an existing element:

·Right-click the desired element in the tree of elements and select Properties... on the shortcut menu
or

·Double-click the desired element in the tree of elements and select Properties... on the shortcut menu

In the Properties dialog box, click the Relations tab.

Specifying the boundaries of a search area relative to another element

In the dialog of adding or editing relations, specify relation parameters:

1.In the Type field, select the type of relation: Left of, Right of, Above or Below.

2.Select a reference element by clicking the [image] button next to the Reference element field and then select the element relative to which you will define the search area boundaries. For instructions on defining a search area relative to subelements of a repeating group, see Using instances of a repeating Group as reference, excluded, or source elements.

3.In the Reference boundary field, select the boundary of the element's region relative to which you will define the boundary of the search area.

4.In the Offset field, set the offset value for the boundary of the search area.

5.Click Add Relation to add a new relation or Save Changes to save the relation after editing. All relations are displayed on the Relations table.

You can also select the type of relation, the element boundary and the offset type (negative, zero or positive) using pictures in the Choose relation parameters by picture dialog box. To open the dialog box, click the Choose... button of the Add New Relation or Edit Relation dialog boxes. On the Left of, Right of, Above and Below tabs you can see the relative position of the element and the search area and how the search area changes depending on the selected boundary and offset types.

Show dialog

note Note.The elements used as reference elements and the elements excluded from the search area must be located lower down the tree of elements than the element for which the constraint is being specified.

ABBYY FlexiLayout Studio allows you to have several Properties dialog boxes opened simultaneously. To copy a property that defines the boundary of a search area, select it in the Relations table and drag it into the Properties dialog box of another element. In the same way, you can copy the constraints specified on the Advanced tab.

Visualization of relations

When editing relation properties or selecting a relation in the Relations table, the relation is visualized in the image window. The reference element is enclosed in a thick frame and the search area is highlighted with a green background.

Show dialog

When editing boundary type and offset value, the search area in the image window changes respectively.

In the Reference layout mode you can also drag the offset boundary with the mouse directly in the image window to change the offset value. If the Matched layout is selected, the relation is displayed in read-only mode and offsets cannot be edited in the image window.

When selecting several relations, the intersection of the selected relations is displayed. The intersection area is highlighted with a green background, while the areas out of the intersection borders are highlighted blue.

Show example
visual

Selecting the element closest to a certain object

The Nearest property tells the program that, all other things being equal, it must look for a hypothesis located closest to certain element or point on the image. Specify the closest element, point, or coordinate axis in the Nearest property of the element.

To instruct the program to select the element that is closest to a certain object on the image, select the Nearest option and then select the desired object from the To drop-down list: Element, X coordinate, Y coordinate, Point, Page top edge, Page bottom edge, Page left edge, Page right edge. If you select Element, enter the name of the element in the Reference element field. If you select X coordinate or Y coordinate, specify the corresponding coordinate. If you select Point, specify the coordinates of the point. The Minimum quality parameter specifies the minimum quality of element hypothesis. By default its value is set to equal the null hypothesis.

note Note.The element closest to the given element is selected based on the shortest distance between element centers.

See also Using Nearest and FuzzyQuality to search for elements.

More:

Specifying the absolute search area

Additional search constraints


Using instances of a Repeating Group as reference, excluded or source elements

You can use the element selection dialog box to select:

·a reference element on the Relations tab of an element's Properties dialog box

·an excluded element on the Search Constraints tab of an element's Properties dialog box

·a Source element in a block's Properties dialog box

For simple elements, their names are used. For a Repeating Group element, a reference to the hypotheses for the repeating group (taking into account the number of the instance) is used to create relations.

When matching a FlexiLayout, several instances of hypotheses for the repeating group will correspond to one Repeating Group element in the tree of elements. Therefore, when specifying relations between a Repeating Group and other elements, you must specify which instance should be used. When you specify a reference to a hypothesis rather than a full name, the name of the Repeating Group is followed by a full stop and a description of the referenced instance.

The instance may be:

·LastFound - the last detected instance of the Repeating Group at the moment when a hypothesis is generated for the given subelement

·AllInstances - all the detected instances of the Repeating Group

·Instance(#) - a particular number of the instance

·CurrentInstance - the current instance; used when specifying relations between a subelement of a Repeating Group to refer to the current hypothesis for the group itself, i.e. to already detected subelements of the group that are located above the given subelement in the tree

The syntax of the reference in the element selection dialog box is the same as the syntax used in code you type in the Advanced sections to access the instances of a Repeating Group and their subelements. For example:

SearchElements.RepeatingGroup.LastFound.RepeatingGroup1.Instance(1). StaticText.

An instance of a group is selected in the dialog boxes where you select a reference element or an excluded element. In the selection tree, the instance numbers are indicated next to the names of repeating groups. When you select a repeating group, a Repeating instance field becomes available, where you can select the desired instance. The changes you make will be reflected both in the tree and in the result string.

When you select CurrentInstance for a child group CurrentInstance is automatically set for all the groups above it. If you change the CurrentInstance of a parent group to something else, the instances of all the child groups will be reset to the default value of LastFound.

When you select AllInstances for a parent group, AllInstances is automatically set for all the child groups. If you change the AllInstances of a child group to something else, the AllInstances of the parent groups will be reset to the default value of LastFound.

When creating a reference manually in the Advanced code, keep in mind that CurrentInstance can only be specified for a parent group, and if you specify CurentInstance for a group, all the groups above it must also have CurrentInstance specified for them. If AllInstances is specified for a group, all the groups below it must also have AllInstances specified for them. When you select group instances in the dialog box, the correct values are enforced automatically.

See also:

listPicture Search constraints

listPicture Relative search area

listPicture Additional search constraints


Generating element relations

Apart from specifying a relative search area for elements manually, you can also train element relations based on the reference layout of the selected pages.

To enable training element relations:

·The Reference layout must contain elements for which relations are to be generated.

·All pages to be included in the training set must be marked as Use for Training on the Batch tab.

To generate element relations:

1.From the element shortcut menu select Train Element > Generate Element Relations. The Select Element dialog box will open.

2.Choose elements to generate relations with and add them to the right side of the window clicking [image] (for adding a selected element) or [image] (for adding all available elements) or with a double-click on a desired element. The selected elements are highlighted in bold on the left side of the window.

3.Click OK. The Choose Trained Element Relations dialog box will open.

4.This dialog box consists of the Reference elements list which contains elements relations have been created with, the New Relations list which contains new relations received as a training result, and Old Relations list which contains earlier created relations.

5.Select a relation in the list to view its visualization in the Image window. The reference element in the Image window is enclosed in a thick frame and the search area is highlighted with a green background.

note Note.When selecting several relations, the intersection of the selected relations is displayed. The intersection area is highlighted with a green background, while the areas out of the intersection borders are highlighted blue.

6.To view visualized relations on the next or previous page from the training set, click [image] and [image] in the left bottom corner of the window respectively. To go to the page with a specified number, click the Go to Page... button.

7.Mark a checkbox next to relations you wish to use and click the Save Changes button.

note Note.The element being trained must be located lower down the tree of elements than the elements relations are created with. All elements must be non-recurring.


Correcting relations offsets

When specifying a relative search area for elements or generating element relations, the offset value for the search area is defined. You can then correct relations offset based on the reference layout of the selected pages. Offsets are calculated for all enabled relations with non-recurring elements.

To enable offsets correction:

·The Reference layout must contain elements for which relations offsets are to be corrected.

·All pages to be included in the training set must be marked as Use for Training on the Batch tab.

To correct relations offsets:

1.From the element shortcut menu select Train Element → Correct Relations Offsets. The Choose Trained Relations Offsets dialog box will open.

2.In this dialog box you can see the list of trained relations and their new and old values of offsets.

3.From the Show drop-down list select the modified relations only option to see only those relations which were modified during training or select all relations to see all relations of the element.

4.Mark a checkbox on the left to the relation name to use the training result for this relation. You can mark a checkbox next to the Relation caption to select all modified relations.

5.Select a relation in the list to view its visualization in the Image window. The reference element in the Image window is enclosed in a thick frame and the search area is highlighted with a green background. When selecting several relations, the intersection of the selected relations is displayed. The intersection area is highlighted with a green background, while the areas out of the intersection borders are highlighted blue.

note Note.If the corresponding checkbox is selected, the new offset value is displayed. For deselected checkboxes, old values of offsets are displayed.

6.To view visualized relations on the next or previous page from the training set, click [image] and [image] in the left bottom corner of the window respectively. To go to the page with a specified number, click the Go to Page... button.

7.Click the Apply Changes button to save new offset values for the selected relations.


Additional search constraints

Show/Hide Hidden Text

You can also specify search constraints in a special FlexiLayout language.

You can specify additional search constraints on the Advanced tab of the element's Properties dialog box.

Show Properties dialog box, Advanced tab

note Note.For a Repeating Group element, an Advanced for All Instances is available. See Additional search constraints for a Repeating Group element.

The program offers a code editor where you can enter code for additional search constraints. The code editor can highlight different types of lexemes, suggest possible methods and properties (point suggestions), and carry out find and replace operations for any strings.

Full stop suggestions

The full stop suggestion technology is used in ABBYY FlexiLayout Studio to offer suggestions to the user when writing macros in the FlexiLayout object-oriented language. The technology makes it easier to enter the names of methods and fields for objects of various types available ion the language.

If an expression typed in by the user is the name of an object, when you enter the full stop character (".") after the name, the program offers a drop-down list with the names of methods and fields for this object.

When you start typing, the selection in the list will automatically move to the name that starts with the characters typed after the full stop.

Pressing the Space, Tab or Enter buttons or entering a separator character (~!#%^&*()-=+\|/?><{}[];:.,'") which cannot be used in the names of methods or fields will change the text typed after the full stop to the name of the method or field selected in the list. Alternatively, you can double-click the desired name in the list to substitute the text after the full stop with that name.

Pressing the left arrow, right arrow, Insert, Delete, Home, End, Page Up, Page Down or Escape buttons, clicking anywhere outside the list or pressing a keyboard shortcut (e.g. Ctrl+V) will close the list without making any substitutions.

Use the up and down arrows to go up and down the list of suggestions.

Press BACKSPACE to delete characters typed after the full stop without closing the list of suggestions. However, if you delete the full stop itself, the list will close.

Additional search constraints can be of two types:

1.Advanced pre-search relations - sets search constraints for an element and creates a search area

2.Advanced post-search relations - penalizes generated hypotheses based on the properties of the corresponding elements

Element fields

An element field is a typed variable that belongs to an element. Element fields are defined in the External fields section on the Advanced tab and are used in additional search constraints. The value of a field can be changed only in the element to which it belongs. The value of a field may be used in the additional search constraints of the element itself and of the elements below the element in the tree. For more about element fields, refer to the Element fields section.


Advanced pre-search relations

Show/Hide Hidden Text

Advanced pre-search relations set search constraints and element properties in a special FlexiLayout language. The pane where you can enter your code can be found on the Advanced tab of the Properties dialog box.

The code you enter into the Advanced pre-search relations pane is executed immediately before searching for the image object that corresponds to the FlexiLayout element. First, the program will use the properties you specified on the tabs to the left of the Advanced tab, and then it will run the code. If a particular parameter is specified both on a tab to the left of the Advanced tab and in the code on the Advanced tab, the code will have priority. If a parameter is specified on a tab to the left of the Advanced tab but is not specified in the code, the value of the parameter from the relevant tab will be used.

note Note.The SearchText function (Static Text element) is an exception. This function willaddsearch words to those already specified on the Static Text tab.

If you have specified some properties on any of the tabs to the left of the Advanced tab, you can translate them into code by clicking the Code button on the Advanced tab. The generated code can then be copied or edited.

note Note.The additional constraints entered in the Advanced pre-search relations pane may only refer to elements located above the current element in the FlexiLayout tree. The only exception are the subelements of the same Repeating Group element, which may refer to previous instances of subelements located in the same group below the given element.

Examples

Specifying different values for the same parameter

Sometimes you will need to assign different values to one and the same parameter. This can be done by using the "if... then" operator:

if Element1.IsNull then {
MaxErrors: 3, 0.25;
} else {
MaxErrors: 5, 0.5;
}

Limiting the search area

The search area may be specified by using any of the types which define an image area: Rect, RectArray, Region. It can also be specified by using an expression which returns any of these types. The result of calculating the expression is passed as an argument to the RestrictSearchArea() function:

a.

RestrictSearchArea( Rect(Rect( Page( 1 ).RectGlobal.Left, Page( 1 ).RectGlobal.Top+20*mm, Element1.Left.Start, Element2.Ycenter.Start ) );

b.

let rect1 = Element1.Rect;
let rect2 = Element2.Rect;
RestrictSearchArea( rect1 or rect2 );

Canceling the search for an object

For some documents, the presence of one object on the image automatically excludes another object. In still other cases, you may wish to look for a particular object only if certain conditions have been met. You can tell the program not to look for a specific object by using the DontFind() command. Once the command is executed, the program will formulate a null hypotheses for the corresponding object:

if Element1.IsNull() then DontFind()

Selecting a hypothesis

Sometimes several image objects meet the conditions specified in an element. This means that the program will formulate several hypotheses. If you need to select from this set only the hypothesis that is located closest to some other object or point on the image, you can use the Nearest, NearestX, and NearestY functions:

·Nearest( [name of element] ) - sets the name of the closest element.

·Nearest( x1, y1 ) - sets the coordinates of the closest point.

·NearestX( x1 ) - sets the X coordinate of the closes vertical line.

·NearestY( y1 ) - sets the Y coordinate of the closest horizontal line.

note Note.You cannot use several Nearest functions at a time.

Using Advanced pre-search relations [image] for multi-page documents

The program treats a multi-page document as a single entity and can look for an element of a multi-page document without reference to an exact page.

For example:

a. To specify that an element may be found in the bottom half of any page:

Below: PageRect.Top + PageRect.Height / 2;

(see the description of the PageRect function for details)

b. To specify that an element is located on the last page of a document (you can write this code only in the principal part of the FlexiLayout, after the Header and Footer elements, if any):

RestrictSearchArea( Page( PagesCount ).RectGlobal );

c. To specify that an element is located on the page where an element named SearchElements.OtherElement begins:

if SearchElements.OtherElement.IsFound then RestrictSearchArea( WholePage, SearchElements.OtherElement.Pages.Start );

d. To specify that an element may be located on each page below the instances of the hypotheses for a repeating group named SearchElements.RepeatableGroup:

Below: SearchElements.RepeatableGroup.AllInstances.PageAreaGlobal( PageNumber ).Region.Bottom;

e. To specify that an element may be located on each page below the body of each subtable of a table named SearchElements.Table:

Below: SearchElements.Table.AllSubTables.Body.PageAreaGlobal( PageNumber ).Bottom;

See also:

FlexiLayout language


Advanced post-search relations

Show/Hide Hidden Text

Advanced post-search relations allow you to penalize a generated hypothesis depending on the properties of the element. The purpose of these constraints is to adjust an already generated hypothesis.

warning Important!The major difference between Advanced post-search relations and Advanced pre-search relations is that the program starts to consider the post-search relations only after the hypothesis has been formulated.

note Note.Do not write the name of the element in the code of the Advanced post-search relations. For example, to access the Width property of some Element1, write simply Width.

Constraints set in the Advanced post-search relations pane are applied to each formulated hypothesis of the element independently of the other hypotheses. Different hypotheses for one and the same element cannot be compared. You can only adjust the quality of a specific hypothesis by studying its properties and imposing certain constraints on it.

Any command or constraint in the Advanced post-search relations pane returns an estimate of the quality of the hypothesis for the given element. Estimates obtained by applying different constraints are multiplied.

note Note.Additional constraints set on the Advanced tab in the Advanced post-search relations pane may only refer to the current element and the elements located above the current element in the FlexiLayout tree. If this condition is not met, the program will highlight the illegal element.

You can use this pane to do the following:

Apply constraints to the properties of a hypothesis

E.g.:

The constraint Width > 5*cm for a hypothesis 3cm long will return a quality of 0, which will cause the program to stop formulating hypotheses for the element and its subelements.
Check the properties of a hypothesis

E.g.:

The following condition checks the height of the hypothesis and, depending on the result, limits or adjusts its width.

if Height > 3*cm then Width > 5*cm;
Adjust the quality of a hypothesis

You can adjust the quality of a hypothesis by calling the Quality(q) function, where q is a variable of type Quality. Executing this command multiplies the quality of the hypothesis by q.

warning Important!Use of this feature requires caution. Do not use it if you are not sure of the results.


Additional search constraints for a Repeating Group element

Show/Hide Hidden Text

The Properties dialog box of a Repeating Group element provides two tabs where you can specify additional search constraints: Advanced and Advanced for All Instances. On the Advanced tab, you can specify additional search constraints for individual instances of the group. On the Advanced for All Instances tab, you can specify additional search constraints for all the instances of the group.

Show Properties dialog box, Advanced for All Instances tab

In the External Fields for All Instances section, you can use all the methods available for a Group element. For example, you can specify relations with already detected instances:

// Each subsequent instance is located below the previous instance
if SearchElements.RepeatingGroup.HasInstances then {
Below: SearchElements.RepeatingGroup.LastFound, 0 * dot;
}

In the Advanced pre-search relations for all instances section, you can use the following methods:

·MinRepetitions

·MaxRepetitions

·PaginalMode

·MinRepetitionsOnPage

·MaxRepetitionsOnPage

In the Post-search relations section, you can provide an estimate for a particular instance. In the Post-search relations for all instances section, you can provide an estimate for all the detected instances.

In the Pre-search relations section, you can use all the methods available for a Group element.

Sample code for Post-search relations:

// Checking the hypotheses for the subelements StaticText1 and StaticText2 in a repeating group. The last detected instance is used.
if StaticText1.Width() < 200dt and StaticText2.Width() < 200dt then Quality: 0.98;

Sample code for Post-search relations for all instances:

if InstancesCount() < 5 and LastFound.Pages.End <= 2 then Quality: 0.98;

Accessing element instances

Use the following pre-defined names to access element instances:

·LastFound - the last detected instance

·CurrentInstance - the current instance when searching inside a repeating element

·Instance ( n ) – instance No. n

·AllInstances - all instances

You can access subelements of a Repeating Group element even they are located lower down the tree of elements. The following methods of the FlexiLayout language can also be used to work with element instances:

·HasInstances - checks if any instances have already been found

·InstancesCount - returns the number of detected instances

Condition for stopping the search for element instances

The search for instances stops (in the given branch) if the program encounters an empty hypothesis for a group (i.e. a group that has an empty region) or if the program cannot generate any more hypotheses (there are no more hypotheses in the search area). In Paginal mode, this rule applies to search on one page only. When the program finishes search on one page, it goes on to the next page. MinRepetitionsOnPage, MaxRepetitionsOnPage, MinRepetitions, and MaxRepetitions also affect the hypotheses generation process.

You can use the following methods to change the standard hypotheses generation process:

1.The last detected instance must be the last one:
if SearchElements.RepeatingGroup.HasInstances and then DontFind;
This condition must be entered in Advanced pre-search relations.

2.The last detected instance (and it is this instance that we are creating the constraint for) is "bad" and the previous instances must be the last (if there re no other "good instances detected"):
If then Quality: 0;
This condition must be entered in Advanced post-search relations.

See also:

FlexiLayout language


Finding and replacing code strings on the Advanced tab

You can write expressions in the FlexiLayout language to specify element properties.

You can specify additional search constraints on the Advanced tab of the element's Properties dialog box.

"Find and replace" is carried out in the code of the current element and all of its subelements. Therefore, to perform "find and replace" in the code of all elements, you must select the FlexiLayout (i.e. the root element in the tree). If you need to perform "find and replace" in only one layout alternative, select this alternative in the tree.

This feature is useful, for example, when replacing the name of an element: you do not have to open all the Advanced tabs in the properties of various elements.

To find and replace a code string:

1.Select the element in which to search.

2.Open the Find in Advanced Code dialog box (Tools → Find in Code... or select Find in Code in element local menu).

3.In the Find what field, enter the string to find. In the Replace with field, enter the string with which to replace the found code fragment. Select Match case if the search must be case sensitive.

4.Click Find All to find all instances and Replace All to replace all the found code fragments. The results will be displayed in the Results field.


Units of measurement

ABBYY FlexiLayout Studio allows you to use different units of measurement for objects: millimeters, centimeters, inches, dots (1/300 of an inch), or points (1/72 of an inch). You can use the selected units to specify object sizes, intervals, fuzzy intervals, etc. The program will convert all the sizes into dots and use them to match the FlexiLayout. For this reason, the maximum accuracy of all measurements is 1 dot.

You can select the desired unit of measurement in the Options... dialog box (Tools → Options...). When you change the current unit of measurement, all the sizes are converted and displayed in the new units.

The current unit of measurement is displayed in the right-hand corner of the status bar.


Fuzzy interval

A fuzzy interval is a tool enabling the program to assess the quality of hypothesis based on its length. A fuzzy interval may be measured in units of length (dots, millimeters, etc.) or in characters (in the case of lines). For a fuzzy interval, four values must be specified which define the optimal and possible ranges of values.

Suppose you have a fuzzy interval [f1,f2,f3,f4] and the length of the detected string of characters (or the length of the detected space) is L. If the length L is in the range from f2 to f3 (i.e. L>=f2 and L<=f3), the quality of the hypothesis is 1. If the length is in the range from f1 to f2, the quality of the hypothesis changes in direct proportion from 0 to 1 (Quality(f1) = 0, Quality(f2) = 1). Similarly, if the length is in the range from f3 to f4, the quality of the hypothesis changes in direct proportion from 1 to 0 (Quality(f3) = 1, Quality(f4) = 0). If the length does not fall in the range from f1 to f4 (i.e. Lf4), the quality of the hypothesis is 0 (Quality(L) = 0). The quality of the hypothesis for the detected object is multiplied by the value of the Character count property. The value of this property is selected depending on the length of the detected object.

note Note.The quality of any chain of hypotheses for several elements is calculated by multiplying the hypotheses for each element. If the chain is relatively long and the quality estimates of the constituent hypotheses are too low as a result of too strict constraints, the resulting quality of the entire chain may be too low.

Make sure that the selected hypothesis has the biggest quality estimate possible. On the other hand, you need to be able to distinguish hypotheses by their qualities, so as to be able to select the best one. Therefore, you need to set up fuzzy intervals so that acceptable hypotheses are not penalized too much.

You can also use negative values for the left boundary of the fuzzy interval (even though in reality there are no strings of negative length). This may be useful, as it will make the dependence of quality in the range from 0 to 1 less steep, thereby reducing the penalty. If at the same time you need to set the bottom limit for this parameter (e.g. the length of the string cannot be smaller than 10 characters and the fuzzy interval for the length of the string is [-10,20,30,40]), you can do so directly on the Advanced tab by typing Value.Length >= 10 in the Advanced post-search relations pane.

In general, it is advisable not to set too rigid intervals. This is particularly important when processing images of varying quality. On some images for example, there may be spaces within letters due to poor quality of the source document or bad scanning options. In this case the program may interpret one character as several characters, which may lead to a drastic reduction of the quality of the hypothesis if the fuzzy interval was too rigid. As a result, the program will discard a hypothesis which is in essence correct and select another hypothesis. For this reason, if you need to select between Character String hypotheses by comparing their lengths, you would do best by specifying additional constraints in the Advanced post-search relations pane.

Fuzzy interval visual editor

ABBYY FlexiLayout Studio offers a visual editor to make specifying fuzzy intervals easier. You can open the fuzzy interval editor from the Properties dialog box of a Character String element (Character String tab, [image] buttons) or from the main menu by selecting Tools → Fuzzy Interval Editor....


Specifying databases and text files in the FlexiLayout language

The program interface and the FlexiLayout language allow you to refer to databases and text files to specify, for example, strings to be found on an image.

The ADO (Microsoft ActiveX Data Objects) interface is used to refer to databases. A database and its properties are set by the standard connection string, i.e. a set of arguments separated by semicolons which specify the connection parameters. These parameters include Provider, Data Source and others.

An SQL query starting with the SELECT command is used to search for fields in the database table. The resulting set obtained by a query must contain only one field. If a query returns more than one database field, the data from the first field are used. In its simplest form, a query gets the required field from a specified database table.

A text file is accessed by file name, which is specified relative to the folder that contains the FlexiCapture Studio project. Each search string must start on a new line. Empty lines are ignored.

When you export a FlexiLayout in order to add it to a document definition in ABBYY FlexiCapture, the text files are copied to the folder Res, where FileName is the name of the FlexiLayout file or classifier file. This folder is placed in the same folder that contains the exported file. When you subsequently import a FlexiLayout, ABBYY FlexiCapture will place the text files into appropriate folders automatically. For more about the locations of text files, see the ABBYY FlexiCapture Help system.

Text files may be in ANSI or Unicode encoding. A Unicode file must start with the standard header consisting of the special Unicode character 0xFEFF. To convert an ANSI file to Unicode, the current system code page will be used.

When matching a FlexiLayout with a page, the results of queries to the database may be stored within the program. Any changes to the database or the text file will be taken into account only when the program has switched to the next page. If an error occurs related to the database or the text file, FlexiLayout matching will be interrupted and the FlexiLayout will be considered as not matched.

note Note.To speed up FlexiLayout matching, the first 1,000 strings in the file are used by default. To use more strings, specify the required number in the SearchTextFromFile command (Advanced pre-search relations → Advanced).


Training element parameters

Training elements is used to automate configuring separate parameters for elements of simple types. You can easily train a new element or correct parameters of an earlier created element if necessary.

To enable training element:

·For the element to be trained, a correct Reference layout or Matched layout on several pages is required.

·All pages to be included in the training set must be marked as Use for Training on the Batch tab.

note Note.You can either create a new element and draw its region on the image using the Create New (Ctrl+Space) [image] tool or draw location for an existing element of the tree using the Draw Location [image] tool.

To start training an element:

1.From the element shortcut menu select Train Element → Train Element Parameters. The Choose Trained Element Parameters dialog box will open.

2.In this dialog box you can see parameters of the trained element and their values. Names of dependent parameters are indented.

3.From the Show drop-down list select the modified parameters only option to see only those parameters which were modified during training or select all parameters to see all parameters of the element.

4.Mark a checkbox on the left to the parameter name to use the training result for this parameter. You can mark a checkbox next to the Parameter name caption to select all modified parameters.

5.Click the Apply Changes button to save the new values of selected parameters.


Dependency browser

The dependency browser allows you to search for an element and view its dependencies and references.

To open the Reference browser tab, click the corresponding item in the View menu or press Ctrl+Alt+R.

To view element dependencies and references:

·Enter an element name or select a previously entered element from the list.
Click the aBc button to toggle between case-sensitive and case-insensitive search modes.

·The found elements will be shown in the pane on the left. Click on a desired element to view its dependencies or references.

The Dependencies pane shows the elements referred to by the selected element. The References pane shows the elements which refer to the selected element.

·You can expand the lists to view all the dependencies or references. Double-clicking a dependency or reference will display the properties of the corresponding element.

For example, for a dependency of the "relation" type, the Relations tab of the Properties dialog box will open and the corresponding relation of the element will be highlighted.

For a reference from the Pre-search relations or Post-search relations section, the Advanced tab of the Properties dialog box will open and the corresponding code fragment will be highlighted.


Blocks

Show/Hide Hidden Text

FlexiLayout blocks correspond to fields on the documents from which data must be captured. A block specifies the type of data that the field may contain and the coordinates of the image area where the field is likely to be found.

The blocks branch is marked with [image] in the FlexiLayout tree.

ABBYY FlexiLayout™ Studio supports the following block types:

·Text (marked with [image] icon) is used to extract text data
Expanding the regions of text blocks can improve recognition quality. To expand a region, double-click the Blocks element to open its properties dialog box and specify the vertical and horizontal values for the Blocks result region inflate property.

·Barcode (marked with [image] icon) is used to read barcodes

·Checkmark (marked with [image] icon) is used to recognize checkmarks

·Picture (marked with [image] icon) is used to process objects which were not identified as text during pre-recognition

·Table (marked with [image] icon) is used to extract data from tables

·Group (marked with [image] icon) is used to logically group blocks

·Checkmark Group (marked with [image] icon) is used to create checkmark groups. Only checkmark blocks can be added to this type of group - you cannot create or move blocks of other types here.

·Repeating Group (marked with [image] icon) is used to create a repeating group of blocks

·Non-Recognized (marked with [image] icon) is used to exclude an area from recognition

The blocks for which at least in one layout alternative no image area is specified, have an empty square in the top right corner of the icon: . If only one FlexiLayout is selected (via the Select Layout item of the element's shortcut menu, or via the same item in the FlexiLayout section, or via the Select Alternative Layout item of the FlexiLayout's shortcut menu), the program will check for the image area only in this FlexiLayout.

note Note.Data from the blocks are extracted in a data capture application such as ABBYY FlexiCapture.

Block properties

·Name - the name of the block. The name of a block may contain letters (Roman characters, Roman characters with diacritics, Cyrillic characters), digits, and underscores. The name of a block must start with a letter or an underscore. Block names must not contain blank spaces or special symbols.

·Type - the type of the block (selected upon creation). The type of the block must correspond to the type of object(s) located in the area enclosed by the block.

·Comment - a comment provided by the user (optional).

·Has repeating instances - shows that the block will consist of several instances. Select this property if, for example, all the instances of a Repeating Group element will be used as the block region.

·Instance sort order - sets the order in which group instances must be united into a block. The property is only available if Has repeating instances is selected. Possible values:

oTop to bottom - the instances are united into a block in accordance with their location on the image, top to bottom

oLeft to right - the instances are united into a block in accordance with their location on the image, left to right

oRight to left - the instances are united into a block in accordance with their location on the image, right to left

oIn order of finding - the instances are united into a block in the order in which hypotheses are generated. Hypotheses are generated in the order of decreasing quality. If the user specified additional conditions for instances, hypotheses are generated in the user-defined order. Thus, if you need an order different from the standard order used by the program, you can specify the desired order by means of additional conditions.

The following properties specify the area on the image from which data must be extracted.

·For Layout selects the layout alternative where the search area is specified.

·Source element - specifies an area on the image which is identical to the region of the element that is used to find the block on the image. When the FlexiLayout is applied to the image, the program will search the object (or objects) described by the element. It is from these objects that the data will be captured. For a repeating group, you can select either one of the instances or use all the instances (AllInstances). For details, see Using instances of a Repeating Group as reference, excluded or source elements.

·Expression - sets an area on the image which does not coincide with any of the element regions. For example, you can merge the regions of some elements and the space among them into one block, expand the region of an element by a certain value, or specify the coordinates of the block without relying on any elements. In this case the region of the block can be described in the FlexiLayout language.

note Note.The region of a block is continuous. This means that if you create a region from rectangles which stand apart, the spaces between them will be filled by thin additional rectangles to make the region continuous.

However, a block may consist of multiple regions if all the instances of a repeating group are used as a reference element. The region of a group block is calculated based on the regions of the child blocks, just like the region of hypotheses. The resulting region is slightly expanded for better viewing.

A checkmark group and a common group of blocks have no other parameters than name and comments.

The parameters of a repeating group of blocks are the same as those of non-group blocks. The Has repeating instances option is always enabled for them. Child blocks may either have the Has repeating instances option or not, but an "Output instances" variable is always created for them. If a block inside a repeating group of blocks has the option Has repeating instances, this means that it can repeat inside each instance of the parent block.

Specifying a block region by means of instances of a repeating group

If a block is defined using several instances, the block region will consist of several separate regions. If you use a particular instance of a repeating group (e.g. LastFound), the block regions is defined just like for any other element. However, you can use all the detected instances (AllInstances). To use multiple instances, select the option Has repeating instances.

You can also write code for the block using the predefined OutputInstances variable. For example:

OutputInstances = SearchElements.PageHeader.AllInstances.UnionRect;

ABBYY FlexiCapture processes blocks with the Has repeating instances option enabled as follows:

·for non-tables blocks, the specified instances will be the instances of the corresponding field

·for a table block, the specified instances will be treated as one instance of the field, i.e. ABBYY FlexiCapture will process a block like this as a field of type Table with a discontinuous region.

Rules for creating references to elements for repeating groups of blocks

A repeating group of blocks refers to a repeating element. To create instances of a repeating group of blocks, you need at least several element instances. Therefore, one of the Ids must be AllInstances. Since the elements that are located below the element with AllInstances may not have other Ids, this condition also means that the lowermost repeating element has AllInstances.

Child blocks of a repeating group of blocks refer to child elements of the repeating group of elements to which the parent block refers. The reference must have the same Id for instances.

Example: If a repeating group block has the following reference: SearchElements..RepGr1.Instance(1).RepGr2.AllInstances, its child blocks may refer to the element RepGr1..RepGr2.Element only as follows:

SearchElements.RepGr1.Instance(1).RepGr2.AllInstances.Element.

If there is no HasRepeatingInstances attribute, you can only refer to subelements of the basic group which have no repeats inside it, and vice versa, if there is a HasRepeatingInstances attribute, you can refer to elements which have repeats inside the basic group (and you can only refer to all the instances at once).

Examples:

There is a HasRepeatingInstances attribute

SearchElements.RepGr1.Instance(1).RepGr2.AllInstances.RepGr3.AllInstaces.Element
SearchElements.RepGr1.Instance(1).RepGr2.AllInstances.RepGr3.AllInstaces.RepGr4.AllInstances.Element

There is no HasRepeatingInstances attribute

SearchElements.RepGr1.Instance(1).RepGr2.AllInstancess.Gr3.SubElement(where Gr3 is a simple group)
SearchElements.RepGr1.Instance(1).RepGr2.AllInstances.SubElement

note Note.If references are created via Source element, the check will be performed when the FlexiLayout is built, and if references are created using Advanced code, an error will be detected when matching the FlexiLayout.

Using the FlexiLayout language to describe the location of a block

To specify the region of a block, use the Expression field. Depending on the type of the block and whether the Has repeating instances option is selected for it, one of the following predefined variables is used: OutputRegion (of type Region), OutputTable (of type TableHypothesis), and OutputInstances (of type HypothesisInstances or of type TableHypothesisInstances). For more about the predefined variable that can be used in the Expression field, see Predefined variables.

Getting and expanding the region of an element by 3mm in width and by 5mm in length

OutputRegion = SomeElement.Rect;
OutputRegion.Inflate( 3*mm, 5*mm );

Merging the region rectangles of two elements and getting the rectangle which circumscribes the merged rectangles

Rect outputRect;
outputRect = Element1.Rect Or Element2.Rect;
OutputRegion = outputRect;

Merging the rectangles circumscribing the regions of two elements into one region

RectArray outputRects;
outputRects = RectArray( Element1.Rect );
outputRects.Add: Element2.Rect;
OutputRegion = Region( outputRects );

Merging the regions of the objects corresponding to two different elements into one region

RectArray outputRects;
outputRects = Element1.Rects;
outputRects.Add( Element2.Rects );
OutputRegion = outputRects.Region;

Merging the regions of the objects which belong to the region of Element1 and removing the regions of the objects which belong to the region of Element2

OutputRegion = FormRegion( Element1.Rects, Element2.Rects );

Using a Table element to specify a Table block

OutputTable = SearchElements.TableElement;

Using instances of hypotheses for a certain element to specify a Table block

OutputInstances = SearchElements.RepeatingGroup.AllInstances.TemplateElement;

You can also use a pre-defined IsNull variable to describe the region of a block. This variable signals whether the region of the block has been found when matching the FlexiLayout. The value false means that the region has been found, the value true means that the region has not been found.

The IsNull variable is initialized with the value false, i.e. the region of the block is considered to be found. However, sometimes you may wish to check certain conditions before making a conclusion.

Using the IsNull variable

1.To tell the program to consider the region of the block found if the width of the region of the source element exceeds 50 dots, enter the following code in the Region Expression field:
if Element1.Width < 50dt then IsNull = true;

2.To tell the program to consider the region of the block of Element1 has been found, enter the following code in the Region Expression field:
IsNull = Element1.IsNull

3.Suppose you need to use Element1 and Element2 to look for a block. If at least one of the elements has not been found the block is considered not found.
Rect outputRect;
Let FieldLeft = Element1.Rect.Left;
Let FieldRight = Element2.Rect.Right;
Let FieldTop = Element1.Rect.Top;
Let FieldBottom = Element2.Rect.Bottom;
outputRect = Rect( FieldLeft, FieldTop, FieldRight, FieldBottom);
if ((Element1.IsNull == True) or (Element2.IsNull == True) ) then {IsNull = true;}
OutputRegion = outputRect;

note Note.This code will work correctly only if the search area of Element1 is above and to the left of the search area of Element2. In the example above, checking this condition is not included for the sake of simplicity. In actual code, this check is required and the values of the FieldLeft, FieldRight, FieldTop, and FieldBottom variable must be adjusted. Otherwise calling the Rect function will return an error.


Creating, editing, and deleting blocks

To create a new block:

1.Switch to the FlexiLayout window.

2.Select the Blocks branch in the FlexiLayout tree.

3.In the FlexiLayout menu, select Add Block > [Type of block ] (or select New > [Type of block] in the shortcut menu).

4.In the dialog box, specify the properties of the block:

oIn the For layout list, select the layout alternative where the search area is specified.

oif the region of the block will coincide with the region of an element, select Source element and click [image] . In the Select Element dialog box, select the element whose region coincides with the region of the block. If you select a repeating group as a reference element, select its instance from the Repeating instance drop-down list. When selecting values forAllInstances, check the Has repeating instances option in the properties of the block, as in this case the block region may be discontinuous.

note Note.To facilitate recognition, the region of a text block is one dot larger in each direction than the region of the source element.

oif the region of the block does not coincide with the regions of any elements, select Expression and enter code in the Expression field. Click Check to check the code for errors.

note Note.You can create blocks before you have created elements, but in this case you can specify the location of the blocks on the image only by directly entering their coordinates. However, in most cases block coordinates are unpredictable and the locations of the blocks can only be described through the locations of image objects.

To edit the properties of a block:

1.Switch to the FlexiLayout window.

2.Select the block whose properties you wish to edit.

3.Right-click the block and select Properties... from the shortcut menu.

note Note.You can also display the Properties dialog box by double-clicking the block.

4.Make the necessary changes.

note Note.You can only change the name and region of a block. You cannot change the type of a block.

To delete a block:

1.Switch to the FlexiLayout window.

2.Select the block you wish to delete. To select multiple blocks, hold the Ctrl key and click the blocks you want to delete. To select several consecutive blocks in the branch, hold the Shift key and click the first and last block you want to delete.

3.Right-click the block and select Delete from the shortcut menu.


Working with tables

ABBYY FlexiLayout Studio allows you to create formalized descriptions of documents with tables, including tables on financial documents. More generally, the program can be used to describe any data that have a table-like structure, even if there are no explicit grid lines. Your table must not contain merged cells. Tables with merged cells can be described by means of a Repeating Group element.

Tables may spread over several pages, starting and ending anywhere on a page.

For the purposes of creating a FlexiLayout, a table can be divided into three logical parts - header, body, and footer. The body of a table contains the data that must be recognized and extracted.

The header and footer function as the top and bottom boundaries of the body. Additionally, the header contains the names of the columns. This information is used by the program to correctly divide the table into columns.

The program detects cells by relying on the black separator lines and white gaps which may divide a table into columns and rows.

To create a FlexiLayout for a table:

1.Create a Table block and list the columns that the table may contain.

2.Create a Table element in which:

a.Select the Table block corresponding to the Table element;

b.Set the search constraints for each column of the table;

c.Set the order of the columns in the table;

d.Set the search constraints for the header of the table;

e.Set the search constraints for the footer of the table;

f.Specify how the table should be divided into rows;

g.Set the search area for the entire table;

h.If required, set additional search constraints.

More:

Table element


Table block

A Table block is used for carries over to FlexiCapture the coordinates of the detected tables. The data from the detected tables will be extract in the FlexiCapture. A Table block is different from other types of block in that it returns not only a region enclosing the entire block, but also rectangles drawn around each table cell. Compared to other types of block, a Table block has an additional property - a list of columns that the table may contain. A FlexiLayout may contain one or more Table elements telling the program where and how to look for the columns specified in the block.

note Note.

1.Upon creating a Table element you need to 'bind' it to the already created Table block. So you usually need to start with creating a block. You can first specify its approximate search area, then create one or more elements to look for the block, and then use these Table elements to finalize the search area of the block.

2.You can create several elements each of which describes its own algorithm of finding one and the same Table block. You can instruct the program to select the Table element which best fits the table block after the block has been found. This is done by means of a Region expression.

Table blocks are marked with [image] in the FlexiLayout tree.

To create a Table block:

1.Switch to the FlexiLayout window.

2.Select the Blocks branch in the FlexiLayout tree.

3.From the FlexiLayout menu, select Add Block → Table or select New → Table from the shortcut menu.

4.Specify the properties of the block.

5.On the Table block tab set the following:

othe name of the block;

oyour commentary to the block (optional);

oif the region of the block and division of the table into rows and columns will coincide with the region returned by a Table element, select the Source element option and click [image]. In the Select Element dialog box, select the Table element whose region coincides with the region of the block and click OK.

oif the region of the block does not coincide with the region of any of the Table elements, select the Region expression option and enter the required code in the Region expression field. Click Check to check the code.

6.On the Columns tab, specify the columns that may occur within the block. To do this, click Add... and enter the name of a column. You may find it convenient to use the names of columns as they occur on the test images. From the Type drop-down list, select the desired type of the column. You can change one of the following types: Text, Barcode, Checkmark, Picture or Non-Recognized Block. To change the name or type of a column, click Edit... and in the Edit Table Column dialog box, enter a new name or select a different type for the column. Use the [image] (Down) and [image] (Up) buttons to arrange the columns in the same order in which they must occur in data capture application

An example of specifying which block region to select

To specify the region of a block, use the pre-defined variable OutputTable of type TableHypothesis.

The code in the example below selects the Table element in which the most rows have been found

let T1 = SearchElements.TableElement1;
let T2= SearchElements.TableElement2;
if T1.RowsCount > T2.RowsCount then OutputTable = T1; else OutputTable = T2;

note Note.The table elements SearchElements.TableElement1 and SearchElements.TableElement2 in the example must refer to the same Table block whose Region expression field contains the above code.


Table element

A Table element is used to detect tables of different structures, including tables on financial documents. Additionally, a Table element can be used to detect any data which have a table-like structure. The program will rely on black separator lines and white gaps to look for table cells.

Table are marked with Table in the FlexiLayout tree.

1.Switch to the FlexiLayout window.

2.Go down the FlexiLayout tree to the nesting level where you wish to create a new element (select SearchElements for the first level).

3.Select the required type of element (FlexiLayout > Add Element > Table).

4.Specify the properties of the element:

oOn the General tab, enter a name for the element and add your comment (optional). Then specify whether the element is optional or required;

note Note.The name of an element must start with a letter or an underscore, which may be followed by letters and/or digits. You cannot use spaces or the following special symbols: ' . ', ' , ', ' : ', ' - ', ' \ ', ' / '. The name of an element must not coincide with any of the reserved words;

oOn the Columns tab, specify the table block bound to the element. Once you have specified the Table block, a list of all the columns of the selected block will appear in the List1 field. For each column, specify its search constraints;

oOn the Order tab, specify the orders in which the columns may occur in the table on the images;

oOn the Header tab, specify the properties of the header of the table;

oOn the Footer tab, specify the properties of the footer of the table;

oOn the Rows tab, specify the properties of the rows;

oOn the Search Constraints and Relations tabs, specify the search area for the entire table, including its body, header, and footer;

oIf required, specify additional search relations on the Advanced tab.

More:

listPicture An overview of FlexiLayout element properties

listPicture Search area

listPicture Additional search constraints


Selecting a Table block and specifying search constraints for columns

Show/Hide Hidden Text

You can select the Table block to bind to the current Table element on the Columns tab of the element's Properties dialog box.

Show Properties dialog tab, Columns tab

Selecting a Table block

Each Table element must correspond to a Table block, for which search it intends. To select a Table block, click the Select button and select the Table block which corresponds to the current Table element. A list of all its columns will appear in the List1 field. Set the properties for each of the columns - these will be used as search constraints when looking for the columns.

note Note.

1.The list of the columns of the block displayed on the Columns tab in the element's Properties dialog box cannot be edited in this dialog box. To edit the list, you need to open the Properties dialog box of the block.

2.To better understand how an element and its corresponding block are connected, consider the following: a Table block serves as an interface between the FlexiLayout and a data capture application, whereas a Table element is the implementation of that interface. A Table element contains the instructions about how to find the Table block. You can create several program implementations for any interface. Likewise, you can create several Table elements for a Table block (but not the other way round).

When you select a Table block on the Columns tab of an element, by default the program uses the names and order of the columns in the Table block to set the search constraints for each of the columns (see Setting search constraints for table columns) and to set the order of the columns (see Order of table columns).

Disabling a table column

When testing your FlexiLayout, you may need to disable a column without removing it from the FlexiLayout altogether. Disabling a column retains all the information about the column in the FlexiLayout but tells the program to ignore the column when testing the FlexiLayout. To disable a column, select the column you wish to disable in the List1 field and click Disable. This will clear the check mark next to the name of the column. To enable the column, select its name in the list and then click Enable.

note Note.When you disable a column, it is automatically disabled in all of the order lists on the Order tab.

Setting search constraints for table columns

The search constraints for table columns are set in the columns' Properties dialog box. To open the Properties dialog box of a column, select the column in the List1 field and then click the Properties... button next to the field.

Show Properties of Column dialog box

The names of the columns located in the header of the table play an important part in column detection. To help the program to detect the names of the columns, you can use keywords which can be found in the header. Alternatively, the name of a column can be detected by relying on another element, whose region will be considered also the region of the column name.

Using key words to detect the names of columns

To detect the name of a column by means of keywords, select the Detect by keyword in name option. In the field below, enter the keywords or phrases which occur in the column name on the test images. Press Enter after typing each keyword.

If you wish the program to use only whole words when looking for the names of the columns, select the Whole words only option.

In a narrow column, words in the name will often be carried over to the next line. Select the Multi-line name option to detected column names like that.

Since one and the same column may have different names on different images, the list of keywords must include all the possible variants which may actually occur. However, on some of the images the column may have no name at all or may be absent altogether. For this reason, the name of a column is always optional. This means that the name of a column need not be found when matching the FlexiLayout with the images. If a keyword is not found (either because it is actually absent or because the quality of the image is inadequate for OCR), the hypothesis will be penalized - its quality will be multiplied by the quality of the null hypothesis for the non-detected keyword. The penalty for the hypothesis is set in the Missing keyword penalty field. The default value is 0.97.

Using the region of another element to detect the names of columns

You can use an already found element to find the name of a column. This allows you to set additional search constraints on the keyword. This method also allows you to look not only for Static Text, but also for a Character String, for Inverted Text, or just for a region.

To find the name of a column by means of an already found element, select the Use found element as column name option, next click [image] and in the Select Element dialog box, select the element whose region will be considered also the region of the column name.

note Note.The element you use to detect the name of a column must be located above the described Table element in the FlexiLayout tree. When describing a multi-page table, it is recommended to use repeating elements to search for a column name (refer to Detecting multi-page tables for more information about multi-page tables).

Checking whether the column has been detected correctly

When looking for columns, the program uses not only information about their names, but also the information about their content. Thus, if you know that a particular column contains a particular type of data, you can specify this in order to help the program detect the column more reliably. To enable FlexiLayout Studio to check the data type in a column, select the Check content type option and in the Type of column content field specify one of the available data types that the column is likely to contain:

·Text;

·Currency;

·Date;

·Regular expression;

·Number.

If you selected the Regular expression type, you need to enter the code of the regular expression which describes the format of the data in the column.

Regular Expression Alphabet
Name in the list | Symbol in the field | Example
Any character | * | "k"*"t" – allows 'kit', 'kat', etc.
Letter | C | C"at" – allows cat, bat, Rat, mat, etc.
Upper case letter | A | A"at" – allows Cat, Bat, Rat, Mat, etc..
Lower case letter | a | a"at" – allows car, bat, rat, mat, etc.
Letter or digit | Х | X – allows any single letter or digit.
Digit | N | N"th" allows 5th, 4th, 6th, etc.
String | "" | "cat"
Or | | | "dr"("i"|"u")"nk" – allows "drink" or "drunk".
Character from the set | [] | [hm]"at" – allows 'hat' or 'mat'.
Character not from the set | [^] | [^b]"at" – allows 'cat', 'mat', 'rat', but does not allow bat.
Any number of repeats (applies to the expression or sub-expression to the left) | {-} | [AB74]{-} – allows any combination of A, B, 7, 4 of any length.
Number of repeats is n | {n} | N{2}"th" allows 25th, 84th, 11th, etc.
n to m repeats | {n-m} | N{1-3}"th" allows 5th, 84th, 111th, etc.
0 to n repeats | {-n} | N{-2}"th" allows th, 84th, 4th, etc.
n or more repeats | {n-} | N{2-}"th" allows 25th, 834th, 311th, 34576th, etc.
Subexpression | () |

If the data type in the column does not coincide with the data type in the Type of column content field, the hypothesis will be penalized. The field Missing content penalty contains the coefficient by which the quality of the hypothesis will by multiplied if the column content does not correspond to the data type you specified.

Specifying the coordinates of the search area

You can specify the coordinates of the search areas of the left and right boundaries of a column. In the Absolute area constraints property, enter the coordinates of each of the search areas in the Left boundary and Right boundary fields respectively.


Order of table columns

Show/Hide Hidden Text

Since the order and composition of columns may vary from image to image, you need to list all the possible orders of the columns in the table. If an element describes all the possible columns of a table and you can find all the possible orders of columns by analyzing the images, specify all the possible orders in the properties of the element. If you cannot provide an exhaustive list of all the possible column orders, or if the columns are interspersed by other columns which need not be detected, you can write a special rule to describe multiple column orders.

You can specify column order in the Properties dialog box of a Table element (Order tab).

Show Properties dialog box, Order tab

note Note.

1.If you simply list possible column orders, you can specify contradictory column orders, for example: "Column1; Column2; Column3" and "Column3; Column2; Column1". When matching the FlexiLayout with an image, the program will select the column order which best suits the image.

2.If you use a rule to describe multiple column orders, you cannot specify contradictory orders. When matching the FlexiLayout with an image, the program will look for a column order which meets all the conditions. If two rules specify contradictory conditions (e.g. "Column1 << Column2 << Column3" and "Column3 << Column2 << Column1"), the program will fail to match the FlexiLayout.

Listing fixed column orders

If the columns have exactly the same order on all of the test images, this order is said to befixed. For example, a table may contain three columns, say, Date, Quantity, and Price, which are always arranged in this order.

Sometimes, you will be able to find several different column orders on the test images. For example, on some of the images the order might be Date, Quantity, Price, while on others the order might be Date, Price, Quantity.

The program allows you to specify any number of such orders.

To specify fixed column orders, select the Fixed column order option. By default, when you create a Table element the program specifies one fixed order of columns by listing all of the columns in the same order as you specified when creating the table block. This order is given the default name of Standard.

You can make changes to the Standard order to adjust it to the column order on the test images. You can also add new orders or delete orders from the list.

To edit a fixed column order:

1.Select the column order you wish to edit and click Edit.... The Edit Fixed Column Order dialog box will open.

2.In the Order name field, enter a new name for the column order. This name is only used to identify the order in the FlexiLayout and is displayed in the properties of the hypothesis for the current Table element. This name will help you identify which of the column orders the program has selected.

3.The List1 field contains a list of all table columns. Select the desired column and click [image] to add it to the List2 list. Clicking [image] will add all the columns to the list. Clicking [image] removes a column from the List2 list, and clicking [image] removes all the columns from the List2 list. The [image] and [image] move columns up and down in the List2 list. Use this buttons to change the order of columns as required and click OK.

To create a new column order:

1.Click the Add... button. The Add Fixed Column Order dialog box will open.

2.In the Order name field, enter a name for the new column order.

3.The List1 field contains a list of all table columns. Select the desired column and click [image] to add it to the List2 list. Clicking [image] will add all the columns to the list. Clicking [image] removes a column from the List2 list, and clicking [image] removes all the columns from the List2 list. The [image] and [image] move columns up and down in the List2 list. Use this buttons to change the order of columns as required and click OK.

To delete a fixed column order, select the order in the list and click Delete.

Using rules to specify the order of columns

If analyzing the test images does not allow you to determine one or more fixed column orders, you can write a rule to describe the possible orders.

Each rule sets a condition like the following: "The Date column always precedes the Item column" or "The Price column always follows the Item column". Rules allow you to limit the search areas of columns and reduce the number of possible combinations.

To specify the order of columns by means of a rule, select the Rules for column order option.

To create a rule:

1.Click the Add... button. The Edit Column Order Rule dialog box will open.

2.The List1 field contains a list of all table columns. Select the desired column and click [image] to add it to the List2 list. Next, select the column which always goes after the previously selected column (but not necessarily immediately follows it).
Clicking [image] will add all the columns to the list. Clicking [image] r emoves a column from the List2 list, and clicking [image] removes all the columns from the List2 list. The [image] and [image] move columns up and down in the List2 list. Use this buttons to change the order of columns as required and click OK.

3.The created rule will be displayed in the Rules for column order field. The << symbol indicates that one field always precedes the other.

To edit a rule:

1.Click the Edit... button. The Edit Column Order Rule dialog box will open.

2.Use the [image] , [image] , [image] , [image] and [image] buttons to set the required order and click OK.

To delete a rule, click Delete.


Table header

Show/Hide Hidden Text

A Header contains the names of the columns in the table. Data are not extracted from this part of the table. The header merely helps the program to locate the top boundary of the table body and divide the table into columns. The search constraints for the header are set on the Columns tab.

Show Properties dialog box, Header tab

The following properties can be specified for a table header:

·Look for header tells the program whether it should look for a header when matching the FlexiLayout. The option is selected by default.

·Header is optional tells the program that the table may have no header. This will not prevent the FlexiLayout from matching. The option is selected by default.

·The Null hypothesis quality field sets the quality of the null hypothesis for the header (this hypothesis is generated if the header is not found). The default value is 0.95.

·In the Number of hypotheses field, enter the maximum number of hypotheses to generate when looking for the header. The default value is 1.

·Header is on each page specifies that the header of a multi-page tables occurs on every page. The option is selected by default.

·The Absolute area constraints option allows you to specify the coordinates of the header search area. If you wish to enter the coordinates, select this option and in the field next to it, enter the coordinates in the following format:[left, top, right, bottom]. You can enter the coordinates of only one rectangle in this field.


Table footer

Show/Hide Hidden Text

A Footer of the table helps the program to locate the bottom boundary of the table body. No data are extracted from the table footer. Since table footer may be absent on some of the images, it is not looked for by default. You can use keywords or phrases to look for a footer. Alternatively, you can use an element to look for a footer. The region of this element will be considered to be also the region of the footer.

Show Properties dialog box, Footer tab

The following properties can be specified for a table footer:

·Look for footer tells the program whether it should look for a footer when matching the FlexiLayout. The option is not selected by default.

·Footer is optional tells the program that the table may have no footer. This will not prevent the FlexiLayout from matching. The option is selected by default.

·The Null hypothesis quality field sets the quality of the null hypothesis for the footer (this hypothesis is generated if the footer is not found). The default value is 0.97.

Selecting a method of finding the footer

The Search by keyword option allows you to use keywords or phrases to look for the footer. If you wish to use keywords, select this option and then enter the keywords in the field next to it. Press Enter after typing each word.

If you want to restrict the search constraints for the footer of the table, select the Whole words only option. If this option is selected, the specified keywords or phrases must be found in whole when searching for the footer of the table with the help of keywords. For example, if you have specified "Pages" as a keyword, the word "Page" will not be considered.

The Use found element as footer option allows you to use an element to look for the footer. The region of the found element will be considered to be also the region of the footer. You can use an element of any type to look for the footer. For example, you cam find a horizontal White Gap and use it as the bottom boundary of the table.

If you wish to use an element, select this option and then click [image]. In the Select Element dialog box, select the element whose region will be used as the region of the footer.

note Note.The element you use for the footer must be located above the current Table element in the FlexiLayout tree.

Footer is on each page specifies that the footer of a multi-page tables occurs on every page. If the option is not selected, the footer may only occur on the last page. Once the program detected the footer it will stop looking for the other parts of the table. The option is selected by default.

The Absolute area constraints option allows you to specify the coordinates of the footer search area. If you wish to enter the coordinates, select this option and in the field next to it, enter the coordinates in the following format:[left, top, right, bottom]. You can enter the coordinates of only one rectangle in this field.


Table rows

Show/Hide Hidden Text

After the program has detected the columns, it starts to look for rows. FlexiLayout Studio can detect rows automatically by relying on the black separators and white gaps.

Sometimes a column may contain a fairly large fragment of text (e.g. a long description of a product). In this case the text is often carried over to the next line and white gaps between these lines should be ignored when dividing the table into rows. If the number of text lines in a cell varies from column to column, you can use one or more 'master' columns to divide the table into rows. The rows of the 'master' columns will be used as a pattern for the entire table.

You can select a method of dividing a table into rows and specify the properties of the rows in the Properties dialog box of the Table element (Rows tab).

Show Properties dialog box, Rows tab

Automatic detection of rows

To detect rows automatically, select the Detect rows automatically option. The program will rely on the black separators and white gaps present in all of the columns to divide them into rows.

If you wish each line of text to be marked as a row, select One line of text corresponds to one row.

Using master columns to detect rows

If a table has columns whose data define the splitting of the table into rows, you must select the Use master columns to detect rows option and specify the desired columns in the list of the so-called Master columns. The first Master column detected on the image will be used to detect rows of the table.

Select the columns whose rows will be used to divide the rest of the columns into rows. Since the composition of columns may vary from image to image, the list of master columns must cover all the possible variations. To create a list of master columns:

1.Click the [image] button next to the Use master columns to detect rows option

2.In the Select Master Columns dialog box, select the required columns from the List1 list and click [image]. The names of the selected columns will be displayed in the List2 list. Then use the [image] and [image] buttons to arrange the columns in order of priority. The top-most column that the program finds on the image will be used for detecting rows.

3.Click OK to display the selected columns in the Use master columns to detect rows list.

To edit the list of master columns, click [image]. Then use the [image], [image], [image], [image], and [image] buttons to make the necessary changes to the List2 list.

To specify how text within the cells of the master columns should be aligned, use Master column text alignment. Top specifies alignment by the top border and Bottom specifies alignment by the bottom border.

Select One line of text corresponds to one row if you wish the program to draw a row for each line of text in master column.

Words and phrases for which the program must not draw rows

Some tables may contain narrow columns which contain numerical data accompanied by units of measurement (e.g. sums of money with currency symbols). If the unit of measurement does not fit on the same line, it may be carried over to the next line. In this case the column will contain additional lines of text. To prevent the program from drawing separate rows for such lines, you can add such carried currency symbols, units of measurement etc. to the list of Words not to be treated as a separate line of text.

To create a list of stop words or phrases which do not merit a separate row, type such words or phrases into the Words not to be treated as a separate line of text field. Press Enter after typing each word or phrase.

note Note.Words you type in the Words not to be treated as a separate line of text field are used both when detecting rows automatically and when detecting rows by means of master columns.


Detecting multi-page tables

What is a multi-page table?

ABBYY FlexiLayout Studio can detect multi-page tables, i.e. tables that stretch over several pages of a document, the order and number of their columns being the same on all the pages. The width and the exact location of the columns may vary slightly from page to page (the maximum variation allowed by the program is 1 inch).

For the sake of brevity, we use the term one-page subtable for each part of a multi-page table located on one page.

The header and footer of a multi-page table

Multi-page tables may have a header that either repeats on every page or occurs only once on the first page. The option Header is on each page tells the program whether the header must be detected on every page. If the option is disabled, ABBYY FlexiLayout Studio will search for the header only on the first one-page subtable.

The same applies to the footer of a table, which can occur either only once on the last page or at the bottom of every page. The Footer is on each page tells the program whether the footer must be detected on every page. If the option is disabled, ABBYY FlexiLayout Studio will search for the footer only on the last one-page subtable.

Searching for a multi-page table

The program starts searching for a multi-page table from the first page of the search area specified by the user and continues the search on the subsequent pages. The search stops when any of the following conditions is met:

1.If the footer must occur only on the last page and it has been detected.

2.If the program has come to the end of the search area specified for the table.

3.If the program has not detected any one-page subtables on a page, i.e. it has not found the header, the footer, or the table body.

Using the region of another element to detect the name of a column in a multi-page table

In the case of multi-page tables, you can still use two methods to search for the header and footer of a table or its subtables: either by specifying keywords (the Detect by keyword option) or by turning an already detected element into header or footer (the Use found element as... option). If you use the first method, the program will search for the specified keywords on those pages where the header or footer may occur (defined by the Header/Footer occurs on every page option). If keywords cannot reliably detect the column names on the images being processed, use the Use found element as... option.

If the header and footer of a multi-page table occur only on the first and the last page respectively, you can use already detected simple elements, just like for one-page tables. This method is used in Sample 3 (see the project in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice). However, if the header or the footer must be detected on every page, the best strategy is to use the subelements of an already detected Repeating Group. Using a Repeating Group, you can find the header on every page by describing it only once in the Repeating Group and specifying the possible number of instances for the Repeating Group. If the Table element is described below the Repeating Group in the tree of elements, use all the instances (AllInstances) of the desired subelements to reference column names to the Repeating Group. For an illustration of this approach, see the sample project in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice with Repeatable Groups).

note Note.If there are several instances of the selected Repeating Group on a page, the first instances will be used as the name of the column.

Searching for repeating tables

In some documents, there may be several identical tables on a page (the tables arrangement and order of columns in these tables may be the same). Sometimes, the last table in the series may be interrupted and continue on the following page. In between the tables there may occur textual data or visual formatting elements, e.g. table captions or explanatory notes.

You can detect tables like these by placing the Table element that describes one instance of the table inside a Repeating Group. This allows you to describe the entire set of tables in one Table element and specify the repetitions of the instances in the properties of the Repeating Group that encompasses the Table element.

If you are using the Use found element as... option to detect column names bases on an already detected element, it is more convenient to place this element into the same Repeating Group above the Table element. In this case, when you select an auxiliary element that will be used to detect the column name, reference the current instance (CurrentInstance) of the auxiliary element within the Repeating Group. Now when the program will search for each instance of the column name, it will use its corresponding instance of the auxiliary element. For an illustration of this approach, see the sample project in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Prices).


Hypotheses and trees of hypotheses

A hypothesis is an assumption made by the program that the detected object(s) correspond(s) to a particular element, i.e. meet(s) the properties and search criteria specified for the element.

warning Important!There may be several objects or sets of objects in the element’s search area, all of which correspond to the element. In this case, the program will formulate a hypotheses for each detected object.

Hypotheses are characterized by their quality.

The quality of a hypothesis measures how well the detected object matches the description contained in the corresponding element and is a numerical value from 0 to 1.

The quality of a hypothesis is calculated as [ Pre-search quality ]*[ Post-search quality ], where

·Pre-search quality is the quality of the settings made in the Properties dialog box and in the Advanced pre-search relations field

·Post-search quality is the result of applying the conditions specified in the Advanced post-search relations field.

The quality of a hypothesis for a Group element is calculated by multiplying the qualities of the hypotheses for all the constituent elements.

For optional elements the program formulates a null hypothesis.

A null hypothesis is a hypothesis which the program formulates if it has detected no objects corresponding to an optional element in the search area.

This means that if the program does not find any objects corresponding to an optional element, it does not stop matching the FlexiLayout, but formulates a null hypothesis and assigns it a quality set by the user when creating the optional element.

For the sake of convenience, we use the term hypothesis to refer to the set of objects included in a particular hypothesis.

Hypotheses: a practical example

Suppose we need to create two elements which will be used to find two static texts on our images. The first static text is "mother", the second static text is "father", and we know that the text "father" is always located below the text "mother" The first Static Text element, StaticText1, will be used to look for the text "mother", and the second Static Text element, StaticText2, will be used to look for the text "father". We assume also that both elements are optional and the quality of the null hypotheses for each of them is set to 0.97.

We will not set any constraints on the search area for StaticText1. As we know that the text "father" is always located below the text "mother", we can specify that StaticText2 must be always located below StaticText1. We will do this by typing the corresponding constraint on the Relations tab in the Properties dialog box of the StaticText2 element: Below: SearchElements.StaticText1;.

The figure below displays the results of matching the FlexiLayout with an image on which the word "mother" occurs twice (above and below the word "father") and one OCR error has been made in the word "mother" located above the word "father".

Matching the FlexiLayout has generated two hypotheses for the StaticText1 element. The first hypothesis corresponds to the word "mother" recognized with one OCR error and located above the word "father" and has a quality of 0.98. The second hypothesis corresponds to the word "mother" located below the word "father" and has a quality of 1.

At this stage, the quality of each chain is the same as the quality of the corresponding hypothesis. Therefore, the best chain consists of the hypotheses with a quality of 1.

Since we told the program to look for the StaticText2 below the StaticText1 element and since the program has generated two hypotheses for the StaticText1 element, now it is trying to find the required static text in two search areas. If the program pursues the second hypothesis with a quality of 1, which has found the word "mother" below the word "father", it will fail to find the StaticText2 element below the StaticText1 element and, consequently, it will generate a null hypotheses with a quality of 0.97. The quality of the resulting chain of hypotheses will be 1x0.97=0.97

If the program pursues the first hypothesis with a quality of 0.98, which has found the word "mother" above the word "father", it will successfully detect the StaticText2 element below the StaticText1 element and generate a hypothesis with a quality of 1. The quality of the resulting chain of hypotheses will be 0.98x1=0.98.

As a result, the program selects the chain with an overall quality of 0.98.


Hypotheses and optimizing the search

When the program matches a FlexiLayout with an image, it attempts to find the objects on the image which correspond to the elements in the FlexiLayout. The program then estimates how well a particular object matches its element. An estimate is a number from 0 to 1. A quality of 1 means that the detected object is a 100% match. If the quality is not 0, matching the FlexiLayout results in creating regions for the blocks.

The program looks for elements consecutively in the order in which they follow in the FlexiLayout tree, top to bottom. For each element the program may find several matching objects (or sets of objects) in the search area. The program formulates a hypothesis for each object in the search area and estimates its quality - the better the match, the higher the quality of the hypothesis.

The location of the detected object determines the location of the objects down in the FlexiLayout tree. The program uses each of the hypotheses of the current element as starting points to look for the subsequent elements located below the current element. Thus, the hypotheses for elements branch out, which results in a tree of hypotheses that contains many more branches than the tree of elements.

If several elements are joined into one Group element, the entire group is considered as one element for which several hypotheses are formulated. The quality of a Group element is calculated by multiplying the hypotheses for the constituent elements. The entire FlexiLayout may considered as a Group element whose quality can be calculated by multiplying the qualities of the hypotheses for all of its elements.

When matching a FlexiLayout with images, the program needs to find the best complete branch of hypotheses. A branch is complete if it includes all of the elements, from the top element to the bottom element. A generic solution would be to consider all the possible combinations of hypotheses for all the elements, building a complete set of possible complete branches and selecting the branch with the highest quality. This is not practical, since it would take too much time. Moreover, if the number of elements is fairly large and their search areas are only approximate, a combinatorial explosion may occur resulting in an uncontrollable growth of the number of hypotheses.

The program uses several methods of optimizing the search to keep the number of hypotheses to a minimum.

Search optimization

Each element in the FlexiLayout has an important parameter called Number of surviving hypotheses. The user can use this parameter to limit the number of hypotheses which the program may use when looking for the subsequent element. By default, this parameter is set to 5 for simple elements, and to 1 for Group elements. That means that if the program finds 15 hypotheses for a given element, it will select the best five, leaving the other 10 chains of hypotheses incomplete. Group elements, as a rule, are detected more reliably than simple elements. Therefore, the best hypothesis for a Group elements usually turns out to be the correct one.

In most cases the program has several incomplete chains of hypotheses and, consequently, several possible search directions. The program looks for the best hypothesis using the classic "wide search" algorithm. This algorithm means that the program always tries to complete the chain which has the best quality at the moment, irrespective of its length.

Suppose we have a FlexiLayout which describes 30 elements for which two chains of hypotheses have been created: a chain of 29 elements which has an estimated quality of 0.89 and a chain of 2 elements which has an estimated quality of 0.92. The program will attempt to complete the smaller chain, which is better in terms of quality, until such time when the qualities of all its extensions become worse than the first chain.

In the case of a Group element, the program uses so-called quality optimization. When the program finds an ideal complete chain of hypotheses for a given Group element (that is, the quality of this chain is 1), it ignores all the other variants.

The total number of hypotheses for each element is limited to 10,000.

More:

listPicture How hypotheses are generated and assessed


How hypotheses are generated and assessed

Once the program has formulated a hypothesis (i.e. detected the object that best matches the description provided in the element), it draws the region of the element on the image.

A region is an area on the image consisting of several rectangles drawn so as to enclose the object. The region of a null hypothesis is the entire search area of the element.

The search area of an element may contain several objects which match the description contained in the element, i.e. the program can formulate a hypothesis for each one of them. When describing an element, you can specify the maximum number of hypotheses — this will limit the number of candidate variants the program will consider when looking for objects described by the element. Hypotheses for the elements that come next in the tree are formulated on the basis of the best hypotheses for the preceding element. The maximum number of best hypotheses for a particular element is set in the element's Properties dialog box (General tab). For simple elements, the default value is; for Group elements, the default value is 1.

warning Important!We do not recommend changing the default maximum number of hypotheses.

The quality of a hypothesis depends on the properties of the corresponding elements.


Hypotheses for Static Text elements

When the program looks for static text on an image, the recognized text need not exactly match the text specified in the properties of the element.

For example, you can specify the properties of a Static Text element in such a way as to make the program consider the object "Supplier" as a valid hypothesis for the expected static text "Supplier".

You can set the following parameters in the Element Properties dialog box:

·Max number of errors – the maximum number of incorrect characters in the word

·Max error percentage – the percentage of errors allowed in the word (calculated as a ratio of the number of errors in the hypothesis to the total number of characters in the hypotheses)

If the number of errors exceeds the set threshold, the detected object will not be considered a valid hypothesis. The greater the number of errors, the poorer the quality of the hypothesis. Since the number of characters in the object is not known in advance and depends on what images are processed, the program will use either the threshold set in absolute numbers or the threshold set in percentage points. When formulating and evaluating a hypothesis, the program will use the more stringent of the two conditions, i.e. if the detected object meets one criterion but does not meet the other criterion, the object will not be considered a valid hypothesis.

A Static Text hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Keyword | Lists the found keywords which you set in the Search text field. For each word, the program shows the number of errors.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Static Text

listPicture Search area

listPicture Additional search constraints


Hypotheses for Separator elements

When formulating these hypotheses, the program will consider only the Separator objects detected during pre-recognition.

A Separator hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Orientation | The orientation of the detected separator.
Relative length | The length of the detected separator relative to the length of the search area.
Space length | The absolute length of the space within the detected separator.
Relative space length | The relative length of the space within the detected separator.
Orthogonal shift | The distance between the separator objects in one hypothesis, measured orthogonally to the orientation of the separators.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Separator

listPicture Search area

listPicture Additional search constraints


Hypotheses for White Gap elements

The program formulates White Gap hypotheses by creating the histograms of candidate objects.

By default, the program looks for a White Gap between Any Text objects. To look for a White Gap between other types of object (e.g. between Separators), you need to write a corresponding constraint on the Properties dialog box of the White Gap element (Advanced tab, Advanced pre-search relations field). For example, if you need to find a White Gap in an area where all types of objects may occur, you need to write the following expression: Type: PictureObject + SeparatorObject+ AnyText + PunctuationMark + CheckMarkObject;.

A histogram is created as follows:

The program projects all the objects of a certain type which have been detected in the search area on the horizontal or vertical axis. The projection is a sum total of the objects' widths or heights. When looking for a horizontal gap, the program creates a projection on the vertical axis. When looking for a vertical gap, the program creates a projection on the horizontal axis; when looking for a horizontal gap, the program creates a projection on the vertical axis. The linear size of each object of the given size is added to the projection. For example, to find a vertical White Gap among the text objects, the program sums up the heights of all the text objects located in the search area above a particular point on the horizontal axis and intersecting the search area of the element.

Then the program looks for regions where the height of the histogram is less than a particular value. These regions will correspond to areas in which the number of objects is relatively small and their projection is less than a certain pre-defined value. The program must allow a certain number of objects to be present in the White Gap because real images often contain speckles and other noise introduced during scanning and which must be ignored when looking for gaps between columns or paragraphs. Background noise does not much affect the overall profile.

Suppose we have text objects H1, H2,..., H9 in the search area. In the figure below, these objects are highlighted in black. Let the search contain other types of objects (highlighted in red).

To find the vertical White Gap, we need to find the sum up the projections of the text objects on the horizontal axis. The resulting histogram is shown in the figure below. You can see that non-text objects are ignored in the histogram.

Next, we need to find the histogram Maximum (marked as Max in the figure). The value of the maximum level is then multiplied by the value set in Threshold coefficient (%) (K=0.2). The result is the maximum allowed level of the White Gap (marked as White Gap threshold in the figure). If the resulting White Gap threshold >0, other objects may be present in the area of the White Gap.

Once the White Gap threshold has been calculated, it is compared with the values set in Lower threshold limit and Upper threshold limit. If White Gap threshold < Lower threshold limit, the White Gap threshold is assigned the value of the Lower threshold limit and this value will be used to look for the White Gap. If White Gap threshold > Upper threshold limit, the White Gap threshold is assigned the value of the Upper threshold limit.

Next, the heights on the histogram are compared with the White Gap threshold in order to find areas where the level of the histogram is less than the White Gap threshold.

The Min width/height property sets the minimum absolute width of the White Gap. If the value is W2, the two other hypotheses will be discarded.

A White Gap hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Orientation | The orientation of the detected White Gap.
Histogram maximum in search area | The peak of the histogram in the search area.
White Gap threshold | The point in the histogram below which the program starts formulating White Gap hypotheses.
Histogram maximum within hypothesis | The peak of the histogram maximum within the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture White Gap

listPicture Search area

listPicture Additional search constraints


Hypotheses for Barcode elements

The program formulates Barcode hypotheses by considering the Barcode objects detected during pre-recognition.

A Barcode hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Text | The recognized value of the barcode.
Type | The type of the detected barcode.
Orientation | The orientation of the detected barcode.
Number of suspicious characters | The number of unreliably recognized characters.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Barcode

listPicture Search area

listPicture Additional search constraints


Hypotheses for Character String elements

If a regular expression has been specified in the properties of an element, the program will look for any strings in the search area that meet the conditions in the regular expression. If no regular expression has been specified, the program uses the user-defined alphabets.

The program considers all the text objects which horizontally intersect the search area (vertically the objects must fit within the search area in their entirety). The text objects are then grouped into lines. Lines are built left to right. The program stops building a line when the maximum length of space (set in the Max space length property) is exceeded.

In the resulting lines, the program identifies character strings, each of which contains characters only from one of the user-defined alphabets. In a similar fashion, the program divides lines into fragments.

Next, the program formulates a hypothesis for each of the fragments. Depending on whether the Allow embedded hypotheses option is selected or not, hypothesis are formulated on two different principles.

Suppose the program detected three fragments at a previous stage. If the Allow embedded hypotheses option is selected, hypotheses are formulated as follows:

hypothesis 1: fragment 1

hypothesis 2: fragment 1 + fragment 2

hypothesis 3: fragment 1 + fragment 2 + fragment 3

hypothesis 4: fragment 2

hypothesis 5: fragment 2 + fragment 3

hypothesis 6: fragment 3

For each hypothesis, the program will check that the portion of characters of each alphabet does not exceed the value set in the Percentage of alphabet characters field. Similarly, the program checks that the percentage of non-alphabet characters does not exceed the value set in the Percentage of non-alphabet characters field. If it least one of the checks fails, no hypothesis is formulated.

If the Allow embedded hypotheses is not selected, the embedded hypotheses in the list above will be discarded. Embedded hypotheses are those which are contained within another hypothesis in the list above. If the checks were successful for all of the hypotheses, only the following hypothesis will remain: fragment 1 + fragment 2 + fragment 3.

Thus, if the Allow embedded hypotheses option is not selected, the program formulates hypotheses of maximum length which meet all of the conditions. Even though embedded hypotheses are excluded, hypotheses may intersect. This may be a stand-alone character or word, or a string of characters which are part of other hypotheses but for which no separate hypotheses have been formulated. For example, the program may formulate two hypotheses (i.e. two strings) - one ending in a certain word or phrase and another starting with that word or phrase.

E.g.

hypothesis 1: fragment 1 + fragment 2

hypothesis 2: fragment 2 + fragment 3

Once all the possible hypotheses have been generated, the program calculates the Pre-search quality for each (this is an estimate of how well a hypothesis meets the search constraints set in the Properties dialog box on the Character String tab and on the Advanced tab in the Advanced pre-search relations field). At this stage, the quality is calculated based on whether the length of the hypothesis in characters falls within the fuzzy interval specified in the Character count property, on whether the length of the total gap in the line falls within the fuzzy interval specified in TotalGapLength, and on whether the number of words in the line fall within the fuzzy interval specified in the Word count property.

The overall quality of a hypothesis is calculated by multiplying all the qualities.

A Character String hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Text | The characters in the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Character String

listPicture Search area

listPicture Additional search constraints


Hypotheses for Paragraph elements

A Paragraph hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Text | The text in the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Paragraph

listPicture Search area

listPicture Additional search constraints


Hypotheses for Date elements

The program formulates Date hypotheses by considering the dates detected in the search area if they are written in the specified format. The expected format of the date is set in the element’s properties.

A Date hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Day | The day in the detected date.
Month | The month in the detected date.
Year | The year in the detected date.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Date

listPicture Search area

listPicture Additional search constraints


Hypotheses for Object Collection elements

The program formulates Object Collection hypotheses by considering all the objects in the search area which meet the properties and search criteria specified for the element.

An Object Collection hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Object Collection

listPicture Search area

listPicture Additional search constraints


Hypotheses for Group elements

Elements may be grouped together to form Group elements. This allows the program to consider the grouped elements as one entity for which it has already formulated a single hypothesis (which actually consists of the hypotheses for each constituent element). The program examines the combinations of hypotheses for the constituent elements of the group and selects only the best (their number is set by the user). These hypotheses are then used to formulate hypotheses about subordinate elements.

note Note.The tree of elements itself may be regarded as one Group element.

A Group element allows you to create a single search constraint for all the constituent elements. The search area for a particular constituent element will be the intersection of the search area specified for the constituent element and the search area specified for the entire group.

warning Important!The intersection of the search area of a constituent element and the search area of the group may be empty. If the intersection is empty, the constituent element will not be found. Therefore, we recommend either specifying only simple relations for Group elements, e.g. "Above: PageRect.Top + PageRect.Height/2;" (= look for the element in the upper half of the image), or not specifying any relations at all, so as to avoid any contradictions between relations describing the search area of the group and relations describing the search area of a constituent element.

A Group hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Group elements

listPicture Search area

listPicture Additional search constraints


Hypotheses for Phone elements

The program formulates Phone hypotheses by considering the Phone objects detected during pre-recognition and having the format specified in the corresponding Phone element.

A Phone hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Number | The detected telephone number.
Prefix | The found phone prefix.
Prefix rect | The coordinates of the rectangle which surrounds the region of the phone prefix.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Phone

listPicture Search area

listPicture Additional search constraints


Hypotheses for Currency elements

The program formulates Currency hypotheses by considering the Currency objects detected during pre-recognition and having the format specified in the corresponding Currency element.

A Currency hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Value | The detected numerical value.
Currency name | The found currency name.
Currency name rect | The coordinates of the rectangle which encloses the region of the currency name.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Currency

listPicture Search area

listPicture Additional search constraints


Hypotheses for Table elements

The program looks for tables and divides them into columns and rows by relying on the Separators and White Gaps on the image. Additionally, table headers and footers are used to facilitate table detection. Headers and footers serve as top and bottom boundaries for table bodies, No information is extracted from them. The header contains the names of the columns which may be used to divide the table into columns. Once a table has been detected, the program formulates hypotheses for the entire table element, its columns, rows, and cells.

A Table hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Header found | Shows whether the table header has been found.
Footer found | Shows whether the table footer has been found.
Body found | Shows whether the table body has been found.
Order name | The name of the detected order of columns in the table.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

A Table header hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Column name list | Shows the found table columns.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

A Table footer hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

A Table body hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Order name | Shows the name of the found column order.
Found columns | Shows the names of the found columns.
Rows number | Shows the number of rows found in the table.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Working with tables

listPicture Search area

listPicture Additional search constraints


Hypotheses for Repeating Group elements

A Repeating Group hypothesis has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element was detected.
Surrounding rect | The coordinates of the rectangle which surrounds the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Shows whether the object described by the element has been found (true) or whether a null hypothesis has been formulated (false).
From the best path | Shows whether the found hypothesis belongs to the best path in the tree of hypotheses (true) or not (false).
Pre-search quality | How well the hypothesis matches the properties of the element specified by the settings in the Properties dialog box and by the code in the Advanced pre-search relations field.
Post-search quality | The quality of the hypothesis after the conditions in the Advanced post-search relations field have been applied.
Chain quality | The quality of the chain of hypotheses, from the first subelement of the group to the current subelement. Chain quality is calculated by multiplying the qualities of all the subelements in the chain and is used to compare rival chains of hypotheses.

More:

listPicture Repeating Group elements

listPicture Search area

listPicture Additional search constraints


How hypotheses for Labeled Field elements are generated and assessed

A Labeled Field element is a compound element with pre-defined components. Hypothesis for this element are generated and assessed in the same way as for Group element.

A hypothesis generated for a Labeled Field element has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element has been detected.
Surrounding rect | The coordinates of the surrounding rectangle that encloses the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Indicates whether the area of the element has been detected (True) or a null hypothesis has been generated (False).
From the best path | Indicates whether the hypothesis belongs to the best path in the tree of hypotheses (True) or not (False).
Pre-search quality | Indicates the quality of the hypothesis required for the hypothesis to satisfy the properties of the element, specified either directly or via Advanced pre-search relations.
Post-search quality | Indicates the quality of the hypothesis required for the hypothesis to satisfy the conditions in Advanced post-search relations.
Chain quality | Indicates the current quality of the segment of the chain of hypotheses, from the first subelement of the current group to and including the current subelement. The quality of the chain is calculated by multiplying the qualities of all the subelements in the chain.Chain quality makes it possible to compare rival chains.

The hypotheses generated for subelements have all of the above properties supplemented with the following properties.

LabeledField.Name subelement

Property | Description
Keyword | Indicates the keywords included in the hypothesis. For each keyword, the number of errors is indicated.

LabeledField.Gap subelement

Property | Description
Orientation | Indicates the orientation of the detected gap.
Histogram maximum in search area | Indicates the histogram maximum in the search area.
White Gap threshold | Indicates the calculated threshold to treat the gap as detected.
Histogram maximum within hypothesis | Indicates the histogram maximum in the region of the gap hypothesis.

LabeledField.Field subelement

A hypothesis generated for this subelement may have different properties depending on the type of field:

Field type | Property | Description
Any text | Text | The text of the hypothesis.
Fixed variants | Keyword | The keywords included in the hypothesis. For each keyword, the number of errors is indicated.
Number | Text | The text of the hypothesis.
Currency | Value | The detected numerical value.
 | Currency name | The detected name of the currency.
Date | Day | Day.
 | Month | Month.
 | Year | Year.
Phone | Number | The detected telephone number.
 | Prefix | The detected telephone prefix.
Regular expression | Text | The text of the hypothesis.

More:

listPicture Search area

listPicture Additional search constraints


Hypotheses for Region elements

When generating hypotheses for a Region element, any objects that fall within the search area are ignored.

A hypothesis generated for a Region element has the following properties:

Property | Description
Element name | The full name of the element.
Page | The number of the page on which the element has been detected.
Surrounding rect | The coordinates of the surrounding rectangle that encloses the region of the hypothesis.
Width | The width of the region of the hypothesis.
Height | The height of the region of the hypothesis.
Detected | Indicates whether the area of the element has been detected (True) or a null hypothesis has been generated (False).
From the best path | Indicates whether the hypothesis belongs to the best path in the tree of hypotheses (True) or not (False).
Pre-search quality | Indicates the quality of the hypothesis required for the hypothesis to satisfy the properties of the element, specified either directly or via Advanced pre-search relations.
Post-search quality | Indicates the quality of the hypothesis required for the hypothesis to satisfy the conditions in Advanced post-search relations.

More:

listPicture Search area

listPicture Additional search constraints


Tree of hypotheses

When matching each layout alternative with an image, the program successively generates hypotheses for each of the elements. Hypotheses for the elements are generated one by one: from the first (topmost) element in the tree to the last (bottom) element. From the generated hypotheses, a tree of hypotheses is built. If the layout alternative is successfully matched with the image the tree of hypotheses is displayed in the Hypotheses window. If more than one layout alternative match the image, the tree of hypotheses for the first alternative is displayed. If none of the alternatives can match the image, the tree of hypotheses for the first alternative is displayed.

note Note.The number of hypotheses created for an element may exceed the number set in the Number of surviving hypotheses field. In this case, only the user-defined number of the best hypotheses will make it into the tree of hypotheses.

In the tree of hypotheses, the program will then look for thebest path, i.e. the best-quality path to the hypotheses of the last element. The quality of the path is calculated by multiplying the hypotheses for the elements in this path.

The hypotheses in the best path are used to detect the blocks.

The tree of hypotheses is displayed in the Hypotheses window. To view the tree of hypotheses for a particular image:

1.Open the image.

2.Match the FlexiLayout with the image (select Match from the FlexiLayout menu or from the shortcut menu).

To view the hypotheses for elements which are part of a Group element:

1.Select the hypothesis for the Group element.

2.Press Enter or select the Show Details command from the shortcut menu.

To go one level up, press Ctrl+Enter or select the Go One Level Up command from the shortcut menu.

note Note.The tree of hypotheses built for the current image is deleted when you close that image. The best path (the chain of hypotheses that was used to build the Matched Layout) is preserved. You can view these hypotheses when you open the image again. The program does not store the entire tree of hypotheses, because it may take up too much memory.

The tree of hypotheses consists of the following parts:

The left-hand column contains the elements of the first nesting level in the order in which they go in the FlexiLayout tree.

The right-hand column contains hypotheses generated for each of the elements. Each hypotheses is marked with an icon. The hypotheses are joined by thin lines which show the order in which they were generated. The hypotheses in the best path are joined by green lines, other hypotheses are joined by gray lines.

Icon | Description
 | A hypothesis from the best path.
 | A hypothesis not from the best path.
 | A null hypothesis from the best path.
 | A null hypothesis not from the best path.
 | An incomplete chain of hypotheses for a Group element (Group, Repeating Group, Header, Footer). You can view an incomplete chain of hypotheses to locate a non-detected element.
, [image] , [image] , | The branch of the element displays the hypothesis from the best path. To view all the hypotheses, press "+" or select Expand Active in the shortcut menu.
, [image] , [image] , | Displays all the hypotheses in the branch of the element. To hide the hypotheses which are not from the best path, press "-" or select Collapse Active in the shortcut menu.
, [image] , [image] , [image] , | The sub-branch of hypotheses for the element was discontinued at this point.


Debugging the FlexiLayout

We recommend debugging your FlexiLayout as you add blocks and elements to it. To test a FlexiLayout, build it and match it with all the test images. Check that the FlexiLayout has no errors and that it enables the program to detect all of the objects and blocks.

A FlexiLayout may fail to find elements or blocks on an image because the searched object is outside the search area or does not match the parameters specified for the element. Therefore, debugging a FlexiLayout consists in finding images with errors, adjusting the description, and re-applying it to the images. A corrected FlexiLayout must be applied both to problem pages (to make sure that the error has been rectified) and to the rest of the pages (to make sure that your corrections have had no adverse effect on them).

Additionally, when you add new elements, be sure that they are matched correctly on all the pages of the test batch. This means that you will review the results of matching many times while your are creating a FlexiLayout. If there are several dozen images in the batch, this procedure may be very tiresome. To make debugging your FlexiLayout easier, you can create a so-called Reference layout, i.e. the layout you consider to be correct and which you wish to use as a benchmark. When matching your FlexiLayout with a page for which a Reference layout is available, the program will automatically detect the differences between the benchmark and the matching results (Matched layout). The difference between the Reference layout and the Matched layout is represented as a percentage ratio of the areas of the blocks of each layout. You must aim to make Matched layout as close to Reference layout as possible. A complete match of Matched layout and Reference layout corresponds to the value of 0% in the Missing Areas and Excess Areas columns in the Batch window. The higher the percentage points in these columns, the worse the match.

You can use a reference layout to debug your FlexiLayout.

You can disable an element when testing a FlexiLayout ( FlexiLayout → Elements → Disable). You can also hide an active block or element on the image (View → Images → Hide Active Blocks or Elements).

More:

listPicture Building a FlexiLayout

listPicture Matching a FlexiLayout

listPicture Reference layout

listPicture Disabling an element

listPicture Testing elements

listPicture Backing up FlexiLayouts


Building the FlexiLayout

FlexiLayout building is a process whereby ABBYY FlexiLayout Studio checks a FlexiLayout for errors, including errors in search areas, additional search criteria, the properties of the FlexiLayout blocks, and the element properties that contain the parameters of search objects.

The program will check:

1.The properties of the elements.
Any properties of an element and its search constraints may link only to elements which are located above this element in the FlexiLayout tree. If the program detects an element that does not meet this requirement, the faulty element will be highlighted.

2.The properties of the blocks.
Blocks may not refer to non-existent or disabled elements.

3.The expressions written in the FlexiLayout language (Advanced tab).

oThe code of the expressions must have no syntax errors.

oAdditional constraints set on the Advanced tab in the Advanced pre-search relations field must refer only to elements located above the given element in the FlexiLayout tree. Additional constraints set on the Advanced tab in the Advanced post-search relations field must refer only to the element itself and to elements located above the given element in the FlexiLayout tree. If the program detects an element that does not meet this requirement, the faulty element will be highlighted.

oAll the global constants used in the code must be specified.

oAll the variables used in the code must be declared and initialized.

oThe code may refer only to entities available in the corresponding sections of the code.

oThe properties of blocks may refer only to the regions of elements.

oFor an element of a particular type, you can specify only properties available for this type. For example, you cannot specify Max width for a Static Text element.

To build a FlexiLayout, click Build FlexiLayout on the shortcut menu of the FlexiLayout.

note Note.A FlexiLayout is built automatically before it is applied to an image, saved, or exported. If the program detects errors when building a FlexiLayout, the blocks and elements with errors will have icons with red Xs next to them in the FlexiLayout tree, and the Errors tab containing error information will appear in the properties dialog boxes of the elements with errors.

Notifications on the Errors tab will have red or yellow flags next to them. A red flag indicates an error, a yellow flag indicates a warning. If at least one element or block produces an error, the FlexiLayout cannot be applied to images or exported. Warnings only serve to draw the user's attention to potentially problematic type conversions and do not prevent the program from applying the FlexiLayout to images or exporting it. If some code on the Advanced tab causes the program to display a notification on the Errors tab, you can quickly jump to the operator that caused the problem by double-clicking the notification.


Matching the FlexiLayout with images

When the program matches a FlexiLayout with an image, it attempts to detect on the image the objects which correspond to the elements. It then uses the detected objects to draw blocks on the image.

The program will go down the FlexiLayout tree trying to find all the objects described by the elements and will draw blocks based on the search constraints specified in the FlexiLayout.

Example:

Suppose we have a Group element A consisting of two simple elements a and b and one Group element B (which, in turn, consists of two simple elements aa and bb). Suppose further that we also have two simple elements c and d. Elements A, c and d have the same nesting level. Now, when matching this FlexiLayout with an image, the program will look for objects corresponding to these elements in the following order: a, b, aa, bb, c, and d.

Element A

Element a

Element b

Element B

Element aa

Element bb

Element c

Element d

If the program finds all the objects corresponding to all the non-optional elements (and any objects that the program fails to find are marked as optional), the FlexiLayout will be matched successfully. If the program fails to find at least one object corresponding to a non-optional element, the matching process will be stopped and you will need to adjust the FlexiLayout.

To match the FlexiLayout with an image:

1.Select one or several images in the batch.

2.Select the Match command from the Batch menu or from the shortcut menu.

To match the FlexiLayout with an image and view the tree of hypotheses:

1.Open an image.

2.Select the Match command from the Image menu or from the shortcut menu.


Reference layout

Show/Hide Hidden Text

You can create a reference layout for each image in the batch. The reference layout shows the desired location of blocks on the image. You can create a reference layout manually or by using the results of matching the FlexiLayout. You can edit a reference layout by adding or removing blocks, changing their sizes and locations, etc.

Reference layouts are used when debugging FlexiLayouts, as it allows you to compare the results of matching your FlexiLayout with the desired block locations on each of the images.

Reference layouts are created in Reference layout mode. Click [image] on the toolbar to switch to the Reference Layout mode.

The Difference layout mode ( [image] button on the toolbar) displays the difference between the reference layout and the results of matching the FlexiLayout. Areas which are present in the blocks of the reference layout but are absent in the blocks detected by matching the FlexiLayout (Missing Areas) are highlighted in red. The areas which are absent in the blocks of the reference layout but present in the blocks detected by matching the FlexiLayout (Excess Areas) are highlighted in green. The Batch window displays the percentages of Missing Areas and Excess Areas.

To create a reference layout manually:

1.Open the image for which you wish to create a reference layout.

2.Match the FlexiLayout with the image.

3.Switch to Reference layout mode.

4.Draw the required blocks on the image. (Use the Block-Drawing Tools.)

5.Click [image] on the toolbar to save the reference layout.

To create a reference layout on the basis of a matched FlexiLayout::

1.Open the image for which you wish to create a reference layout.

2.Match the FlexiLayout with the image.

3.Select Copy Matched Layout to Reference from the Batch menu or from the shortcut menu.

4.Adjust the locations of the blocks if required.

5.Click [image] on the toolbar to save the reference layout.

You can also use the Copy Matched Layout to Reference command from the shortcut menu of the batch to save as a reference layout the results of matching the FlexiLayout with selected batch pages.

Reference layout tools

The commands for creating and editing blocks can be found in View → Images → Tool → Select. The buttons corresponding to these commands can be found on the toolbar.

Button Select ( [image] button on the toolbar) selects an existing block on the image and moves its borders.

To move a block border:

1.Click the Select tool on the toolbar or select it in View → Images → Tool.

2.Place the mouse pointer on the block border you wish to move.

3.Hold down the left mouse button and drag the border in the required direction.

4.Release the mouse button.

note Note.If you place the mouse pointer in the corner of the block, dragging the mouse will move both the vertical and horizontal block borders.

To move a selected block:

1.Click the Select tool on the toolbar or select it in View → Images → Tool.

2.Place the mouse pointer on the desired block. The mouse pointer will change its shape, indicating that you can move the block.

3.Hold down the left mouse button and drag the border in the required direction.

4.Release the mouse button.

Sometimes a block may be too small to be moved, as its borders are very close to one another and pointing the mouse on any of them will activate the "change size" mode. Hold down the Ctrl key to move such blocks.
Button Create Block ( [image] button on the toolbar) creates a new block on the image.

To create a new block:

1.Click the Create Block tool on the toolbar or select it in View → Images → Tool.

2.Place the mouse pointer in the corner of the future block. Hold down the left mouse button and drag the corner diagonally in the required direction.

3.Release the mouse button.

4.In the Create Block dialog box, enter a name for the new block.
Button Draw Location ( [image] button on the toolbar) draws the location of a selected block or element.

To draw a block or an element:

1.Select Training Mode from the Training menu to switch to the training mode.

2.In the FlexiLayout window, select a block or a static element.

3.Click the Draw Location tool on the toolbar or select it in View → Images → Tool.

4.Place the mouse pointer in the corner of the future block. Hold down the left mouse button and drag the corner diagonally in the required direction.

5.Release the mouse button.
Button Delete Region ( [image] button on the toolbar) deletes a block from the image.

To delete a block:

1.Click the Delete Region tool on the toolbar or select it in View → Images → Tool.

2.Click the block you wish to delete.
Button Add Region Part ( [image] button on the toolbar) adds a rectangular area to the selected block.

To add a rectangular area to a block:

1.Click the Add Region Part tool on the toolbar or select it in View → Images → Tool.

2.Place the mouse pointer inside the block to which you wish to add a rectangular area.

3.Hold down the mouse button and drag the pointer diagonally in the required direction.

4.Release the mouse button.

The rectangle will be added to the block.
Button Cut Region Part ( [image] button on the toolbar) cuts out a rectangular area from the selected block.

To cut out a rectangular area from a block:

1.Click the Cut Region Part tool on the toolbar or select it in View → Images → Tool.

2.Place the mouse pointer inside the block from which you wish to cut a rectangular area.

3.Hold down the left mouse button and drag the pointer diagonally in the required direction.

4.Release the mouse button.

The rectangle will be cut from the block.

note Note.When you cut out top or bottom block areas, the program will also cut out the adjoining right-hand up to the border of the block. This is done because only continuous text blocks may be recognized by the OCR engine. This constraint does not apply to left- and right-hand areas.

Button Add Vertical Separator ( [image] button on the toolbar) adds a vertical separator to the selected table block.

To add a vertical separator:

1.Click the Add Vertical Separator tool on the toolbar or select it in View → Images → Tool.

2.Rest the mouse pointer over the desired location in the Table block. The mouse pointer will change its appearance.

3.Click the block.
Button Add Horizontal Separator ( [image] button on the toolbar) adds a horizontal separator to the selected table block.

To add a horizontal separator:

1.Click the Add Horizontal Separator tool on the toolbar or select it in View → Images → Tool.

2.Rest the mouse pointer over the desired location in the Table block. The mouse pointer will change its appearance.

3.Click the block.
Button Delete Separator ( [image] button on the toolbar) deletes a separator from the selected block.

To delete a separator:

1.Click the Delete Separator tool on the toolbar or select it in View → Images → Tool.

2.Rest the mouse pointer over the desired location in the Table block. The mouse pointer will change its appearance.

3.Click the block.
Block columns shortcut menu

To create a reference layout fro columns of a Table block:

1.Select the Table block on the image.

2.Use the [image], [image], [image] tools to divide the block into cells.

3.Right-click the column and select the name of the column from the shortcut menu.

To delete a column from a Table block, right-click the column and select Delete Column from the shortcut menu.


Reference document assembly

You can create a reference assembly which tells the program how exactly the pages should be assembled into documents.

A reference assembly, like a reference layout, is used to debug a FlexiLayout. It allows you to compare how pages are assembled into documents based on your FlexiLayout with a reference assembly which is known to be correct.

You can view the reference assembly in Reference layout viewing mode. Click the [image] button on the toolbar to activate the mode.

Activate the Difference layout viewing mode ( [image] button on the toolbar) to review the differences between the reference document assembly and the assembly obtained by means of your FlexiLayout. The beginning and the end of the document specified in the reference assembly but not detected by the current FlexiLayout will be indicated by red markers in the corners. The beginning and end of the document detected by the FlexiLayout but not specified in the reference assembly will be indicated by green markers in the corners.

To create a reference document assembly:

1.In the Batch window, select the desired pages.

2.Right-click the selection and select Assemble to Reference Documents... on the shortcut menu.

3.In the Assemble to Reference Document dialog box, select how the pages must be grouped into documents: you can either assemble all the selected pages into one document (select One document) or specify the number of pages in a document (select Group by page count and type in the number of pages in a document).

4.Select First page of document matches Header if the Header element must be matched with the first page of a document. Do not select this option if no Header element is used to assemble documents (i.e. a set number of pages is used instead) or if there is no Header element on the selected pages or it cannot be reliably matched.

5.Select Last page of document matches Footer, if the Footer element must be matched with the last page of a document. Do not select this option if no Footer element is used to assemble documents (i.e. a set number of pages is used instead) or if there is no Footer element on the selected pages or it cannot be reliably matched.

6.Click OK. The reference assembly will be displayed in Reference layout viewing mode: the beginning and end of the document will be indicated by blue markers in the corners.

You can clear the First page of document matches Header and Last page of document matches Footer options for individual pages (e.g. if there is no footer in a document) - the pages will still be assembled (the program will detect the end of the document based on the Header element detected on the first page of the next document).

To select/clear the First page of document matches Header and Last page of document matches Footer options:

1.Select the desired page(s).

2.right-click the selection and select Change Reference Header/Footer... on the shortcut menu.

3.Select or clear the First page of document matches Header and Last page of document matches Footer options.

Information about the reference assembly is also displayed in the Reference Document Number and Reference Sequence Number columns in the Batch window. The Reference Document Number column displays the number of the document to which the page belongs and the Reference Sequence Number columns displays the number of the page in the document. The letters H or F in brackets show whether the Header or Footer element must be matched with the page.

The Matched Document Number and Matched Sequence Number columns display similar information for a matched FlexiLayout. You must aim to create a FlexiLayout whose Matched Document Number and Matched Sequence Number columns coincide with the Reference Document Number and Reference Sequence Number columns of the reference assembly.


Named parameters

Show/Hide Hidden Text

Named parameters are used for debugging FlexiLayouts. Named parameters of the FlexiLayout are inherited by batches, and named parameters of batches are inherited by pages. Values of named parameters are checked when the FlexiLayout is applied.

Creating and editing named parameters

To create a new named parameter, open the properties dialog box of a FlexiLayout, select the Named parameters tab and click the Add new... button.

See FlexiLayout properties dialog box

Each named parameter has the following properties:

·Name
This property cannot be changed after it is specified.

·Type
Named parameters can be one of three types: String, StringArray or Int. This property cannot be changed after is specified.

·Value
This property can be changed for individual batches and pages. If the value of a named parameter is not specified in the FlexiLayout, its value in the Value column will be displayed as <Undefined>.

Batches inherit named parameters from the FlexiLayout, and pages inherit named parameters from batches. The Inherited from column on the Named parameters tab of the properties dialog of a batch or page will indicate where each named parameter was inherited from.

See batch properties dialog box

You can copy named parameters with definite values. If the destination to which you are copying the named parameter already contains a named parameter with the same name and type, the value of the copied parameter will be assigned to the destination parameter.

The following command are available on the Named Parameters tab of the properties dialog box of a FlexiLayout:

Option | Description
Add new... | Creates a new named parameter. note Note.Only available for FlexiLayouts.
Edit... | Edits a named parameter.
Reset | Resets the value of a named parameter.
Delete | Deletes a named parameter. note Note.Only available for FlexiLayouts
Copy | Copies a named parameter. note Note.Only available on the shortcut menu of a named parameter.
Paste | Pastes the copied named parameter. note Note.Only available on the shortcut menu of a named parameter.

note Note.The following methods can be used to call a named parameter from a script:

·GetNamedParameterString for named parameters of the String type;

·GetNamedParameterStringArray for named parameters of the StringArray type;

·GetNamedParameterInt for named parameters of the Int type.

Adding named parameters to elements

You can create named parameters with regions to elements using the reference layout.

Select one or more pages, right-click them and click Properties... to open their properties dialog box. The Named parameters tab contains a list of available named parameters. You can edit them by clicking the Edit... button or reset their value to that of the closest parent from which they can be inherited.

You can use the Prefix to discard box to specify a prefix which you want to delete from the name of the named parameter. For example, you can use this box to delete names of layout alternatives in names of named parameters.


Disabling an element

Sometimes, when debugging a FlexiLayout, you may need to disable an element without removing it from the FlexiLayout tree. In this case you maydisablesuch element. All the information about the element will be stored in the FlexiLayout, but it will be ignored during the matching process.

note Note.If the disabled element is referred to by other elements, these elements will be marked with an error icon. In this case, you can either disable the dependent elements, or delete the references to the disabled elements in their properties.

To disable an element:

1.Select the element in the FlexiLayout tree.

2.Select the Disable command from the FlexiLayout menu.

To enable an element:

1.Select the element in the FlexiLayout tree.

2.Select the Enable command from the FlexiLayout menu.


Testing elements

During the FlexiLayout matching the program analyzes only those hypotheses for each of the elements whose quality meets the specified parameters.

Testing allows you to view all the hypotheses generated for the selected element on the current test image. You can test any element, including Group elements. The search area of the tested element is the entire page unless you have specified additional search constraints in the Absolute search area constraints or Advanced pre-search relations. Advanced pre-search relations are also taken into consideration when testing the element. As a result, the Hypotheses window displays all generated hypotheses rated by their quality (from best to worst), and in the Image window the areas of all detected hypotheses are highlighted.

note Note.The FlexiLayout to be tested must not contain errors, and the image must be opened in the Image window.

To test an element:

1.Select the desired element in the FlexiLayout tree.

2.In the shortcut menu of the desired element, select the Test Element command or select the Test Element command in the FlexiLayout menu.

To switch from one hypothesis to another in the Hypotheses window, you may use the → and ← keys on your keyboard.

To quit test mode and switch to any other mode (Matched layout, Reference layout, Difference layout), click a corresponding button on the toolbar.


Backing up FlexiLayouts

FlexiLayout Studio lets you create backup copies of FlexiLayouts and view differences between different versions of a FlexiLayout. These backup copies are stored in projects, which can contain an unlimited amount of backup copies. However, projects can only contain one current version that can be used by users.

Backup FlexiLayout copies include elements, blocks, pre-recognition parameters, named parameters, global constants and multi-page parameters. Backup copies have the following properties:

·A version number that serves as the copy's identifier. This number is generated automatically and cannot be edited.

·The date and time when the backup copy was created.

·The date and time when the last changes were made to the copy.

·A comment (the Comment property of the FlexiLayout, click FlexiLayout → Properties... and select the General tab to view or edit).

Backup copies can not be edited. You can replace the current version with a backup copy using the Restore command (see the Backup Versions dialog box section of this article for details).

Creating backup copies of FlexiLayouts

Backup copies can be created manually or automatically.

1. Creating backup copies manually

Complete the following steps to create a backup copy of a FlexiLayout:

1.Click Create backup... on the Project menu.

2.In the dialog box that opens, you can specify a comment to the backup copy. This comment will replace the Comment parameter of the original FlexiLayout.

3.Click the Create button to create the backup copy.

After the backup copy has been created, you can continue working on the current version of the FlexiLayout.

2. Creating backup copies automatically

Backup copies of FlexiLayouts can be created automatically when FlexiLayouts are exported. To set up automatic backups, follow the instructions below:

1.Click Tools → Options to open the Options dialog box and select the Other tab.

2.Select one of the following options from the Create backup version on export drop-down list:

oAlways ask (default)
If this option is enabled, a dialog box asking whether you would like to create a backup copy will open every time you use the Export... command to export a FlexiLayout. If you enable the Always do the selected action on Export option in this dialog box, the program will remember your choice (replacing the Always ask setting with Always create or Never create, depending on the option you select). Click the Create button to open the backup dialog box.

oAlways create
The backup dialog box will open every time you use the Export... command to export a FlexiLayout.

oNever create
Backup copies of FlexiLayouts will not be created automatically.

3.When creating a backup copy, you can specify a comment to the backup copy. This comment will replace the Comment parameter of the original FlexiLayout.

You can use the Backup Versions dialog box (Project ► Backup Manager...) to manage your backup copies of FlexiLayouts.

Backup Versions dialog box

The Backup Versions dialog box contains a list of backup copies of the current FlexiLayout and lets you delete copies or roll back the current version to one of the copies. You can also view differences between the current version of the FlexiLayout and one of the backup copies.

To roll back the current version to one of the backup copies, click the Restore button.

warning Important!The rollback operation replaces the current version with the selected backup copy. Any changes to the current version will be lost, and this operation cannot be undone.

To delete a backup copy, click the Delete button.

To view the differences between the current version of a FlexiLayout and a backup copy, click Show changes (see the Viewing changes to the FlexiLayout tree section of this article).

Backup copies listed in the Backup Versions dialog box can be sorted by the values of the list's columns.

Viewing changes to the FlexiLayout tree

You can view differences between the current version of the FlexiLayout and the backup copy as a list of elements and blocks that have one of the following statuses:

·Deleted elements and blocks are present in the backup copy but are absent from the current version.

·Added elements and blocks are present in the current version but are absent from the backup copy.

·Modified elements and blocks are present in both the backup copy and the current version, but some of their properties have been changed (click [image] to view the changes).

If changes were made to a group of elements, the entire group (including child elements) will be displayed in the list. Elements and blocks that did not change will not be included in the list. To sort items by name or the type of changes made, click the title of the corresponding column.

To open an element or block in the FlexiLayout tree, double-click it in the list. To open the properties dialog box of an element or a field on the tab that contains the modified property, double-click the property in the detailed list of changes.


Classification

ABBYY FlexiCapture 12 features technologies that let you classify documents and detect their types and variants without creating FlexiLayouts in FlexiLayout Studio. Classification can be used to sort documents, detect specific documents among all input documents, and assemble pages into documents.

Classification scenarios

ABBYY FlexiLayout Studio, which can handle thousands of images and offers tools for thorough analysis of classification results and fine-tuning classifiers, including rules for handling text and visual objects on pages.

Developing classifiers in FlexiLayout Studio

ABBYY FlexiCapture 12 includes trainable technologies for classifying documents based on their images (for documents that can be differentiated visually) and on their text. These technologies can be automatically combined, in which case the program will choose the most suitable technology based on the nature of the analyzed document.

Classification profiles

Some classification scenarios may favor precision over recall, while in others recall may be more important. The program allows you to prioritize precision over recall, recall over precision, or strike a balance between the two.

Trade-off between precision and recall


About document classification

Classification is the process of putting document images or text documents into certain predefined document classes.

Documents can be classified manually or automatically.

Manual classification of large amounts of documents is

·labor-intensive

·costly

·slow

·error-prone when working against tight deadlines

ABBYY FlexiCapture 12 includes classification technologies that can be easily trained to classify documents by type and variant without creating FlexiLayouts in FlexiLayout Studio.


Classification scenarios

The ABBYY FlexiCapture classification feature can be used to determine:

·Document types (e.g. you can set up the program to sort incoming documents into invoices and passports)

·Document variants (e.g. you can set up the program to distinguish invoices from different vendors or driver's licenses issued in different states)

·Where one document ends and another document begins (e.g. you can set up the program to divide the pages of documents of each type into the "first page" and "all other pages")

The ABBYY FlexiCapture classification feature can be used to implement the following scenarios:

·Automatic sorting of incoming documents

Example: A company receives the following two types of documents — invoices and contracts. The job of ABBYY FlexiCapture is to automatically separate documents of one type from the other. The sorted documents are then forwarded to the appropriate departments responsible for their processing. Invoices should not be forwarded to the legal department, as this will distract the lawyers from contracts and delay the processing of the misplaced invoices by the accounting department.

·Assembly of page images into documents followed by automatic sorting

Example: A company scans pages but they are not assembled into documents during scanning. Instead, the classification feature is used to classify the pages. Then ABBYY FlexiCapture assembles the classified pages into documents and determines the type of each document.

·Detection of documents that need to be processed

Example: A company receives a PDF file which contains various documents related to a particular case, such as a mortgage application. The job of ABBYY FlexiCapture is to detect documents of certain types (e.g. passports) and to extract fields only from that type of document, saving the remaining pages a searchable PDF file.

·Processing support requests

Example: A bank receives various types of support requests from its customers. Support requests are automatically classified based on the their content (e.g. new payment details, bounced payment, loss of a credit card, etc.). Urgent requests are separated from non-urgent ones and forwarded to the respective support specialist.


Classification profiles

ABBYY FlexiCapture supports the following classification profiles:

·Image

This profile is suitable for documents that have apparent visual differences. You can use this profile for documents that a human can identify just by looking at them, without reading their text, such as passports and driver's licenses.

·Text

This profile is suitable for documents that are not visually distinct and need to be read in order to be identified. This profile uses OCR and statistical and semantic analysis to classify documents with different text content, such as various types of contracts.

·Combined

This profile is a combination of the Text and Image profiles. It can operate in one of two modes, fast or thorough.

oIn fast mode, ABBYY FlexiCapture first applies the Image profile and then uses the Text profile for documents that have been classified with low confidence.

oIn thorough mode, ABBYY FlexiCapture applies both the Image and Text profiles simultaneously.


Trade-off between precision and recall

Cases where a classifier fails to classify a document correctly fall into two categories:

I.The classifier assigns the wrong class to a document, e.g. a class A page is classified as class B.

II.The classifier fails to assign any class to a document.

These two categories of error characterize the quality of document classification and are usually measured as precision and recall.

·Precision is calculated by dividing the number of documents that were correctly assigned a particular class by the total number documents that were assigned that class.
precision

·Recall is calculated by dividing the number of documents that were correctly assigned a particular class by the total number of documents of that class.
recall

You can adjust classification settings to prioritize recall or precision.

Prioritizing precision

Use the High precision setting if the number of documents assigned to the wrong class must be as low as possible (and if it is acceptable to have some of the documents to remain unclassified).

Example

A company needs to classify invoices and contracts so that they can be sent to departments responsible for handling each class of document.

If ABBYY FlexiCapture classifies an invoice incorrectly, that invoice will not make it to the right department and will not be paid. If ABBYY FlexiCapture does not classify the invoice at all, the invoice can be classified manually and sent to the right department.

In this example, it is important to detect the class of a document as precisely as possible.

Prioritizing recall

Use the High recall setting if the number of documents that are not assigned to any class must be as low as possible (and if it is acceptable to have some of the documents assigned to the wrong class).

Example

A company needs to identify and process a certain class of loan documents in a pile of various other loan documents.

If ABBYY FlexiCapture fails to assign a class to a relevant document, that document will not be processed.

The company can prevent the processing of documents that were assigned the wrong class by applying a FlexiLayout, by using validation rules, or by correcting the error manually.

In this example, it is important to recall as many relevant documents as possible.

By default, the Recall and precision balance is set to balanced.


Classification quality metrics

The following metrics can be used to assess the quality of classification:

·Precision – This metric is an assessment of the classifier's ability to assign classes precisely to those documents that actually belong to those classes. However, this metric does not account for overlooked documents.

·Recall – This metric is an assessment of the classifier's ability to assign classes to documents without overlooking relevant documents. However, this metric does not account for misclassified documents.

·F-measure – This metric is a combination of precision and recall.

·Confidence score – This metric is an assessment of the probability that a document belongs to a particular class.


Developing classifiers in FlexiLayout Studio

Choosing the correct tool for classifier creation

Users can create and train a classifier in ABBYY FlexiCapture or use a classifier created in ABBYY FlexiLayout Studio.

Creating a classifier in ABBYY FlexiLayout Studio has the following advantages:

·the option to classify large amounts of documents — up to 10,000 per class;

·detailed statistics;

·the option to use rules for a more precise classification;

·the option to anonymize a training batch for further use in other projects.


Creating classifier projects

To create a classifier in ABBYY FlexiLayout Studio, do the following:

1.Create a new ABBYY Classifier Project Files (*fcp.) type project.

2.In the General tab of the Properties window, choose the language of the documents that need to be classified.

3.In the Classification tab of the Properties window, choose the classification type that will be used:

·Auto-classification,

·Rule-based classification. This type is recommended for when you need to apply additional rules to more precisely distinguish between different classes.


Uploading training documents

Load several documents into a batch. Include the maximum number of document types that could be encountered in the document input that will be processed by the classifier. The larger the amount of documents and the greater their variety, the more documents of the same class will be recognized by the classifier.

Also, the following recommendations should be taken into account when creating a batch:

·Between 100 and 1,000 pages per class, cannot be less than 3 pages

·The average batch size should be between 1,000 and 10,000 pages per batch, cannot be more than 50,000 pages

·Between 2 and 1,000 classes

note Note. When classifying using an Image or Combined profile, images with the same color scheme should be used for training. For example, black and white images.


Assigning reference classes

Assign a reference class to each page (using the Set Reference class command in the shortcut menu), or assign the classes automatically using the source folder. We recommend adding the Unknown Documents class for documents that can not be classified.

A reference class is a class assigned to a document as a result of manual classification. Both a section of a document and a document variant can be a reference class.

Assigning reference classes based on source folders

If source files were sorted into different folders in the file system prior to being loaded into FlexiLayout Studio, you can create and assign reference classes that correspond to the appropriate folders in the storage system. To do this:

·Use the Add Images from Folder command;

·After loading the files, assign classes to them using the Set Reference Class by Source Folder command.

Assigning reference classes based on a part of the images

To process a large batch of unsorted images, assign reference classes to some of the images and use them to classify the rest:

1.Assign reference classes to some of the images (the Set Reference Class command in the shortcut menu).

2.Train the classifier using the manually assigned images with recall priority (for more information, see Trade-off between precision and recall)

3.Classify the rest of the batch and sort the results according to class (the Classification Results column).

4.Check the classification results. Use the Set Classification Result Class as Reference command for documents that have had their class identified correctly. Manually assign reference classes to the rest.


Training your classifier

To begin training your classifier using the document batch to which a layout has been applied, select Train in the Classifier menu. Then, in the Train Auto Classification Model window, set a classification profile and adjust the precision-recall slider if needed. Click Train.

The classifier training is carried out using reference classes set up during the application of the layout. Classes that are assigned automatically are displayed in the Classification Result column. Icons to the left of the page mean the following:

- the assigned class corresponds to the reference class;

- the assigned class differs from the reference class;

- the page was not classified.


Classifier statistics

After the training has been carried out, the classification results are used to form a statistics report.

·If the class assigned to a page corresponds to a reference class, this is classified as a True Positive (TP) trigger;

·If no class was assigned to a page with no reference class, this is classified as a True Negative (TN) trigger;

·If the class assigned to a page does not correspond to a reference class, this is classified as a False Positive (FP) trigger;

·If no class was assigned to a page that has a reference class, this is classified as a False Negative (FN) trigger.

As such, a tally is formed for each class, documenting the number of times it was:

·correctly assigned (TP);

·correctly not assigned (TN);

·incorrectly assigned (FP);

·incorrectly not assigned (FN).

To view the statistics, select Classifier > Show statistics.

The higher the precision, recall, and the F-measure, the better the classification results are. (For more details about how the F-measure is calculated, see Glossary). The F-measure is a balanced measurement of both precision and recall and allows for a cumulative evaluation of the classification quality using these parameters. For more information about increasing the F-measure, see the Tips for improving classification quality section.

For quality evaluation purposes, further statistics are also available in the following tabs:

·Confusion Matrix. The confusion matrix is a visual representation of which documents are most often confused by a classifier. The cells in the diagonal of the matrix show how many of the documents were classified correctly. The right column and the last row contain information about documents that were not assigned any class. The rest of the cells show the documents that were incorrectly classified;

·Confusing Classes. This tab contains a list of classes that were mixed up by the classifier. This statistic can help you figure out which classes are most often confused for each other;

·Statistics by Class. This shows a detailed statistic for each class and lets you identify the classes that cause the classifier to make the most mistakes.


Testing your classifier

A classifier's quality depends on the size of the training batch. For classifier training, it is recommended to use all available images in a batch.

However, this makes it impossible to evaluate the quality of a classifier outside of its training documents. The Benchmark tool was created for classifier testing. It lets you split up the documents into training and test documents using a percentage ratio.

This tool is used only for unbiased evaluations of the classifier quality. To create the classifier itself, all available images should be used during training.

To split the batch into test and training documents, go to the Batch menu and open the Split Batch window. Select the appropriate ratio for splitting the source batch (60%-40% by default). Specify the minimum number of documents of each class in the resulting new batches. By default, each batch should have at least 1 document of each class. Specify names for the batches and click Split.

To use batches created with Split for training and testing, select the Batches window in the Batch menu. Select Benchmark. In the drop-down list, specify the batch that will be used for training. Use check marks to specify the batches that will be used for testing a trained classifier.

Clicking Run will launch the training, after which the classification will then immediately start.

Click Statistics in the Batches window for an analysis of the test batch classification results.


Tips for improving classification quality

If for some reason a classifier produces unsatisfactory results for a batch of documents, try the following:

·Check that you have correctly adjusted the precision-recall slider;

·Increase the amount of documents. The bigger your selection of documents, the more different documents of the same class will be recognized by the classifier;

·Create additional rules for better differentiation between classes.

To improve the classification quality, do the following:

·Check that you have correctly set the desired precision and recall values;

·Add more relevant documents to the training set. This will allow for more precise class attributes and for an optimization of the classification algorithm, and as a result, an improvement in the quality of the trained classifier;

·Review the incorrectly classified documents in the yellow cells of the table in the Confusion matrix tab (right-click to view them).
If the meaning of the text and the selected attributes make it obvious that the reference class was assigned incorrectly, assign the correct one instead. If it is not possible to precisely determine the document's reference class, remove it from the training batch;

·It is possible that the training batch contains thematically similar classes, differentiating between which might be challenging even for human experts. Combine similar classes into one;

·Create additional rules to make differentiating between classes easier.


Application of rules

Rules are a tool for automatically checking the results of document processing. Rules can be used separately or together with auto-classification.

Rule use is specified during the classification setup. To do so, select Classifier > Properties and enable the Use rules check box in the Classification tab.

To create a rule, do the following:

1.Select Classifier > Add Rule and set a name for the rules in the window that will open.

2.Select the appropriate uniqueness option:

·Uniquely in project – this option prevents other rules from being applied if one has already been applied;

·Uniquely on its tree level - this option applies all rules within a particular tree;

·Non-uniquely - this option does not limit the number of rules that can be applied.

3.Choose the Corresponding class from the drop-down list. That class will be returned when the particular rule is applied.

For every class, parameters that will cause a rule to be applied can be set. To do this, select Properties in the class shortcut menu in the Classifier window:

·if the class can be confused with others during classification, mark the Add classes to this classification result check box, then click Edit and specify the particular classes that can be confused;

·if you are planning to use rules to improve the quality of auto-classification, mark the Improve auto-classification result using rule tree check box. Next, specify which rules are going to be used if this particular class is assigned as a result of auto-classification:

oUse rules for corresponding classes only - with this option, only the rules specified for the "confusing" classes in the list will be applied;

oUse all rules - all existing rules will be used until one is successfully applied. If none of the rules are successfully applied, the auto-classification result will not change.

To classify documents using rules, select Classifier > Classify > Classify by Rules.


Exporting your classifier

If the quality of a trained classifier is satisfactory, you will need to export it for further use in ABBYY FlexiCapture. To do this, select Classifier> Export classifier. In the window that will open, do the following:

1.Click the Save button without selecting additional options if you want to export only the trained classifier file to FlexiCapture;

2.Mark the Export images from current batch for further training check box if you want to use the training images for further training;

3.Mark the Redact image data check box if you want to anonymize the image data for use in further classifier training.

note Note. When creating a classifier backup copy, only the rules created in it will be saved. Images and classes are not included in a classifier.

A classifier saved in FlexiLayout Studio can be exported to a FlexiCapture project on project level or on batch type level.


Export

Exporting FlexiLayouts

Exporting Classifiers

Identifying and processing FlexiLayouts in ABBYY FlexiCapture


Exporting FlexiLayouts

FlexiLayouts can be exported into data capture applications as *.afl files. Exported FlexiLayouts are securely encrypted to prevent unauthorized use.

To export a FlexiLayout:

1.Select the Export... command from the File menu.

2.In the Export FlexiLayout dialog box, enter a name for the file and select the folder where it should be saved.

The resulting file can be added to an ABBYY FlexiCapture Document Definition or used in other data capture applications.


Exporting Classifiers

Classifiers can be exported into data capture applications as *.cfl files. Exported Classifiers are securely encrypted to prevent unauthorized use.

To export a Classifier:

1.Select the Export... command from the File menu.

2.In the Export Classifier dialog box, enter a name for the file and select the folder where it should be saved.

The resulting file can be added to an ABBYY FlexiCapture batch type.


Saving classification statistics

Classification statistics can be saved to a TXT or CSV file.

To save classification statistics:

1.Right-click the classifier and select Show Statistics... on the shortcut menu.

2.In the Classifier Results dialog box, click Export....

3.In the Export Classification Statistics dialog box, specify a name for the statistics file, select a format, and specify a destination folder.

4.Click Save.

The saved file will contain a list of classes and statistics for each class.

note Note.You can export classification statistics both for trained and for untrained classifiers.


Identifying and processing FlexiLayouts in ABBYY FlexiCapture

You can process an unlimited number of 'fixed' and 'flexible' Document Definitions in one FlexiCapture batch (a 'flexible' Document Definition is created from a FlexiLayout). If a batch contains several flexible Document Definitions, it is desirable to have the same pre-recognition parameters (i.e. language, text type, mode) in all the FlexiLayouts which are used to create the flexible Document Definitions. In this case, pre-recognition will be run only once and the pre-recognition results will be used for other Document Definitions. This will reduce the processing time, as pre-recognition usually takes up to 90% of the time required to match the Document Definition.

FlexiCapture runs pre-recognition on a page for each set of pre-recognition parameters specified in all of the flexible Document Definitions in the batch. If all the Document Definitions have the same pre-recognition language, pre-recognition is run only once, the detected objects are saved and used for the other Document Definitions in the batch. If one of the Document Definitions has a different pre-recognition language (or text type, or mode), FlexiCapture will need to pre-recognize the page twice, which will double the time required for Document Definition matching. For this reason, we recommend keeping the sets of pre-recognition parameters to a minimum.

In some cases, you can speed up FlexiLayout matching by skipping pre-recognition. This is possible if the FlexiLayout elements include only Separator, Barcode, White Gap, Region and Object Collection elements and all the White Gap and Object Collection elements meet one of the following requirements:

·no text is specified in the element's search constraints

·the UseRawText property of the element is true.

When fixed and semi-structured documents are processed within one batch, the program will attempt to match the fixed Document Definitions first. If the fixed Document Definitions are successfully matched with their documents, no FlexiLayouts are applied. If there are no matching fixed Document Definitions, the program will find suitable matches among the FlexiLayouts.

Classifiers

Classifiers are used to automate the selection of a FlexiLayout or a layout alternative. Classifier is a special project created in FlexiLayout Studio and imported to FlexiCapture. The project describes the tree-like structure of the classes to which a document may belong. Each class contains a set of elements that identifies a certain type of document. Upon classification, the names of the FlexiLayouts (or layout alternatives) to be used are saved in the properties of each classified page. For more information about classification projects, refer to Classifier project.

Selecting a FlexiLayout without the use of a classifier

If no classifiers are used, identifier elements are created in the FlexiLayout to make the selection of the appropriate FlexiLayout by FlexiCapture more reliable and to speed up the process itself. Practically any type of element can be used as an identifier. The only requirement is that it should be reliably detected on all of the documents of the given type. In practice, the most commonly used identifiers are Static Text, Barcode, and Character String elements. Sometimes more than one element are used to identify a document type.

The higher the identifier element in the FlexiLayout tree, the faster the Document Definition selection.

One way to create an identifier element is to clear the Optional element property - the object corresponding to the element must be present on all of the images. If the object described by the element is not detected, the Document Definition will not be matched with the image.

Additionally, you can identify a document by using the DontFind() function in the Advanced pre-search relations field. This will tell the program not to look for an optional element.

Another method of identifying a flexible Document Definition is to use the Quality property of the element hypothesis. Setting the Quality of any element to 0 in the Advanced post-search relations field (the corresponding code is Quality: 0;) will result in failure to match the Document Definition. Before setting the quality of an element to 0, you need to analyze the properties of the elements located above the current element in the FlexiLayout tree.


FlexiLayout language

The Advanced tab in the Properties dialog box has two fields where you can enter code written in a special FlexiLayout language. This language allows you to specify element properties, relations between elements, and set additional constraints for formulated hypotheses.


Basic concepts

Lexical conventions

Reserved keywords

Function-call operators

Statements

Name scope

User defined properties

Variables

Coordinates and units of measurement


Lexical conventions

Identifiers

An identifier is a sequence of characters used to denote one of the following:

·Block name

·Element name

·Constant name

·Variable name

·Keyword

Identifiers are case-insensitive.

Identifier Syntax

identifier:

nondigit

identifier nondigit

identifier digit

nondigit : one of

_ a b c d e f g h i j k l m n o p q r s t u v w x y z

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

digit : one of

0 1 2 3 4 5 6 7 8 9

Punctuation characters

The following punctuation characters can be used:

. , ( ) * / + - = < > { } : ; ! & |

The punctuation characters ( ) and { } must appear in pairs.

Operator precedence and associativity

The highest precedence level is at the top of the table.

Operator | Meaning | Associativity
( ) | Function call |
: | Function call |
. | Member selection | Left to right
+ – | Unary positive Unary negative |
* / | Multiplication Division | Left to right
+ – | Addition Subtraction | Left to right
NOT | Logical NOT (unary) |
Comparison operations (have equal priority)
< | Less than | Left to right
> | Greater than | Left to right
<= | Less than or equal to | Left to right
>= | Greater than or equal to | Left to right
== | Equality | Left to right
!= | Inequality | Left to right
AND | Logical AND | Left to right
OR | Logical OR | Left to right

Assignment operator

The "=" operator assigns a value to a variable.

For example:

Distance a;
a = Page( 1 ).RectGlobal.Width;

The data type of the expression must be compatible with the data type of the variable.

Constants

The FlexiLayout language uses only global constants. Global constants are set in the FlexiLayout Properties dialog box (see Global Constants) and can be accessed from any section of any block or element description.

Comments

You can add comments to the code. The comments have the same format as in the C language and can be written in one of the following ways:

·The /* (slash, asterisk) characters, followed by any sequence of characters (including new lines), followed by the */ characters.

·The // (two slashes) characters, followed by any sequence of characters. A new line not immediately preceded by a backslash terminates this form of comment.


Reserved keywords

The following table lists reserved keywords which cannot be used to name blocks, elements, constants, or variables.

AllInstances

and

AndElement

array

AttributeDefinitions

begin

bool

boolean

break

case

char

chose_if

class

const

continue

CurrentInstance

default

delete

div

do

double

Elements

else

end

EndOfAndElement

EndOfElement

EndOfOrElement

enum

error

explicit

extern

ExternalType

false

finally

FinalRelations

FlexibleTemplateHeader

float

for

Function

goto

if

Import

IndependentRelations

InitScript

inline

Instance

int

is

LastFound

let

like

long

mod

namespace

new

not

nothing

null

of

on

operator

or

OrElement

ParamDefinitions

Params

private

PrivateRelations

protected

public

RecognitionParams

RegionalDecimalPoint

register

Relations

return

set

short

sizeof

static

string

struct

switch

template

then

this

to

true

typedef

typeid

typename

unsigned

using

Variants

void

while

with

xor


Function-call operators

Function and method parameters are set in one of the following ways:

·Using the "()" operator (parentheses)

·Using the ":" operator (colon)

Parameters are separated by "," (comma).

If the list of arguments of a function or method is empty, you can omit the "()" operator. The ":" operator is not used in this case.

Operator

Example

()

Mode( Horizontal );
MaxErrors( 2, 0.25 );

:

Mode: Horizontal;
MaxErrors: 2, 0.25;

DontFind();
DontFind;


Statements

Separating statements

Statements are separated by ";" (semicolon).

Compound statements

One or more statements can be enclosed in curly braces to form a compound statement. Compound statements are commonly called "blocks" (not to be confused with FlexiLayout blocks).

Conditional statements

In any section intended for entering code, you can use conditional if statements.

The if statement controls conditional branching. The body of an if statement is executed if the value of the expression is true. The syntax for the if statement has two forms.

Syntax

selection-statement :

if ( expression ) then statement

if ( expression ) then statement else statement

In both forms of the if statement, the expressions are evaluated.

In the first form of the syntax, if expression is true, statement is executed. If expression is false, statement is ignored. In the second form of syntax, which uses else, the second statement is executed if expression is false.

Iteration statements

In any section intended for entering code, you can use iteration for statements.

The for statement controls loops. The loop is executed while the value of the expression is true.

Syntax

iteration statement :

for <var-name> from <from-expr> to <to-expr> [ step <step-expr>]

<statement>

The name of the <var-name> counter is compulsory. This name must be different from the names of variables declared above. The scope of the counter is the body of the loop. Changing the value of the counter or declaring variables with the same name as the counter is not allowed within the loop.

The initial from-expr and final to-expr counter values are estimated before performing the first iteration of the loop. Then they are treated as integer constants in order to avoid endless loops.

The step parameter is optional. If the step value is not specified, the step is consider 1. The step value as well as its initial and final values is estimated once in the beginning of the loop. Depending on the sign of the step the condition for the iteration is chosen. For positive step values, the following condition must be performed: <var-name> ≤ <to-expr>, for negative step values, the condition is as follows: <var-name> ≥ <to-expr>. The step value cannot be zero, otherwise an error message will occur.

The <statement> can be a single statement or a block (compound statement) enclosed in curly braces.

You can also use the following statements inside the loop:

·break - breaks the loop;

·continue – goes to the next iteration of the loop.


Name scope

Names of elements, constants and variables can be used only in certain sections of a program. This is called the "scope" of the name. The scope of a variable also determines its lifetime.

The name of a variable declared in the Region expression, Advanced pre-search relations or Advanced post-search relations section is accessible within that section, and only after the point of declaration.

A name declared within a block is accessible only within that block and the blocks enclosed by it, and only after the point of declaration:

{
Int a; a = 5;
}

Element hypotheses can be accessed through the names of the elements. In the Advanced pre-search relations and Advanced post-search relations sections, you can access the hypotheses for all the elements which are located above the current element in the FlexiLayout tree. In the Advanced post-search relations section, you can also access the hypothesis formulated for the current element itself. In the Region expression section of a block description, you can access the hypotheses for all the elements located on the "best branch" of the tree of hypotheses.

The code in the Advanced pre-search relations section is executed separately for each hypothesis independently of the hypotheses which are located on other branches of the tree of hypotheses. This means that when the program executes the code of a particular section of an element description, it can access only one hypothesis for each superordinate element, namely the hypothesis which is located on the same branch.

Element hypotheses and their properties are accessed in read-only mode.

Hypotheses for a superordinate element are called by the full name of the element, for example: SearchObjects.Group1.Group2.FirstItem. When accessing one subelement of a group from another subelement, you need not specify the name of the group. For example, in the Advanced… sections of the element SearchObjects.Group1.Group2.SecondItem, you can call the element SearchObjects.Group1.Group2.FirstItem in one of the following ways: SearchObjects.Group1.Group2.FirstItem, Group1.Group2.FirstItem, Group2.FirstItem, FirstItem.

The shortcut name will always refer to the most nested element.

Suppose we have the following tree of elements:

SearchElements
FirstItem
Group1
FirstItem
SecondItem

If you are in SearchElements.Group1.SecondItem and use the name FirstItem, you will call the SearchElements.Group1.FirstItem element, and not the SearchElements.FirstItem element.


User defined properties

Show/Hide Hidden Text

An user defined property is a typed variable that belongs to an element. These properties are defined in the External fields section on the Advanced tab. The following format should be observed:

Type1 Name1;

...

TypeN NameN;

where Name is the name of the variable and Type is its type.

When fields are created, they are initialized as follows: numerical fields are initialized with zero values, rectangles and regions are initialized with empty values, etc.

Fields may be used in the element to which they belong and in any of the elements located below their element. The value of a field can be changed only in the element to which it belongs, and in other elements it is available as read only.

The value of a complex expression that characterizes the hypothesis for an element may be computed and written into this property. This value may be accessed from any of the elements below, without computing it each time it is needed. This reduces the time required to match the FlexiLayout. obviates the need to copy a large expression into each of the elements, and makes the code more readable.

To access a field of an element, the full name of the field is used in the following format: ElementName.FieldName (e.g. SearchElements.StaticText1.x). Within an element, its field may be accessed by name: x. In the case of a compound element, its subelements (at any level of nesting) may also access its elements by their short names.

Within an element, the names of the fields must be unique. The names of elements of a compound element may not coincide with any of the field names in its subelements (at any level of nesting). Additionally, the names of the fields of a compound element may not coincide with any of the names of its subelements.

Example

This example searches for two address components: city (character string City) and subway station (character string Station). The subway station is specified only if the city is Moscow. To speed up FlexiLayout matching, we specify a fromMoscow property for the City element. This property istrueif the City element is detected and has the valueMoscow, andfalsein all other cases.

Code for the City element:

External fields

logic fromMoscow;

Advanced post-search relations

if( not IsNull and Value.Find( "Moscow" ) >= 0 ) then fromMoscow = true;
else fromMoscow = false;

Subsequently, we use this property to search for the subway station. To speed up the matching process, we search for the station only if Moscow is detected as the City element.

Code for the Station element:

Advanced pre-search relations
if not City.fromMoscow then dontfind;

note Note.Because of the fields, elements of the same type are not treated as identical. Thus, constructions of the following type are prohibited:

Let e = SearchElements.StaticText1;
e = SearchElements.StaticText2;// element of the same type


Variables

You can create and use variables in any section where code is entered. The name of a variable cannot coincide with the name of a global constant or the name of an element.

Variables can be created in one of two ways.

You can declare a variable by specifying its type and name

The syntax is as follows:

[type name] [variable name];

For example:

Int a;

String s;

Logic isElementLongEnough;

To call the value of a variable, you must first initialize it by using an assignment operator. Calling a variable that has not been initialized will result in an error during compilation or when executing the code.

You can declare a variable and initialize it at the same time.

You can declare and initialize a variable using an expression, e.g. an element name, an element property or another variable. The syntax is as follows:

Let [variable name] = [expression]

For example:

Int a;a=3; Let a1 = a + 5;

Let myElement = SearchObjects.Group1.Group2.FirstItem

Let myRect = SearchObjects.Group1.Group2.FirstItem.Rect

The system creates a variable with the specified name. The type of the variable is implicitly defined by the type of the expression it refers to. At the same time the variable is initialized using the value of the expression.

Variables created using this method can be conveniently used as shortcut names for deeply nested elements and other objects to make the notation shorter.


Coordinates and units of measurement

Two dimensions – vertical and horizontal – are used to describe positions of objects on the page and distances between them. The (0,0) reference point is located in the top left-hand corner of the image. X-coordinates increase left to right, Y-coordinates increase top to bottom.

In a multi-page sheet there are two coordinate systems - a global coordinate system and local one. The former covers the entire multi-page sheet and all the objects on it and uses the top left corner of the first page as the origin of coordinates. The latter covers only one page and its objects and uses the top left corner of each page as the origin of coordinates.

Units of measurement for coordinates and distances:

Unit of measurement | Description
dot (dt) | 1/300 of an inch
inch (in) | inch
pt | paper point, 1/72 of an inch
mm | millimeter
cm | centimeter

Constants for distances can be represented using one of two formats:

Format | Example
A numerical value immediately followed by a unit of measurement | ·5cm ·200dot ·4in
A numerical value followed by the multiplication operator followed by a unit of measurement. You can insert spaces between any members of the representation. | ·5*mm ·17 *dt ·3 * inch


Predefined types

Void | Logic | String | Int | Distance
XCoordinate | YCoordinate | Real | Quality | Area
ImageObjectType | DateFormats | DayFormatVariants | MonthFormatVariants | YearFormatVariants
XInterval | YInterval | DistInterval | Rect | FuzzyRect
RectArray | Region | ImageObjectSet | TextTypes | BarcodeTypes
BarcodeOrientations | RecognitionMode | Direction | HorSearchAreaBound | VertSearchAreaBound
Hypothesis | HypothesisInstances | YCoordinateArray | TableBlock | TableBlockColumn
TableBlockColumnArray | TableHypothesis | TableHypColumn | TableColumnType | CurrencyPositionTypes
PageInterval | PageArea | PageEdge | Page | SearchAreaPageSetType
IntArray | StringArray | IntFuzzyInterval | DistFuzzyInterval | AreaFuzzyInterval
TextRotations |  |  |  |
Type |  | Description
Void |  | Type Void is used to declare functions that return no value.
Logic |  | Boolean type. A variable of this type can have values true and false. All conditional expressions return a value of type Logic.
Operators | Not | Logical NOT, unary operator.
 | And | Logical AND, binary operator.
 | Or | Logical OR, binary operator.
String |  | String type represents variable-length sequence of Unicode characters.
Methods | Int Length() | Returns the number of characters in the string. Read-Only.
 | Int Find(String subStr, Int startPos = 0) | Returns the beginning of the substring subStr of the string. Starts the search from the startPos position. Can be used without the startPos argument, in which case it assumes the default value of 0. Returns -1 if the string does not include a startPos substring.
 | Int Compare( String str ) | Compares the specified string with the string set by the argument. If the strings are equal, returns 0. If the given string alphabetically precedes str, the function returns -1, if the given string alphabetically follows str, the function returns 1.
 | Int CompareNoCase( String str ) | Compares the specified string with the string set by the argument ignoring the case of the characters. If the strings are equal, returns 0. If the given string alphabetically precedes str, the function returns -1, if the given string alphabetically follows str, the function returns 1.
 | String Mid ( Int start, Int count ) | Returns a substring of the string which is 'count' characters long and starts with the character number start.
 | String Mid ( String subStr, Int startPos = 0 ) | Returns the beginning of the substring subStr of the string. Can be used without the startPos argument, in which case it assumes the default value of 0. Returns -1 if the string does not include a startPos substring.
 | String SubstParam( String param0 ); String SubstParam( String param0, String param1 ); String SubstParam( String param0, String param1, String param2 ); String SubstParam( String param0, String param1, String param2, String param3 ); String SubstParam( String param0, String param1, String param2, String param3, String param4 ) | Returns the text of the string, replacing all occurrences of the %n characters (where n is a non-negative integer) with the corresponding parameters. The number of occurrences of the %n characters in the string must be the same as the number of passed parameters. The text of the original string will not be modified.
 | String SubstParam( StringArray params ) | Same as above, but the parameters are passed as an array of strings.
Operators | == | Checks if the two strings are equal. Binary operator. Returns a result of type Logic. Returns true if the strings are equal, otherwise returns false. Case-sensitive.
 | != | Checks if the two strings are not equal. Binary operator. Returns a result of type Logic. Returns true if the strings are not equal, otherwise returns false. Case-sensitive.
 | + | Concatenates two strings. Returns a value of type String.
Int |  | Integer type. Corresponds to a 32-digit integer.
Methods | Int abs( Int ) | Returns the absolute value of an integer.
Operators | - | Changes the sign. Unary operator.
 | + | Adds integers. Binary operator.
 | - | Subtracts one integer from another. Binary operator.
 | * | Multiplies integers. Binary operator.
 | / | Divides integers. Binary operator.
 | <, <=, >, >=, ==, != | Operators of comparison: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Binary operators. Return a value of type Logic.
Distance |  | Integer type (measured in dots) that represents distances.
Methods | Distance abs( Distance ) | Returns the absolute value of a distance.
Operators | - | Changes the sign. Unary operator
 | + | Adds values of type Distance. Binary operator.
 | - | Subtracts values of type Distance. Binary operator
 | * | Multiplies a value of type Distance by a value of type Int. Binary operator. Returns a value of type Distance.
 | * | Multiplies values of type Distance. Binary operator. Returns a value of type Area.
 | / | Divides a value of type Distance by a value of type Int. Binary operator. Returns a value of type Distance.
 | <, <=, >, >=, ==, != | Binary operators of comparison. Compare two values of type Distance: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Return a value of type Logic.
XCoordinate |  | Integer type used to represent X-coordinates.
Operators | + | Adds a value of type XCoordinate to a value of type Distance. Binary operator. Returns a value of type XCoordinate.
 | - | Subtracts a value of type Distance from a value of type XCoordinate. Binary operator. Returns a value of type XCoordinate.
 | - | Subtracts a value of type XCoordinate from a value of type XCoordinate. Binary operator. Returns a value of type Distance.
 | <, <=, >, >=, ==, != | Compares two values of type XCoordinate: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Binary operators. Return a value of type Logic.
YCoordinate |  | Integer type used to represent Y-coordinates.
Operators | + | Adds a value of type YCoordinate to a value of type Distance. Binary operator. Returns a value of type YCoordinate.
 | - | Subtracts a value of type Distance from a value of type YCoordinate. Binary operator. Returns a value of type YCoordinate.
 | - | Subtracts a value of type YCoordinate from a value of type YCoordinate. Binary operator. Returns a value of type Distance.
 | <, <=, >, >=, ==, != | Operators that compare two values of type YCoordinate: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Binary operator Return a value of type Logic.
Real |  | Real number
Operators | - | Changes the sign. Unary operator
 | + | Adds two real numbers. Binary operator.
 | - | Subtracts a real number from another real number. Binary operator.
 | * | Multiplies two real numbers. Binary operator.
 | / | Divides by a real number. Binary operator.
 | <, <=, >, >=, ==, != | Compare two real numbers: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Binary operators. Return a value of type Logic.
Quality |  | Real number from 0 to 1. Represents the returned value of the methods controlling the quality of an element hypothesis.
Area |  | Integer type (measured in dot*dot) used to represent the area of an image region.
Operators | - | Changes the sign. Unary operator
 | + | Adds two values of type Area. Binary operator.
 | - | Subtracts a values of type Area from another value of type Area. Binary operator.
 | * | Multiplies a value of type Area by a number of type Int. Binary operator. Returns a value of type Area.
 | * | Multiplies a value of type Area by a number of type Real. Binary operator. Returns a value of type Area.
 | / | A binary division operator that divides a number by an integer of type Int. Returns a value of type Area.
 | / | A binary division operator that divides a number of type Area by a number of type Area. Returns a value of type Real.
 | <, <=, >, >=, ==, != | Compare two values of type Area: less than, less than or equal to, greater than, greater than or equal to, equal to, not equal to. Binary operators. Return a value of type Logic.
ImageObjectType |  | Type used to represent classified image objects.
Operators | + | Joins two values of type ImageObjectType.
DateFormats |  | Integer type used to represent the format of date.
Operators | + | Joins two values of type DateFormats.
DayFormatVariants |  | Integer type used to represent the format of day in the date.
Operators | + | Joins two values of type DayFormatVariants.
MonthFormatVariants |  | Integer type used to represent the format of month in the date.
Operators | + | Joins two values of type MonthFormatVariants.
YearFormatVariants |  | Integer type used to represent the format of year in the date.
Operators | + | Joins two values of type YearFormatVariants.
XInterval |  | Type used to represent a range of X-coordinates on an image.
Operators | + | Adds a value of type XInterval to a value of type Distance. Binary operator. Returns a value of type Xinterval.
 | + | Adds a value of type XInterval to a value of type DistInterval. Binary operator. Returns a value of type Xinterval.
 | - | Subtracts a value of type Distance from a value of type XInterval. Binary operator. Returns a value of type Xinterval.
 | - | Subtracts a value of type DistInterval from a value of type XInterval. Binary operator. Returns a value of type Xinterval.
 | - | Subtracts a value of type XInterval from a value of type XInterval. Binary operator. Returns a value of type XInterval.
 | - | Subtracts a value of type XCoordinate from a value of type XInterval. Binary operator. Returns a value of type DistInterval.
 | - | Subtracts a value of type XInterval from a value of type XCoordinate. Binary operator. Returns a value of type DistInterval.
Methods | XCoordinate Start() | Returns the X-coordinate of the beginning of the interval. Read-only property.
 | XCoordinate End() | Returns the X-coordinate of the end of the interval. Read-only property.
YInterval |  | Type used to represent a range of Y-coordinates on an image.
Operators | + | Adds a value of type YInterval to a value of type Distance. Binary operator. Returns a value of type Yinterval.
 | + | Adds a value of type YInterval to a value of type DistInterval. Binary operator. Returns a value of type Yinterval.
 | - | Subtracts a value of type Distance from a value of type YInterval. Binary operator. Returns a value of type Yinterval.
 | - | Subtracts a value of type DistInterval from a value of type YInterval. Binary operator. Returns a value of type Yinterval.
 | - | Subtracts a value of type YInterval from a value of type YInterval. Binary operator. Returns a value of type DistInterval.
Methods | YCoordinate Start() | Returns the Y-coordinate of the beginning of the interval. Read-only property.
 | YCoordinate End() | Returns the Y-coordinate of the end of the interval. Read-only property.
DistInterval |  | Type used to represent the allowed range of distances.
Operators | * | Multiplies a value of type DistInterval by a number of type Int. Binary operator. Returns a value of type DistInterval.
 | / | Divides by a number of type Int. Binary operator
Methods | Distance Start() | Returns the minimum distance. Read-only property.
 | Distance End() | Returns the maximum distance. Read-only property.
Rect |  | Rectangle on an image.
Constructors | Rect Rect( XCoordinate left, YCoordinate top, XCoordinate right, YCoordinate bottom ) | Constructs a value of type Rect from coordinates on the image. The boundaries of the rectangle are passed as parameters: ·left – left boundary, ·top – top boundary, ·right – right boundary, ·bottom – bottom boundary.
Operators | Or | Unites two rectangles. The result is the smallest rectangle which contains both rectangles.
 | And | Intersects two rectangles. The result is the largest rectangle which is contained in both rectangles.
Methods | XCoordinate Left() | Returns the left boundary of the rectangle. Read-only property.
 | YCoordinate top() | Returns the top boundary of the rectangle. Read-only property.
 | XCoordinate Right() | Returns the right boundary of the rectangle. Read-only property.
 | YCoordinate Bottom() | Returns the bottom boundary of the rectangle. Read-only property.
 | Distance Width() | Returns the width of the rectangle. Read-only property.
 | Distance Height() | Returns the height of the rectangle. Read-only property.
 | Area Area() | Returns the area of the rectangle. Read-only property.
 | Void Left( XCoordinate x ) | Sets the left boundary of the rectangle.
 | Void top( YCoordinate y ) | Sets the top boundary of the rectangle.
 | Void Right( XCoordinate x ) | Sets the right boundary of the rectangle.
 | Void Bottom( YCoordinate y ) | Sets the bottom boundary of the rectangle.
 | XCoordinate XCenter() | The X-coordinate of the center of the rectangle.
 | YCoordinate YCenter() | The Y-coordinate of the center of the rectangle.
 | Void Inflate( Distance xDist, Distance yDist ) | Expands the rectangle by xDist to the left and to the right, and by yDist upwards and downwards.
 | XCoordinate GetX( Real ratio ) | Calculates the X-coordinate located within the rectangle between the Left and Right coordinates as Left + Width * ratio.
 | YCoordinate GetY( Real ratio ) | Calculates the Y-coordinate located within the rectangle between the top and Bottom coordinates as Top + Height * ratio.
 | Rect GetInflated( Distance xDist, Distance yDist ) | Returns an "expanded" rectangle. Each apex is shifted by xDist and yDist in the direction that expands the figure (the top left apex is moved upwards and to the left, etc.). -The rectangle itself remains unchanged.
 | Logic IsEmpty() | Checks if the rectangle corresponds to a non-empty region on the image, i.e. a region whose Left < Right and top < Bottom
FuzzyRect |  | Fuzzy rectangle. See Fuzzy_Rect for more.
Operators | And | Intersects two fuzzy rectangles, i.e. intersects the ranges of the boundaries of specified fuzzy rectangles.
 | Or | Unites two fuzzy rectangles, i.e. unites the ranges of the boundaries of specified fuzzy rectangles.
Methods | Rect ExternalRect() | Returns a copy of the external rectangle.
 | Rect InternalRect() | Returns a copy of the internal rectangle.
 | XInterval Left() | The left boundary of the fuzzy rectangle, horizontal range.
 | YInterval top() | The top boundary of the fuzzy rectangle, vertical range.
 | XInterval Right() | The right boundary of the fuzzy rectangle, horizontal range.
 | YInterval Bottom() | The bottom boundary of the fuzzy rectangle, vertical range.
 | XInterval XCenter() | The X-coordinate of the center of the fuzzy rectangle, horizontal range.
 | YInterval YCenter() | The Y-coordinate of the center of the fuzzy rectangle, vertical range.
 | DistInterval Width() | The width of the fuzzy rectangle, distance range.
 | DistInterval Height() | The height of the fuzzy rectangle, distance range.
 | Logic IsEmpty() | Checks if the fuzzy rectangle is empty.
RectArray |  | Array of rectangles
Constructors | RectArray RectArray () | Creates an empty array of rectangles.
 | RectArray RectArray( Rect rect ) | Constructor with parameter Rect. Creates an array consisting of one rectangle equal to the rect rect.
 | RectArray RectArray( Region region ) | Constructor with parameter Region. Creates an array consisting of rectangles of the region region.
Methods | Int Count() | Returns the number of array elements.
 | Region Region() | Continuous region from an array of rectangles.
 | Rect Rect() | Rectangle circumscribing an array of rectangles.
 | Rect GetAt( Int ) | Returns the item at the specified index.
 | Rect Rect( Int ) | Same as the Rect GetAt( Int ) method, obsolete syntax.
 | Void Add( Rect rect ) | Adds a rect rectangle to an array of rectangles.
 | Void Add( RectArray array ) | Adds an array array of rectangles to an array of rectangles.
Region |  | A region is a set of rectangles positioned one under another in such a way that the top line of the lower rectangle is the bottom line of the upper one (so that the rectangles do not overlap).
Constructors | Region Region() | Creates an empty region.
 | Region Region( RectArray rectArray ) | Constructor from a value of type RectArray. Creates a region containing the rectangles from the rectArray array.
Operators | Or | Unites two regions.
 | And | Intersects two regions; or a region and a rectangle. Returns a value of type Region.
Methods | XCoordinate Left() | Returns the left boundary of the region. Read-only property.
 | YCoordinate top() | Returns the top boundary of the region. Read-only property.
 | XCoordinate Right() | Returns the right boundary of the region. Read-only property.
 | YCoordinate Bottom() | Returns the bottom boundary of the region. Read-only property.
 | Distance Width() | Returns the width of the region. Read-only property.
 | Distance Height() | Returns the height of the region. Read-only property.
 | Area Area() | Returns the area of the region. Read-only property.
 | Void Inflate( Distance xDist, Distance yDist ) | Expands the region by xDist to the right and to the left, and by yDist upwards and downwards.
 | Rect Rect() | Returns a copy of the rectangle circumscribing the region.
ImageObjectSet |  | Type used to represent the set of image objects belonging to the hypothesis.
Methods | RectArray Rects() | Returns a copy of the array of rectangles of image objects belonging to the hypothesis.
 | Region Region() | Returns a copy of the continuous region created from the array of rectangles of image objects belonging to the hypothesis.
TextTypes |  | Type used to represent a set of text types.
Operators | + | Joins two values of type TextTypes.
BarcodeTypes |  | Type used to represent a set of barcode types.
Operators | + | Joins two values of type BarcodeTypes.
BarcodeOrientations |  | Type used to represent a set of possible barcode orientations.
Operators | + | Joins two values of type BarcodeOrientations.
RecognitionMode |  | Integer type used to represent pre-recognition modes.
Direction |  | Type used to represent the vertical or horizontal direction. Sets the direction of Separator and White Gap elements.
HorSearchAreaBound |  | Type used to represent the right and left boundaries of the element’s search area. A variable of this type can only be created by using a Let expression.
Operators | - | Binary operator that subtracts a value of type HorSearchAreaBound from a value of type XInterval and vice versa. Returns a value of type Xinterval.
 | >, < | Binary operators that compare a value of type HorSearchAreaBound to a value of type XCoordinate. Return a value of type FuzzyRect.
VertSearchAreaBound |  | Type used to represent the top and bottom boundaries of the element’s search area. A variable of this type can only be created by using a Let expression.
Operators | - | Binary operator that subtracts a value of type HorSearchAreaBound from a value of type YInterval and vice versa. Returns a value of type Yinterval.
 | >, < | Binary operators that compare a value of type VertSearchAreaBound to a value of type YCoordinate. Return a value of type FuzzyRect.
Hypothesis |  | Type used to call a hypothesis of the element of any type. See Hypotheses for all types of element for more details.
HypothesisInstances |  | Describes instances of a Repeating Group element. Has the same methods as hypotheses. For more about the methods of hypotheses, see Hypotheses for all types of element.
Methods | YCoordinateArray GetYArray( Real ratio ) | Returns the array of Y coordinates of instance rectangles. To calculate the Y coordinate, the following formula is used: Top + Height * ratio. Null instances are ignored.
YCoordinateArray |  | The array of Y coordinates of the rectangles.
Constructors | YCoordinateArray YCoordinateArray() | Constructor. Creates an empty array of rectangles specified by Y coordinates.
Methods | Void Add( YCoordinate ) | Adds a rectangle to the end of the array
 | Void Add( YCoordinateArray ) | Adds another array to the end of the array.
 | Void InsertAt( Int index, YCoordinate ) | Adds a rectangle to position index.
 | Void DeleteAll() | Deletes all elements of the array
 | Void DeleteAt( Int index ) | Deletes the element in position index.
 | YCoordinate GetAt( Int index ) | Returns the element with the specified index.
 | Int Count() | Returns the number of elements in the array.
 | Void ShiftDown( Int index, Distance ) | Shift downward (increase) the coordinate of the specified element in the array.
 | Void ShiftUp( Int index, Distance ) | Shift upward (decrease) the coordinate of the specified element in the array.
 | Void ShiftDown( Distance ) | Shift downward (increase) all elements in the array.
 | Void ShiftUp( Distance ) | Shift upward (decrease) all elements in the array.
TableBlock |  | A type used to access a table block.
Methods | Int ColumnsCount() | Returns the number of columns in the block.
 | String ColumnName( Int columnIndex ) | The name of the columnIndex column, where columnIndex is the number of the column. Numbering starts from 0.
TableBlockColumn |  | Type used to call a column of the table block. A variable of this type can only be created by using a Let expression. See Hypotheses for Table elements for more details.
TableBlockColumnArray |  | Type used to call an array of columns of the table block. A variable of this type can only be created by using a Let expression. See Hypotheses for Table elements for more details.
Constructors | TableBlockColumnArray( TableBlockColumn ) | Creates an array of columns from a single column. For example: TableBlockColumnArray arr; arr = Blocks.TableBlock.Column1;
Methods | Void Add( TableBlockColumn ) | Adds the selected column to the array of columns.
Operators | << | Binary operator that adds an array of columns to another array of columns. For example: TableBlockColumnArray arr; arr = Blocks.TableBlock.Column1; arr << Blocks.TableBlock.Column2 << Blocks.TableBlock.Column3;
TableHypothesis |  | Type used to call a hypothesis of the table element. See Hypotheses for Table elements for more details.
TableHypColumn |  | Type used to call a column of the hypothesis of the table element. A variable of this type can only be created by using a Let expression. See Hypotheses for Table elements for more details.
TableColumnType |  | Type used to describe of multiple types of column content.
CurrencyPositionTypes |  | Type used to set the position of the currency name relative to the numerical value in a Currency element.
Operators | + | Joins values of type CurrencyPositionTypes. Binary operator.
PageInterval |  | Types used to represent the page interval of a multi-page document.
Methods | Logic IsEmpty() | Checks if the range of a rectangle is empty. Read-only.
 | Int Start() | Returns the number of the first page in a range. Read-only.
 | Int End() | Returns the number of the last page in a range. Read-only.
PageArea |  | Area on a page. Returned by PageSearchAreaLocal, PageSearchAreaGlobal, PageAreaLocal, and PageAreaGlobal methods (these functions have page numbers as their arguments). Can be expressed either in global or local coordinates, depending on which function has been called.
Methods | XInterval Left() | The left boundary of the part of the hypothesis located on the given page, horizontal interval.
 | YInterval Top() | The top boundary of the part of the hypothesis located on the given page, vertical interval.
 | XInterval Right() | The right boundary of the part of the hypothesis located on the given page, horizontal interval.
 | YInterval Bottom() | The bottom boundary of the part of the hypothesis located on the given page, vertical interval.
 | XInterval XCenter() | The abscissa of the center of the part of the hypothesis located on the given page, horizontal interval.
 | YInterval YCenter() | The ordinate of the center of the part of the hypothesis located on the given page, vertical interval.
 | DistInterval Width() | The width of the part of the hypothesis located on the given page.
 | DistInterval Height() | The height of the part of the hypothesis located on the given page.
 | FuzzyRect FuzzyRect() | The fuzzy rectangle of the part of the hypothesis located on the given page
 | Rect Rect() | The enclosing rectangle of the part of the hypothesis located on the given page. Coincides with the outward rectangle of the fuzzy rectangle.
 | Region Region() | The region of the part of the hypothesis located on the given page.
 | Region SimplifiedRegion() | The region of the part of the hypothesis located on the given page, simplified for better viewing.
 | ImageObjectSet Set() | Image objects captured by the part of the hypothesis located on the given page.
 | ImageObjectSet ExcludeSet() | Image objects on the part of the image excluded from the search area of the part of the hypothesis located on the given page by Exclude methods.
 | RectArray Rects() | The array of rectangles of the image objects capture by the part of the hypothesis located on the given page.
PageEdge |  | The type used to specify the Nearest function relative to a page edge. Allows you to select the hypothesis closest to the top, bottom, left or right page edge.
Page |  | Type returned by the Page( Int PageNumber ) function.
Methods | Distance AverageLineHeight() | Average line height on a page.
 | Distance AverageInterlineInterval() | Average line spacing on a page.
 | Area ObjectsAreaLocal( Rect localRect, ImageObjectType ) | The area of the objects in the specified rectangle on a page of the specified type. Local coordinates are used for the rectangle.
 | Area ObjectsIntersectionAreaLocal( Rect localRect, ImageObjectType ) | The joint area of the objects in the specified rectangle and the area of objects intersection with the rectangle on a page of the specified type. Local coordinates are used for the rectangle.
 | Area ObjectsAreaGlobal( Rect globalRect, ImageObjectType ) | The area of the objects in the specified rectangle on a page of the specified type. Global coordinates are used for the rectangle.
 | Area ObjectsIntersectionAreaGlobal( Rect globalRect, ImageObjectType ) | The joint area of the objects in the specified rectangle and the area of objects intersection with the rectangle on a page of the specified type. Global coordinates are used for the rectangle.
 | Rect RectLocal() | The rectangle of the entire image in local coordinates.
 | Rect RectGlobal() | The rectangle of the entire image in global coordinates.
SearchAreaPageSetType |  | The type used in the RestrictSearchArea function. The predefined constants for this type are: AnyPage; OddPages; EvenPages; LastPage.
IntArray |  | Array of integers.
Constructors | IntArray IntArray() | Creates an empty array.
 | IntArray IntArray( Int ) | Constructor with parameter Int. Creates an array consisting of this integer.
Methods | Int Count() | Returns the number of elements in the array.
 | Int GetAt( Int ) | Returns the element with the specified index.
 | Void Add( Int ) | Adds an integer to the end of the array.
 | Void Add( IntArray ) | Adds another array to the end of the array.
 | Void InsertAt( Int index, Int number ) | Adds an integer number to position index.
 | Void DeleteAll() | Deletes all elements of the array.
 | Void DeleteAt( Int index ) | Deletes the element in position index.
Operators | << | Binary operator that adds an integer to the array.
StringArray |  | Array of strings.
Constructor | StringArray StringArray() | Creates an empty array.
Methods | Int Count() | Returns the number of elements in the array.
 | String GetAt( Int index ) | Returns the element with the specified index.
 | Void Add( String ) | Adds a string to the end of the array.
 | Void Add( StringArray ) | Adds another array to the end of the array.
 | Void InsertAt( Int index, String ) | Adds a string to position index.
 | Void DeleteAll() | Deletes all elements of the array.
 | Void DeleteAt( Int index ) | Deletes the element in position index.
IntFuzzyInterval |  | A type for representing a fuzzy integer interval of integers. The fuzzy interval is represented by four values of type Int, each of which should be greater than or equal to the previous value.
Constructor | IntFuzzyInterval IntFuzzyInterval( Int value ) | Constructor from an integer. Initializes all the four values with the “value” value.
Initialization | Expression of type {x1, x2, x3, x4} | A variable of type IntFuzzyInterval may be initialized by an expression of type {x1, x2, x3, x4}, where x1, x2, x3, and x4 are values of type Int. Example: Int x1 = 5; IntFuzzyInterval intFuzzyInt = {x1, 200, 300, 5000};
Operators | + | A binary addition operator that adds a value of type IntFuzzyInterval to a value of type Int. Returns a value of type IntFuzzyInterval.
 | + | A binary addition operator that adds a value of type IntFuzzyInterval to a value of type DistInterval. Returns a value of type IntFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type Int from a value of type IntFuzzyInterval. Returns a value of type IntFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type IntFuzzyInterval from a value of type Int. Returns a value of type IntFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type DistInterval from a value of type IntFuzzyInterval. Returns a value of type IntFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type IntFuzzyInterval from a value of type DistInterval. Returns a value of type IntFuzzyInterval.
 | * | A binary multiplication operator that multiplies a value of type IntFuzzyInterval by a value of type Int. Returns a value of type IntFuzzyInterval.
 | * | A binary multiplication operator that multiplies a value of type IntFuzzyInterval by a value of type DistInterval. Returns a value of type IntFuzzyInterval.
 | / | A binary division operator that divides a value of type IntFuzzyInterval by a value of type Int. Returns a value of type IntFuzzyInterval.
DistFuzzyInterval |  | A type for representing a fuzzy integer interval of distances. The fuzzy interval is represented by four values of type Distance, each of which should be greater than or equal to the previous value.
Constructor | DistFuzzyInterval DistFuzzyInterval ( Distance value ) | Constructor from a value of type Distance. Initializes all the four values with the “value” value.
Initialization | Expression of type {d1, d2, d3, d4} | A variable of type DistFuzzyInterval may be initialized with an expression of type {d1, d2, d3, d4}, where d1, d2, d3, and d4 are values of type Distance. Example: Distance d1 = 5dt; DistFuzzyInterval distFuzzyInt = {d1, 200dt, 300dt, 5000dt};
Operators | + | A binary addition operator that adds a value of type DistFuzzyInterval to a value of type Distance. Returns a value of type DistFuzzyInterval.
 | + | A binary addition operator that adds a value of type DistFuzzyInterval to a value of type DistInterval. Returns a value of type DistFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type Distance from a value of type DistFuzzyInterval. Returns a value of type DistFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type DistFuzzyInterval from a value of type Distance. Returns a value of type DistFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type DistInterval from a value of type DistFuzzyInterval. Returns a value of type DistFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type DistFuzzyInterval from a value of type DistInterval. Returns a value of type DistFuzzyInterval.
 | * | A binary multiplication operator that multiplies a value of type DistFuzzyInterval by a value of type Int. Returns a value of type DistFuzzyInterval.
 | * | A binary multiplication operator that multiplies a value of type DistFuzzyInterval by a value of type DistInterval. Returns a value of type DistFuzzyInterval.
 | / | A binary division operator that divides a value of type DistFuzzyInterval by a value of type Int. Returns a value of type DistFuzzyInterval.
AreaFuzzyInterval |  | A type for representing a fuzzy integer interval of area. The fuzzy interval is represented by four values of type Area, each of which should be greater than or equal to the previous value.
Constructor | AreaFuzzyInterval AreaFuzzyInterval ( Area value ) | Constructor from a value of type Area. Initializes all the four values with the “value” value.
Initialization | Expression of type {a1, a2, a3, a4} | A variable of type AreaFuzzyInterval may be initialized with an expression of type {a1, a2, a3, a4}, where a1, a2, a3, and a4 are values of type Area. Example: Area a1 = 500dt*dt; AreaFuzzyInterval areaFuzzyInterval = {a1, 2000dt*dt, 3000dt*dt, 5000dt*dt};
Operators | + | A binary addition operator that adds a value of type AreaFuzzyInterval to a value of type Area. Returns a value of type AreaFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type Area from a value of type AreaFuzzyInterval. Returns a value of type AreaFuzzyInterval.
 | - | A binary subtraction operator that subtracts a value of type AreaFuzzyInterval from a value of type Area. Returns a value of type AreaFuzzyInterval.
 | * | A binary multiplication operator that multiplies a value of type AreaFuzzyInterval by a value of type Int. Returns a value of type AreaFuzzyInterval.
 | / | A binary division operator that divides a value of type AreaFuzzyInterval by a value of type Int. Returns a value of type AreaFuzzyInterval.
TextRotations |  | A type for representing a set of orientations of the recognized text in which the element is searched.
Operators | + | Joins values of type TextRotations.


Conversion of types

The FlexiLayout language supports implicit conversion of types.

Int –> Real

Rect –> Region

XCoordinate –> XInterval

YCoordinate –> YInterval

Distance –> DistInterval

The following conversions are allowed in the language, but may result in an error. For example, conversion XCoordinate –> Distance with a subsequent conversion Distance –> YCoordinate may lead to an error of converting an X-coordinate into a Y-coordinate.

If you use such conversions in your code, the compiler will display a warning message.

Distance –> XCoordinate

Distance –> YCoordinate

XCoordinate –> Distance

YCoordinate –> Distance

DistInterval –> XInterval

DistInterval –> YInterval

Xinterval –> DistInterval

Yinterval –> DistInterval


Predefined constants

Type | Value
Alignment | Alignment_None; Alignment_Left; Alignment_Right; Alignment_Justified; Alignment_Center
BarcodeOrientations | BarcodeOrientation_Autodetect; BarcodeOrientation_LefttoRight; BarcodeOrientation_Downtotop; BarcodeOrientation_RighttoLeft; BarcodeOrientation_toptoDown
BarcodeTypes | BarcodeType_Autodetect; BarcodeType_Codabar; BarcodeType_Code39; BarcodeType_Code93; BarcodeType_CheckCode39; BarcodeType_Code39WithoutAsterisk; BarcodeType_Interleaved25; BarcodeType_CheckInterleaved25; BarcodeType_EAN13; BarcodeType_Code128; BarcodeType_EAN8; BarcodeType_PDF417; BarcodeType_IATA25; BarcodeType_UCC128; BarcodeType_UPCA; BarcodeType_UPCE; BarcodeType_CheckCodabar; BarcodeType_Industrial25; BarcodeType_Matrix25; BarcodeType_Postnet; BarcodeType_Patch; BarcodeType_Aztec; BarcodeType_DataMatrix; BarcodeType_QRCode
CurrencyPositionTypes | CurrencyPos_Left; CurrencyPos_Right
DateFormats | DayMonthYear; DayYearMonth; MonthDayYear; MonthYearDay; YearDayMonth; YearMonthDay
DayFormatVariants | NoLeadingZeroDay; WithLeadingZeroDay
Direction | Vertical; Horizontal
ImageObjectType | The sum total of any number of elementary values that correspond to objects of various types: ·AnyText - text ·PunctuationMark - punctuation marks ·PictureObject - picture ·InvertedTextObject - inverted text ·CheckmarkObject - checkmark ·SeparatorObject - separator ·VertSeparatorObject - vertical separator ·HorSeparatorObject - horizontal separator ·BarcodeObject - barcode
Logic | true; false
MonthFormatVariants | DigitsNoLeadingZeroMonth; DigitsWithLeadingZeroMonth; WordMonth
PageEdge | PageTop; PageBottom; PageLeft; PageRight
Quality | BestQuality; WorstQuality
RecognitionMode | BalancedMode; FastMode; FullModelMode
SearchAreaPageRestriction | WholePage (used only in the RestrictSearchArea function)
SearchAreaPageSetType | AnyPage; OddPages; EvenPages; LastPage (used only in the RestrictSearchArea function)
String | RegionalDecimalPoint – the character used by the operating system to separate the integer and fractional parts of a decimal number.
TableColumnType | ColumnType_Text; ColumnType_Currency; ColumnType_Date; ColumnType_RegExp; ColumnType_Number
TextAlignmentInTableCell | TextAlignment_CellTop; TextAlignment_CellBottom
TextTypes | TextType_Normal; TextType_TypeWriter; TextType_Matrix
YearFormatVariants | TwoDigitYear; FourDigitYear
TextRotations | HorizontalText; ClockwiseText; CounterClockwiseText


Predefined variables

Name | Description
IsNull | Variable of type Logic. Used in the Region Expression section. The value of the variable determines whether the block has been found or not. The IsNull variable is pre-initialized with value False, which means that the block has been found. To instruct the program that the block has not been found, set the variable IsNull to True. Used for blocks of all types.
IsSuspicious | A variable of type Logic that is used in the description section of a Region Expression block. Its value indicates whether the block has been detected reliably or not. The IsSuspicious variable is already initialized with the value False, which means that the block has been detected. To tell the program that the block has been detected unreliably, set the value of the IsSuspicious variable to True. Used for blocks of all types.
OutputInstances | Variable used in the Region Expression section for blocks of all types for which Has repeating instances is enabled. For non-table blocks, the type of the variable is HypothesisInstances. For table blocks, the type of the variable is TableHypothesisInstances. The value of the variable defines the detected region of the block. The region of a block built from the instances of the elements and subelements of a repeating group is discontinuous.
OutputRegion | Variable of type Region. Used in the Region Expression section. The value of the variable determines the region of the block. Used for blocks of all types, except table blocks.
OutputTable | Variable of type TableHypothesis. Used in the Region Expression section. The value of the variable is used to initialize the region and the contents of a block on the basis of a specific table element. Used only for table blocks.


Global functions

Show/Hide Hidden Text

warning Important!Do not use variables as arguments of global functions that interact with external files or databases.

Definition

Description

Area Max( Area a1, Area a2 )

Returns the maximum value from a1, a2.

Area Min( Area a1, Area a2 )

Returns the minimum value from a1, a2.

Area ObjectsArea( Rect, ImageObjectType )

The area of the objects of the specified type within the specified rectangle. Works in global coordinates.

Area ObjectsIntersectionArea( Rect, ImageObjectType )

The area of the objects of the specified type within the specified rectangle and the intersection area of objects of the specified type going beyond the specified rectangle. Works in global coordinates.

Distance abs( Distance )

Returns the absolute value of a distance.

Distance AverageLineHeight()

The average height of the text lines on the page.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected document has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error. For a multi-page document, use the corresponding method of the type Page: Page( N ). AverageLineHeight.

Distance AverageInterLineInterval()

The average distance between the text lines on the page.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected document has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error. For a multi-page document, use the corresponding method of the type Page: Page( N ). AverageInterLineInterval.

Distance Min( Distance d1, Distance d2 )

Returns the minimum value from d1, d2.

Distance Max( Distance d1, Distance d2 )

Returns the maximum value from d1, d2.

Int abs( Int )

Returns the absolute value of a number.

Int Ceil( Real )

Returns the smallest integer that is not less than the argument.

Int Floor( Real )

Returns the largest integer that is not greater than the argument.

Int LogicToInt( Logic value )

Returns "1" if the value is true and "0" if the value is false.

Int Max( Int n1, Int n2 )

Returns the maximum value from n1, n2.

Int Min( Int n1, Int n2 )

Returns the minimum value from n1, n2.

Int PagesCount()

Returns the number of pages in the document.

Int RecordCount( String connectionString, String selectString )

Returns the number of records of the request. E.g. See the example for the Record function below.

Int Round( Real )

Returns an integer closest in value to the argument.

Int StrToInt( String inputString, Logic isStrictMode = false )

Returns the result of converting the inputString string value to an integer number. Spaces are omitted. The isStrictMode parameter (by default = false) defines whether the string can include characters other than digits and spaces. If isStrictMode = false, and the string contains a character which is not a digit or space, all subsequent characters are omitted. It is recommended to check the possibility of conversion before invoking it. To do it, use the IsInt function.

E.g.

Int integralValue;

String valueFromDocument = SearchElements.StaticText.Value();

Logic canBeConverted = IsInt(valueFromDocument, true);if(canBeConverted) then integralValue = StrToInt(valueFromDocument, true);

Int StrToIntFuzzy( String, Logic isStrictMode = false )

Returns the result of converting the value of the string inputString into an integer taking into account possible recognition errors in the string (see the description of IsIntFuzzy function for details). Spaces are ignored during conversion. The isStrictMode parameters (which is set to false by default) determines if the string may contain characters other than digits, characters that look like digits, or spaces. If isStrictMode = false and a character other than a digit is encountered, all the characters after it will be ignored. Before starting the conversion, we recommend calling the IsIntFuzzy function to check if the string can be safely converted.

Logic ExecuteSQL( String connectionString, String queryString )

Carries out the user’s SQL query: queryString. The connectionString argument sets the database connection string.

E.g.

ExecuteSQL("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\FCS\\Companies.mdb", "UPDATE Companies SET total=0");

Logic IsInt( String inputString, Logic isStrictMode = false )

Checks that the inputString string can be securely converted to an integer number. The isStrictMode parameter (by default = false) defines whether the string can include characters other than digits and spaces.

Logic IsIntFuzzy( String inputString, Logic isStrictMode = false )

Checks if the string inputString can be safely converted into an integer taking into account possible recognition errors in the string. This type of conversion converts to integers not only digits (i.e. characters "0123456789"), but also characters that look like digits (e.g. “oOBsl”). The isStrictMode parameters (which is set to false by default) determines if the string may contain characters other than digits, characters that look like digits, or spaces.

Logic IsOnSameLine( Hypothesis, Hypothesis )

Checks if the hypotheses intersect vertically.

Logic IsReal( String numberString, String separators = “.,”, Logic isStrictMode = false )

Checks that the inputString string can be converted to a real number. The list of allowed decimal separators is set by the “separators” argument. By default, the point, comma and user-defined separator (configured in the regional settings of the OS, see RegionalDecimalPoint). The isStrictMode parameter (by default = false) defines whether the string can include characters other than digits, spaces and separators.

Logic IsRealFuzzy( String, String separators = defaultDecimalSeparators, Logic isStrictMode = false )

Checks if the string inputString can be safely converted into a real number taking into account possible recognition errors in the string. (see the description of IsIntFuzzy function for details). The list of allowed decimal separators is specified by the “separators” argument. By default, the following separators are allowed: point, comma, and the separator specified in the regional settings of the user’s operating system (see RegionalDecimalPoint). The isStrictMode parameters (which is set to false by default) determines if the string may contain characters other than digits, characters that look like digits, spaces, or separators.

Logic TestDBConnection( String connectionString )

Tests the database connection. The connectionString argument contains the connection string.

Logic TestDBSelect( String connectionString, String selectString )

Checks if the database is accessible and if the SQL query is correct (if the specified table and field exist). The connectionString argument contains the connection string. The selectString argument contains the SQL query, which starts with the SELECT command.

Logic TestFileAccess( String fileName )

Checks if the text file is accessible.

Logic WriteToFile( String filename, String text )

Adds the “text” string to the “filename” file. If there is no file with this name, a new file will be created.

E.g.

WriteToFile("D:\\FCS\\logFile.txt", SearchElements.Tag.Value());

Page Page( Int PageNumber )

Returns the type that described the given page.

Quality ValidateByDB( String word, String connectionString, String selectString, Int maxErrors, Real maxErrorsPart, Logic ignoreSpaces, Int maxRecordsCount = 1000 )

Checks the specified word by comparing it against a database (see Using databases and text files in the FlexiLayout language). The connectionString argument sets the string for connecting to the database. The selectString argument sets an SQL query, which starts with the SELECT command. The maxErrors argument sets the absolute maximum number of errors in the word, and the maxErrorsPart sets the relative maximum number of errors in the word. The ignoreSpaces determines whether spaces should be taken into account when comparing. To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000). Returns the quality of matching between the specified word and the best match from the database.

E.g.

if not IsNull then ValidateByDB(Value(), "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\FCS\\Companies.mdb", "SELECT Name FROM Companies", 1, 0.3, true, 500);

note Note.This function may be used in the Advanced Post-Search Relations field for fuzzy matching of the string value of a hypothesis returned by the Value method with specified variants.

Quality ValidateByFile( String word, String fileName, Int maxErrors, Real maxErrorsPart, Logic ignoreSpaces, Int maxRecordsCount = 1000 )

Checks the specified word by comparing it with the variants in the fileName file, which lists possible phrase variants (see Using databases and text files in the FlexiLayout language). The maxErrors argument sets the absolute maximum number of errors in the word, and the maxErrorsPart sets the relative maximum number of errors in the word. The ignoreSpaces determines whether spaces should be taken into account when comparing. Returns the quality of matching between the specified word and the best match from the text file. To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000).

E.g.

if not IsNull then ValidateByTextFile(Value(), "Companies.txt", 1, 0.3, true, 500);

note Note.This function may be used in the Advanced Post-Search Relations field for fuzzy matching of the string value of a hypothesis returned by the Value method with specified variants.

Quality ValidateByText( String word, String variants, Int maxErrors, Real maxErrorsPart, Logic ignoreSpaces )

Checks the specified word by comparing it with the listed variants. The maxErrors argument sets the absolute maximum number of errors in the word, and the maxErrorsPart sets the relative maximum number of errors in the word. The ignoreSpaces determines whether spaces should be taken into account when comparing. Returns the quality of matching between the specified word and the best match from the variants listed in the variants argument.

E.g.

if not IsNull then ValidateByText (Value(), "ABBYY|Flexi Capture", 1, 0.3, true);

note Note.This function may be used in the Advanced Post-Search Relations field for fuzzy matching of the string value of a hypothesis returned by the Value method with specified variants.

Real Min( Real d1, Real d2 )

Returns the minimum value from d1, d2.

Real Max( Real d1, Real d2 )

Returns the maximum value from d1, d2.

Real StrToReal( String numberString, String separators = “.,”, Logic isStrictMode = false )

Returns the result of converting the inputString string to a real number. Spaces are omitted. The isStrictMode parameter (by default = false) defines whether the string can include characters other than digits, spaces and separators. If isStrictMode = false, and the string contains a second decimal separator or a character which is not a digit or space, all subsequent characters are omitted. It is recommended to check the possibility of conversion before invoking it. To do it, use the IsReal function.

E.g.

Real realValue;
String valueFromDocument = SearchElements.StaticText.Value();
Logic canBeConverted = IsReal(valueFromDocument, ".");if(canBeConverted) then realValue = StrToReal(valueFromDocument, ".");

Real StrToRealFuzzy( String, String separators = defaultDecimalSeparators, Logic isStrictMode = false )

Returns the result of converting the value of the string inputString into a real number taking into account possible recognition errors in the string (see the description of IsIntFuzzy function for details). Spaces are ignored during conversion. The isStrictMode parameters (which is set to false by default) determines if the string may contain characters other than digits, characters that look like digits, spaces, or separators. If isStrictMode = false and a second decimal separator or a character other than a digit is encountered, в all the characters after it will be ignored. Before starting the conversion, we recommend calling the IsRealFuzzy function to check if the string can be safely converted.

Rect DocumentRect()

Returns the rectangle of the entire document (in global coordinates).

Rect PageRect()

The rectangle of the entire image.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error For a multi-page document, this function may only be used in the Pre-search relations section. See Functions which limit the search area.

Region FormRegion( RectArray included, RectArray excluded )

Creates a region that includes the array of included rectangles, and excludes the array of excluded rectangles.

StringArray ReadFromXML( String filename, String xPathQuery )

Reads the array of strings from the “filename” XML file. The strings are obtained by calculating the passed xPath query “xPathQuery.”

StringArray Record( String connectionString, String selectString, Int index )

Retrieves data on a specific record. For a cell with the NULL value, an empty string is returned.

E.g.

String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\1.mdb;";
String selectString = "SELECT SearchText, LeftPos, TopPos, RightPos, BottomPos from SearchPositions WHERE ElementName = 'DocID'";
PrepareRecordset(connectionString, selectString);
Int recordCount = RecordCount(connectionString, selectString);
String searchString;
RectArray searchArea = RectArray();
for recordIndex from 0 to recordCount - 1 {
StringArray recordArray = Record(connectionString, selectString, recordIndex);
if recordIndex == 0 then {
searchString = recordArray.GetAt(0);
} else {
searchString = searchString + "|" + recordArray.GetAt(0);
}
searchArea.Add(Rect(StrToInt(recordArray.GetAt(1)) * dt, StrToInt(recordArray.GetAt(2)) * dt,StrToInt(recordArray.GetAt(3)) * dt, StrToInt(recordArray.GetAt(4)) * dt));
}
SearchText: searchString;
RSA: searchArea;

In this example, a search string SearchText and coordinates of rectangles for the search area LeftPos, TopPos, RightPos, BottomPos are extracted from the SearchPositions table. The value of the SearchText field is combined into a search string by using the "|" operator. The LeftPos, TopPos, RightPos and BottomPos coordinates from the table fields are used to generate coordinates in dots for the rectangles. Generated coordinates are added to the search area of the DocID element.

String Chr( Int )

Returns a string using the specified Unicode code of the character (code must be written in decimal system).

String LCase( String )

Returns a string obtained from the specified string by changing all of its characters to lower case.

String ReadSingleStringFromXML( String filename, String xPathQuery )

Reads the string from the “filename” XML file. The string is obtained by calculating the passed xPath query “xPathQuery.”

String RealToStrVariants( Real value, String fractionalPartSeparators, Int maxDigitsCountInFractionalPart = 2 )

Creates string representations, separated by a vertical bar (“|”), for the specified real number “value,” decimal separators fractionalPartSeparators, and the maximum number of digits in the fractional part. For example, for the arguments 19, ".,", 2 the result is "19|19.0|19.00|19,0|19,00".

String Str( Int );

String Str( Logic );

String Str( Real );

String Str( XInterval );

String Str( YInterval );

String Str( DistInterval );

String Str( FuzzyRect );

String Str( Hypothesis );

String Str( RectArray );

String Str( Region );

String Str( Area );

String Str( Quality );

String Str( Distance );

String Str( PageInterval ).

String representation of a data type.

String RemoveSpaces( String )

Returns a string obtained from the specified string by removing all of the spaces in the string.

String UCase( String )

Returns a string obtained from the specified string by changing all of its characters to upper case.

Void PrepareRecordset( String connectionString, String selectString, Int maxRecordsCount = 1000 )

Prepares the request for quick access. E.g. See the example for the Record function below.

Void SetPagesCount( Int pagesCount )

Sets the number of pages in the document. It is used in “Pre-search” or “Post-search advanced code” sections. This function must be invoked from the Header or Footer elements or their sub-elements. The function applies to documents that do not have the end-of-document indicator (the footer is either missing or optional).

E.g.

If the given element was matched – the document ends on the next page:

if IsFound then SetPagesCount(PagesCount + 1);

The number of pages in the document can be seen in the PageNum field:

if PageNum.IsFound and IsInt(PageNum.Value) then SetPagesCount: StrToInt(PageNum.Value);

XCoordinate Min( XCoordinate x1, XCoordinate x2 )

Returns the minimum value from x1, x2.

XCoordinate Max( XCoordinate x1, XCoordinate x2 )

Returns the maximum value from x1, x2.

XCoordinate MiddleBetween( XCoordinate x1, XCoordinate x2 )

Returns the X-coordinate calculated as ( x1+ x2 ) / 2.

XCoordinate Between( XCoordinate x1, XCoordinate x2, Real ratio )

Returns the X-coordinate calculated as x1+ ( x2 – x1 ) * ratio.

YCoordinate Min( YCoordinate y1, YCoordinate y2 )

Returns the minimum value from y1, y2.

YCoordinate Max( YCoordinate y1, YCoordinate y2 )

Returns the maximum value from y1, y2.

YCoordinate MiddleBetween( YCoordinate y1, YCoordinate y2 )

Returns YInterval calculated as ( y1+ y2 ) / 2.

YCoordinate Between( YCoordinate y1, YCoordinate y2, Real ratio )

Returns YInterval calculated as y1+ ( y2 – y1 ) * ratio.

XInterval MiddleBetween( Xinterval x1, XInterval x2 )

Returns XInterval calculated as ( x1+ x2 ) / 2.

XInterval Between( Xinterval x2, Xinterval x2, Real ratio )

Returns XInterval calculated as x1+ ( x2 – x1 ) * ratio.

YInterval MiddleBetween( Yinterval y1, Yinterval y2 )

Returns YInterval calculated as ( y1+ y2 ) / 2.

YInterval Between( Yinterval y1, Yinterval y2, Real ratio )

Returns YInterval calculated as y1+ ( y2 – y1 ) * ratio.

The following functions invoke pre-recognition during FlexiLayout matching. The text lines intersecting with a given pre-recognition area are recognized as a whole (including the line parts that fall out of the area boundaries).

Void RecognizeText()

Recognizes text in the relative rectangle specified in the “Pre-recognition area” property in the project settings. All document pages are included in the recognition.

Void RecognizeText( IntArray pages )

Recognizes text in the relative rectangle specified in the “Pre-recognition area” property in the project settings. Only the pages specified by the “pages” part of the string are included in the recognition.

Void RecognizeText( SearchAreaPageSetType pageSetType )

Recognizes text in the relative rectangle specified in the “Pre-recognition area” property in the project settings. Only the pages specified by the “pageSetType” part of the string are included in the recognition.

Void RecognizeText( Rect rect )

Recognizes text in the “rect” rectangle.

Void RecognizeText( Rect rect, IntArray pages )

Recognizes text in the “rect” rectangle. Only the pages specified by the “pages” part of the string are included in the recognition.

Void RecognizeText( Rect rect, SearchAreaPageSetType pageSetType )

Recognizes text in the “rect” rectangle. Only the pages specified by the “pageSetType” part of the document.

Void RecognizeText( RectArray rectArray )

Recognizes text in the “rectArray” array of rectangles.

Void RecognizeText( RectArray rectArray, IntArray pages )

Recognizes text in the “rectArray” array of rectangles. Only the pages specified by the “pages” part of the string are included in the recognition.

Void RecognizeText( RectArray rectArray, SearchAreaPageSetType pageSetType )

Recognizes text in the “rectArray” array of rectangles. Only the pages specified by the “pageSetType” part of the string are included in the recognition.

Void RecognizeText( Region region )

Recognizes text in the “region” region.

Void RecognizeText( Region region, IntArray pages )

Recognizes text in the “region” region. Only the pages specified by the “pages” part of the string are included in the recognition.

Void RecognizeText( Region region, SearchAreaPageSetType pageSetType )

Recognizes text in the “region” region. Only the pages specified by the “pageSetType” part of the string are included in the recognition.

RectArray RecognizedRects()

A debugging function allowing printing of an array of pre-recognized rectangles.


Functions for working with named parameters

Show/Hide Hidden Text

ABBYY FlexiLayout Studio allows you to specify output parameters for a FlexiLayout. When applying this FlexiLayout, its output parameters will be passed to the FlexiLayout that will be applied next.

note Note.Named parameters can also be passed from a main FlexiLayout to an additional FlexiLayout.

You can specify the output parameters in the Expression field in the properties dialog box of a block.

The table below describes the functions you can use to work with named parameters.

Definition

Description

SetOutputParameterInt

SetOutputParameterIntArray

SetOutputParameterString

SetOutputParameterStringArray

SetOutputParameterRect

SetOutputParameterRectArray

Set an output named parameter.

note Note.You can also set an output named parameter in the FlexiLayout properties dialog box.

NamedParameterIntExists

NamedParameterIntArrayExists

NamedParameterStringExists

NamedParameterStringArrayExists

NamedParameterRectExists

NamedParameterRectArrayExists

Check if an output named parameter exists.

GetNamedParameterInt

GetNamedParameterIntArray

GetNamedParameterString

GetNamedParameterStringArray

GetNamedParameterRect

GetNamedParameterRectArray

Get a named parameter.

Example

Rect outputRect;

if
GetNamedParameterRectArray( "RectArray" ).Count() > 1
then
outputRect = Rect( 394*dot, 816*dot, 2103*dot, 2247*dot ); //[, , , ]
else
outputRect = Rect( 591*dot, 1078*dot, 2453*dot, 1219*dot ); //[, , , ]

OutputRegion = outputRect;


Advanced pre-search functions

Controlling searches

Specifying the search area

Nearest functions


Controlling searches

Definition | Description
Void Optional( Real q1, Real q2 ) | Makes an element optional. The q1 parameter sets the quality of the null hypothesis. The q2 parameter sets the criterion for formulating the null hypothesis: the null hypothesis will be formulated if no other hypotheses are created whose qualities exceed a certain threshold.
Void StopIfFound ( Logic Value=true ) | Stops generating hypothesis in the branch if it contains a non-null hypothesis for the given element. For more information, see the Required, optional, and prohibited elements section.
Void DontFind() | Tells the program not to look for an element. If the element is optional, only the null hypothesis will be formulated.
Void MaxHypothesesCount( Int ) | Sets the maximum number of hypotheses for an element.


Specifying the search area

Search constraints

Geometry of the search area

Fuzzy rectangle

Functions which limit the search area

Functions which create a fuzzy rectangle

Debugging functions which return information about the search area


Search constraints

The search area constraints are set on the Search Constraints and the Relations tabs in the Properties dialog box, and in the Advanced pre-search relations section. Before the constraints have been applied, the search area coincides with the rectangle of the page. First, the program applies the constraints set on the Search Constraints and the Relations tabs. Next, the program applies the additional constraints set in the Advanced pre-search relations section.

The following types of constraint can be set in the Advanced pre-search relations section:

1.The search area can be limited to a rectangle (Rect variable), to a region (i.e. a continuous array of rectangles – Region variable), or to an array of rectangles which, in the general case, need not be continuous (RectArray variable). This type of constraint is set using the RestrictSearchArea function and by specifying a parameter of the corresponding type.
Any expressions which return values of the required type can be specified as parameters.

2.The search area can be limited to a half-plane located to the left of, to the right of, above, or below a particular point. Such constraints are set using the Leftof, Rightof, Above, and Below functions.

3.Sometimes you may wish to set constraints for an element boundary. For example, it may be known beforehand that the left boundary of an element is always located in the left-hand part of the image, whereas the right boundary may stretch indefinitely to the right.
The FlexiLayout language allows you to set such constraints at the stage of calculating the search area, thereby narrowing the range of possible hypotheses for an element. Such constraints are set using the LeftBound, RightBound, topBound, and BottomBound functions and the operators ">" and "<". The LeftBound and RightBound functions are used to access the left and right boundaries of the search area, and the topBound and BottomBound functions are used to access the top and bottom boundaries respectively.

4.You can set search constraints by excluding a rectangle, an array of rectangles, a hypothesis etc. from the search area. This can be done by using the Exclude, ExcludeRect, and ExcludeSet functions.

You can specify any number of search constraints of the above types in the Advanced pre-search relations section. Each constraint will create a region on the image. All the regions created by the constraints will be intersected.

Additionally, the calculated search area for the element will be intersected with the search area for the Group element of which this element is a member.


Geometry of the search area

Imagine, for the sake of convenience, that no search constraints are specified on the Search Constraints and the Relations tabs for the element and its parent Group elements. In this case, before the program applies the constraints from the Advanced pre-search relations section, the search area of the element will coincide with the rectangle of the page. If there are no additional constraints on the Advanced tab, the program will look for the element on the entire page.

Applying constraints of type 1, 2, and 4 described in Search Constraints above will create a search area consisting of an array of rectangles. The program will take the search area to consist of one rectangle circumscribing the entire array, from which a specified set of rectangles (excluded rectangles) must be excluded.

Applying the search constraints of type 3 described in Search Constraints above will create a range of allowed coordinates for each boundary of the hypotheses – left, right, top, and bottom. Each of the boundaries is characterized by a range of coordinates on the corresponding axis, e.g. [x1, x2] or [y1, y2]. Here x1 and x2 are of type XCoordinate, and y1 and y2 are of type YCoordinate. The section of the axis must meet the following condition: x1 <= x2 for the X-coordinates, and y1 <= y2 for the Y-coordinates.

If several constraints are consecutively applied to a boundary, each constraint will change the range of allowed coordinates for the boundary.

Let the Advanced pre-search relations section contain the following constraints:

·LeftBound > 5mm;

·LeftBound < 15mm;

·LeftBound < 10mm;

Let the search area coincide with the rectangle of the page, i.e. [PageRect.Left, PageRect.top, PageRect.Right, PageRect.Bottom], before the above constraints are applied. Then the ranges of the coordinates of the element boundaries will be:

Let the search area not be specified prior to executing these constraints. Then, in the case of a one-page FlexiLayout (the minimum and maximum allowed number of pages in a document is 1), the search area coincides with the rectangle of the page [PageRect.Left, PageRect.Top, PageRect.Right, PageRect.Bottom]. In the case of a multi-page FlexiLayout, the search area has the maximum size of [-INF, -INF, INF, INF]. The coordinate ranges of the element boundaries will be as follows:

Boundary | Range for one-page FlexiLayout | Range for multi-page FlexiLayout
LeftBound | [PageRect.Left, PageRect.Right] | [-INF, INF]
TopBound | [PageRect.Top, PageRect.Bottom] | [-INF, INF]
RightBound | [PageRect.Left, PageRect.Right] | [-INF, INF]
BottomBound | [PageRect.Top, PageRect.Bottom] | [-INF, INF]

When the constraint LeftBound > 5mm is executed, only the left boundary changes. The range of its possible values becomes the segment [5mm, PageRect.Right] for one-page FlexiLayouts and the segment [5mm, INF] for multi-page FlexiLayouts.

After the LeftBound > 5mm constraint is applied, only the left boundary will change – its allowed coordinates will be [5mm, PageRect.Right].

After the LeftBound < 15mm constraint is applied, the range of allowed coordinates of the left boundary will be [5mm, 15mm].

After the LeftBound < 10mm constraint is applied, the range of allowed coordinates of the left boundary will be [5mm, 10mm].

Similarly you can set constraints for other boundaries of the element.

The specified boundaries of the search area from a so-called fuzzy rectangle.


Fuzzy rectangle

Show/Hide Hidden Text

Fuzzy rectangle is a structure that describes a class of rectangles whose boundaries lie within specific allowed ranges. A fuzzy rectangle consists of two rectangles – an external rectangle and an internal rectangle.

In the FlexiLayout language, fuzzy rectangles are represented by type FuzzyRect.

As can be seen in Figure below, in the general case, when constraints for all the boundaries are set, there is a part of the search area that must fall within any hypothesis for the element. It is this part that forms the internal rectangle. The maximum-size circumscribing rectangle of the possible hypothesis forms the external rectangle.

Show me...

Rectangle

Let the boundaries of the element be:

LeftBound: [L1, L2], where L1 <= L2
TopBound: [T1, T2], where T1 <= T2
RightBound: [R1, R2], where R1 <= R2
BottomBound: [B1, B2], where B1 <= B2

Then the fuzzy rectangle containing the information about the specified boundaries will be formed as follows: InternalRect: [L2, T2, R1, B1], ExternalRect: [L1, T1, R2, B2].

If the user sets no constraints for the boundaries of the search area, the internal rectangle degenerates and makes no geometrical sense. In this case L1=R1, L2=R2, T1=B1, T2=B2.

Suppose now that no constraints have been specified for the search area. Then, if the maximum and minimum allowed number of pages is 1, the fuzzy rectangle of the search area will be created as follows:

LeftBound: [PageRect.Left, PageRect.Right]
TopBound: [PageRect.Top, PageRect.Bottom]
RightBound: [PageRect.Left, PageRect.Right]
BottomBound: [PageRect.Top, PageRect.Bottom]
InternalRect: [PageRect.Right, PageRect.Bottom, PageRect.Left, PageRect.Top]
ExternalRect: [PageRect.Left, PageRect.Top, PageRect.Right, PageRect.Bottom]
and in the case of a multi-page document:
LeftBound: [-INF, INF]
TopBound: [-INF, INF]
RightBound: [-INF, INF]
BottomBound: [-INF, INF]
InternalRect: [INF, INF, -INF, -INF]
ExternalRect: [-INF, -INF, INF, INF]

As can be seen from the above expressions, the external rectangle coincides with the rectangle of the entire page, and the internal rectangle degenerates and has negative height and width.

Fuzzy rectangles can be united and intersected. When two fuzzy rectangles are intersected, their corresponding boundaries intersect: the right boundary of one rectangle intersects with the right boundary of the other, the left with the left, etc. This creates new ranges for the boundaries:

LeftBound: [L1’, L2’]
TopBound: [T1’, T2’]
RightBound: [R1’, R2’]
BottomBound: [B1’, B2’]

The resulting fuzzy rectangle will be created using the resulting intervals: InternalRect: [L2’, T2’, R1’, B1’], ExternalRect: [L1’, T1’, R2’, B2’].

If, as a result of the intersection, at least one of the conditions for creating the fuzzy rectangle (L1 <= L2, T1 <= T2, R1 <= R2, B1 <= B2) is not met, the resulting fuzzy rectangle will be nullified: InternalRect: [0, 0, 0, 0], ExternalRect: [0, 0, 0, 0]. Usually an empty fuzzy rectangle is created as a result of contradictory conditions, e.g. if you attempt to intersect two fuzzy rectangles whose external boundaries do not intersect.

Fuzzy rectangles are united in the same way: first, the ranges of each boundary are united. As a result of uniting the two ranges, a minimum range is created which contains both specified ranges. After the boundaries have been united, a new fuzzy rectangle is formed.

In practice you will most often encounter fuzzy rectangles with a degenerated internal rectangle. Only on rare occasions will you need to set constraints on a specific boundary. However, the search area for an element is always represented by a fuzzy rectangle and an array of excluded rectangles.


Functions which limit the search area

Show/Hide Hidden Text

The functions listed in the table below can only be used in the Advanced pre-search relations section. Each function specifies a fuzzy rectangle for the search area or adds rectangles to an array of excluded rectangles.

Function

Description

Void Leftof( XInterval x, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the left of the point x.End - offset.

Void Leftof( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the vertical half-plane to the left of the point fuzzyRect.Left.End – offset.

Void Leftof( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the left of the point hyp.Left.End - offset.

Void LeftOf( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the vertical half-plane to the left of the point hyps.Left.End – offset. Global coordinates are used.

Void Rightof( XInterval x, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the right of the point x.Start + offset.

Void Rightof( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the vertical half-plane to the right of the point hyp.Right.Start + offset.
E.g.

You can specify that the element search area is located to the right of the intersection area which is formed by the Element1 and Element2 fuzzy rectangles.

FuzzyRect intersection = Element1.FuzzyRect AND Element2.FuzzyRect; RightOf: intersection;

Void Rightof( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the right of the point hyp.Right.Start + offset.

Void RightOf( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the vertical half-plane to the right of the point hyp.Right.Start + offset. Global coordinates are used.

Void Above( YInterval y, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located above of the point y.End - offset.

Void Above( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the horizontal half-plane above the point hyp.top.End – offset.

Void Above( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located above of the point hyp.top.End - offset.

Void Above( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the horizontal half-plane above the point hyp.top.End – offset. Global coordinates are used.

Void Below( YInterval y, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located below of the point y.Start + offset.

Void Below( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the horizontal half-plane below the point hyp.Bottom.Start + offset.

Void Below( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located below of the point hyp.Bottom.Start + offset.

Void Below( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the horizontal half-plane below the point hyp.Bottom.Start + offset. Global coordinates are used.

Void Exclude( Hypothesis hyp )

Excludes the region of the hyp hypothesis from the search area. If the hyp hypothesis is not found, excludes the internal rectangle of the search area of the hyp hypothesis.

Void Exclude( Rect rect )

Excludes the rect rectangle from the search area.

Void Exclude( RectArray rectArray )

Excludes the rectArray array of rectangles from the search area.

Void ExcludeRect( XInterval left, YInterval top, XInterval right, YInterval bottom )

Excludes the fuzzy rectangle described by the ranges left, top, right, and bottom from the search area.

Void ExcludeSet( ImageObjectSet set )

Excludes from the search area the array of rectangles of the set set of objects.

Void Exclude( HypothesisInstances )

Excludes from the search area the region of the instances of the hypothesis.

Void RestrictSearchArea( FuzzyRect fuzzyRect )

Limits the search area to the fussy rectangle fuzzyRect. Global coordinates are used.

Void RestrictSearchArea( FuzzyRect, IntArray pages )

Limits the search area by the fuzzy rectangle fuzzyRect. Specify the local coordinates and page range pages.

Void RestrictSearchArea( FuzzyRect, SearchAreaPageSetType )

Limits the search area by the fuzzy rectangle fuzzyRect. Specify the local coordinates and page range of the type SearchAreaPageSetType.

Void RestrictSearchArea( RectArray rectArray )

Limits the search area to the array of rectangles rectArray. Global coordinates are used.

E.g.

You can specify that the boundaries of the search area of the current element are defined by the boundaries of the rectangles of the elements ElementName1, ElementName2, and ElementName3. If any of the elements are not detected, when accessing this function, the search area of the current element will be defined by the boundaries of the search areas of the corresponding elements.

RestrictSearchArea: RectArray(ElementName1.Rect or ElementName2.Rect or ElementName3.Rect);

Void RestrictSearchArea( RectArray, IntArray pages )

Limits the search area by the array of rectangles rectArray. Specify the local coordinates and page range pages.

Void RestrictSearchArea( RectArray, SearchAreaPageSetType )

Limits the search area by the array of rectangles rectArray. Specify the local coordinates and page range of the type SearchAreaPageSetType.

Void RestrictSearchArea( Region region )

Limits the search area to the region region. Global coordinates are used.

E.g.

You can specify that the search area of the current element is limited by the region of the element ElementName.

RestrictSearchArea: ElementName.Region;

Void RestrictSearchArea( Region, IntArray pages )

Limits the search area by the region. Specify the local coordinates and page range pages.

Void RestrictSearchArea( Region, SearchAreaPageSetType )

Limits the search area by the region. Specify the local coordinates and page range of the type SearchAreaPageSetType.

E.g.

You can specify that the element must be searched for in the search area on even pages.

RestrictSearchArea: searchArea, EvenPages;

Void RestrictSearchArea( SearchAreaPageRestriction pageRestriction, IntArray pages )

Limits the page range on which to search without limiting the search area on the pages themselves. The pageRestriction parameter acquires the only value: WholePage.

E.g.

You can specify that the element must be searched for on pages 2, 4, 7-9.

RestrictSearchArea: WholePage, 2 << 4 << 7 << 8 << 9;

Void RestrictSearchArea( SearchAreaPageRestriction pageRestriction, SearchAreaPageSetType )

Limits the page range on which to search without limiting the search area on the pages themselves. The pageRestriction parameter acquires the only value: WholePage.
E.g.

You can specify that the element must be searched for on the last page.

RestrictSearchArea: WholePage, LastPage;

note Note.You can use RSA alias instead of full name RestrictSearchArea.

note Note.Different constraints for the same page are used jointly, and for different pages independently. (The search is carried out on the pages for which at least one constraint has been specified.)

Auxiliary functions that define the search area

Rect PageRect()

The rectangle of the current page in global coordinates used to specify a search area that depends on the page.

The PageRect can only be used to specify a search area.

E.g.

To specify that the element is located in the bottom half of a page (the exact page is not known in advance), write:

Below: PageRect.Top + PageRect.Height / 2;

In all other cases use the construction Page( N ).Rect to get the rectangle of the page number N or DocumentRect to get the rectangle of the entire document. You can also use the PageNumber function to specify a search area that depends on the page.

Int PageNumber()

The number of the current page. Specifies a search area that depends on the page.
E.g.

Suppose you have a repeating element SearchElements.PageHeader. To search on each page below the instances of this element, write

Below: SearchElements.PageHeader.AllInstances.PageAreaGlobal( PageNumber ).FuzzyRect, 0 * dot;


Functions which create a fuzzy rectangle

The RestrictSearchArea( FuzzyRect fuzzyRect ) function described in Functions which Limit the Search Area allows you to limit the search area to any fuzzy rectangle.

The table below lists the functions that can be used to obtain a fuzzy rectangle.

Function

Description

HorSearchAreaBound LeftBound()

Used to set a constraint for the left boundary of the search area.

Expressions of type LeftBound() > XCoordinate return FuzzyRect.

VertSearchAreaBound TopBound()

Used to set a constraint for the top boundary of the search area.

Expressions of type topBound() > YCoordinate return FuzzyRect.

HorSearchAreaBound RightBound()

Used to set a constraint for the right boundary of the search area.

Expressions of type RightBound () > XCoordinate return FuzzyRect.

VertSearchAreaBound BottomBound()

Used to set a constraint for the bottom boundary of the search area.

Expressions of type BottomBound () > YCoordinate return FuzzyRect.

FuzzyRect AreaLeftOf( XInterval x, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the left of the point x.End – offset.

FuzzyRect AreaLeftOf( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the left of the point rect.Left.End – offset.

FuzzyRect AreaLeftOf( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the left of the point hyp.Rect.Left.End – offset.

FuzzyRect AreaLeftOf( HypothesisInstances hyps, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the left of the point hyps.Rect.Left.End – offset.

FuzzyRect AreaRightOf( XInterval x, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the right of the point x.Start + offset.

FuzzyRect AreaRightOf( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the right of the point rect.Right.Start + offset.

FuzzyRect AreaRightOf( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the right of the point hyp.rect.Right.Start + offset.

FuzzyRect AreaRightOf( HypothesisInstances hyps, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a vertical half-plane located to the right of the point hyp.Rect.Right.Start + offset.

FuzzyRect AreaAbove( YInterval y, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located above the point y.End - offset.

FuzzyRect AreaAbove( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located above the point rect.top.End - offset.

FuzzyRect AreaAbove( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located above the point hyp.rect.top.End - offset.

FuzzyRect AreaAbove( HypothesisInstances hyps, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located above the point hyp.Rect.top.End - offset.

FuzzyRect AreaBelow( YInterval y, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located below the point y.Start + offset.

FuzzyRect AreaBelow( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located below the point rect.Bottom.Start + offset.

FuzzyRect AreaBelow( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located below the point hyp.rect.Bottom.Start + offset.

FuzzyRect AreaBelow ( HypothesisInstances hyps, Distance offset = 0 )

Returns a fuzzy rectangle in global coordinates, which is a horizontal half-plane located below the point hyp.Rect.Bottom.Start + offset.

FuzzyRect ImageLeftOf( XInterval x, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the left of the point x.End – offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaLeftOf( XInterval x, Distance offset = 0 ).

FuzzyRect ImageLeftOf( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the left of the point rect.Left.End – offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaLeftOf( FuzzyRect rect, Distance offset = 0 ).

FuzzyRect ImageLeftOf( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the left of the point hyp.Rect.Left.End – offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaLeftOf( Hypothesis hyp, Distance offset = 0).

FuzzyRect ImageRightOf( XInterval x, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the left of the point x.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaRightOf( XInterval x, Distance offset = 0 ).

FuzzyRect ImageRightOf( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the right of the point rect.Right.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaRightOf( FuzzyRect rect, Distance offset = 0 ).

FuzzyRect ImageRightOf( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the right of the point hyp.rect.Right.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaRightOf( Hypothesis hyp, Distance offset = 0).

FuzzyRect ImageAbove( YInterval y, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the horizontal half-plane located above the point y.End - offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaAbove( YInterval y, Distance offset = 0 ).

FuzzyRect ImageAbove( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the horizontal half-plane located above the point rect.top.End - offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaAbove( FuzzyRect rect, Distance offset = 0 ).

FuzzyRect ImageAbove( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the vertical half-plane located to the left of the point hyp.rect.top.End - offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaAbove( Hypothesis hyp, Distance offset = 0 ).

FuzzyRect ImageBelow( YInterval y, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the horizontal half-plane located above the point y.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaBelow( YInterval y, Distance offset = 0 ).

FuzzyRect ImageBelow( FuzzyRect rect, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the horizontal half-plane located below the point rect.Bottom.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaBelow( FuzzyRect rect, Distance offset = 0 ).

FuzzyRect ImageBelow( Hypothesis hyp, Distance offset = 0 )

Returns a fuzzy rectangle, which is an intersection of the rectangle of the page and the horizontal half-plane located below the point hyp.rect.Bottom.Start + offset.

warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected documents has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.

For a multi-page document, use the function FuzzyRect AreaBelow( Hypothesis hyp, Distance offset = 0 ).


Debug functions which return information about the search area

The functions listed below are only available in the Advanced pre-search relations section.

These functions can be used for debugging prints. You can run print commands after specifying a set of instructions limiting the search area in order to see the results of these instructions.

Function | Description
FuzzyRect SearchArea() | Created search area – a fuzzy rectangle. Read-only.
RectArray ExcludedRects() | Array of rectangles excluded from the search area. Read-only.
PageArea PageSearchAreaLocal( Int PageNumber ) | Returns the search area that intersects the given page, in the local coordinates of the page.
PageArea PageSearchAreaGlobal( Int PageNumber ) | Returns the search area that intersects the given page, in global coordinates.

Example:

To print the search area of an element:

In the Advanced pre-search relations section, type the following code for the selected element:

Print: Str(SearchArea);

or equivalent code

Print: Str(SearchArea ());

The Str function converts the results into string format required for printing. The results (information about the coordinates and the size of the fuzzy rectangle of the selected element InternalRect and ExternalRect) will be displayed in the Properties window. To view the results, select the corresponding element in the tree of hypotheses and then point the mouse to the Pre-search print line in the Properties window. The Value may not fit within the Pre-search print line, but in the Pre-search print pane below the Properties window you will see the complete print results.

note Note.When printing the results of accessing the function ExcludedRects (Print: Str(ExcludedRects());), select the Pre-search print line in the Properties window to see the results.


Nearest functions

Show/Hide Hidden Text

Nearest functions tell the program that, other things being equal, it must select the hypothesis that is nearest to a certain element or point on the image that is specified by the parameters of the Nearest function. In the Advanced pre-search relations section of the element, you can use only one Nearest function. After the function is applied, only one hypotheses from a group of several hypotheses is selected. The selection occurs when hypotheses are being generated for the element, i.e. before the code entered in the Advanced post-search relations section is executed. For details, see Using Nearest and FuzzyQuality to search for elements.

Nearest functions can be used to select hypotheses for any kind of elements except Groups, Repeating Groups, and Tables.

Parameter

Description

Void NearestX( XCoordinate x )

Selects the hypothesis nearest to the vertical line which goes through the point ( x, 0 ).

E.g.

The code below specifies that the sought element is horizontally nearest to the right boundary of the ElementName element.

NearestX: ElementName.Right.Start;

Void NearestY( YCoordinate y )

Selects the hypothesis nearest to the horizontal line which goes through the point ( 0, y ).

E.g.

The code below specifies that the sought element is vertically nearest to the top boundary of the ElementName element.

NearestY: ElementName.Top.Start;

Void Nearest( XInterval x, YInterval y )

Selects the hypothesis nearest to the rectangle Rect( x.Start, y.Start, x.End, y.End ).

E.g.

The code below specifies that the sought element is closest to the center of the ElementName element.

Nearest: ElementName.XCenter, ElementName.YCenter;

The code below specifies that the sought element is closest to the center of the page.

Nearest: PageRect.XCenter, PageRect.YCenter;

Void Nearest( PageEdge )

Selects the hypothesis on each page of the document that is nearest to one of the page edges - top, bottom, right or left.

note Note.If several hypotheses are at the same distance from the specified boundary, several hypotheses may be selected.

E.g.

To specify that the current element is closest to the bottom edge of the page, write.

Nearest: PageBottom;

Void Nearest( Hypothesis hyp )

Selects the hypothesis nearest to the fuzzy rectangle hyp.Rect

E.g.

The code below specifies that the sought element is closest to the ElementName element.

Nearest: ElementName;

Void Nearest( HypothesisInstances )

Selects the hypothesis closest to the set of hypothesis for the specified Repeating Group element.


Advanced post-search functions

Controlling the quality of a hypothesis


Controlling the quality of a hypothesis

Parameter

Description

Quality FuzzyQuality(Area value, AreaFuzzyInterval interval)

Specifies a function for computing a penalty coefficient by which the quality of a hypothesis for the element should be multiplied. The function is calculated as the result of checking if the value “value” belongs to the fuzzy interval “interval.”

For details on how to use the FuzzyQuality function, see Tips and Tricks/Using Nearest and FuzzyQuality to look for elements.

Quality FuzzyQuality( DistInterval value, DistFuzzyInterval interval )

The function calculates the penalty coefficient by which the quality of the element hypothesis must be multiplied. The function checks whether the value value belongs to the fuzzy interval interval.

For more on the FuzzyQuality function, see Tips and Tricks/Using Nearest and FuzzyQuality to look for elements.

Quality FuzzyQuality( Int value, IntFuzzyInterval interval )

The function calculates the penalty coefficient by which the quality of the element hypothesis must be multiplied. The function checks whether the value value belongs to the fuzzy interval interval.

For more on the FuzzyQuality function, see Tips and Tricks/Using Nearest and FuzzyQuality to look for elements.

Quality Quality( Real )

Sets the penalty coefficient by which the quality of the element hypothesis must be multiplied.


Specifying element properties

You can change the properties of an element on the Advanced tab of the Advanced pre-search relations section. You can edit both properties you have set in the Properties dialog box of an element and some of the additional properties. See below for the list of properties you can edit in the Advanced pre-search relations section.

note Note.Any properties you set on the first two tabs preceding the Advanced tab in the Properties dialog box will be interpreted by the FlexiLayout Studio compiler as a sequence of operators which are the parameters (properties) of the corresponding elements described in this chapter. To view the code generated for a property, click the Code button on the Advanced tab.

You can edit and copy the code displayed on the Code tab or use it for writing your own code which employs "if", "then", and "else" operators.

Example:

The following checks whether elements Element1 and Element2 have been detected or not. If at least one of the elements have not been detected, the program is instructed to look for a vertical separator. Otherwise, the program should look for a horizontal separator.

If (Element1.IsNull == False) or (Element2.IsNull == False) then
Mode: Vertical;
Else
Mode: Horizontal;

Element properties are described in detail in the sections that follow.


Object Collection

Show/Hide Hidden Text

Parameter

Description

Void Type(ImageObjectType)

Sets the value of the Type parameter. See Dialogs. Element properties. Object Collection. Type.

E.g.

The code below sets a list of objects of type Barcode and pictures for the current Object Collection element

Type: BarcodeObject + PictureObject;

which is the same as:

Type (BarcodeObject + PictureObject);

Calling this property will find all the objects of the Barcode and Picture type in the search area of the element.

Void MinObjHeight( Distance )

See Object size. Min Height. You can use any units of measurement.

E.g.

The code below sets the minimum height to 10mm:

MinObjHeight (10mm);

Void MaxObjHeight( Distance )

See Object size. Max Height. You can use any units of measurement.

Void MinObjWidth( Distance )

See Object size. Min Width. You can use any units of measurement.

Void MaxObjWidth( Distance )

See Object size. Max Width. You can use any units of measurement.

Void WholeWordMode ( Logic )

This flag specifies whether only whole text objects should be considered as hypotheses. When set to True, hypotheses consisting of word parts are ignored. The flag is set to False by default.

note Note.Restrictions on the height and width of objects are applied to words if the flag is set to True and to characters if the flag is set to False.

Void UseRawText( Logic )

Enables the use in text searches of those unrecognized text-like objects that were assigned the type Raw Text during pre-recognition. To enable this feature, call the method with parameter True. By default, only recognized text is used in text searches (i.e. the parameter is set to False).

Void MaxXOutsidePart( Real )

Specifies the part of the object that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those objects are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the object that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those objects are included in the hypothesis that have the specified or smaller part outside the search area.


Character String

Show/Hide Hidden Text

Parameter

Description

Void AllowEmbeddedHypotheses( Logic )

See Character String. Allow embedded hypotheses.

E.g.

The code below tells the program that it must generate the longest hypothesis.

AllowEmbeddedHypotheses (False);

Void MinQuality( Real )

Sets the minimum quality of the hypothesis. Hypotheses whose quality is below this minimum will be discarded.

E.g.

The code below tells the program to ignore hypotheses whose quality is lower than 0.95.

MinQuality: 0.95;

Void MaxNonDefinedCount( Real )

See Character String. Percentage of non-alphabet characters.

E.g.

The code below tells the program that the string may contain up to 30% of characters which do not belong to any of the specified alphabets.

MaxNonDefinedCount (0.3);

Void MaxWordBreakCount( Real )

The maximum number of word ends in the line. The line is divided into words based on the Detect words by interword space parameter (see Element Properties dialog box, Character String tab). The parameter is specified as a ratio: [number of word ends]/[number of characters in the string].

Void MinInterwordSpace( Distance )

Enables division into words based on the width of the space (see Element Properties dialog box, Character String tab, Detect words by interword space) and specifies the minimum width of the space to Distance (Min interword space parameter).

Void WordsCount( Int, Int, Int, Int )

See Element Properties dialog box, Character String tab, Words count.

Void TotalChainLength( Int, Int, Int, Int )

See Character String, Characters Count.

E.g.

The code below tells the program to look for a line 5 to 10 characters long.

TotalChainLength (4, 5, 10, 11);

Void TotalGapLength( Distance, Distance, Distance, Distance )

Specifies the maximum allowed total length of spaces in the string as a fuzzy interval. Assess the quality of the hypotheses based on the total length of the spaces.

Void MaxGapInLine( Distance )

Sets the maximum distance between neighboring characters.

When generating a hypothesis, the program will add characters to the hypothesis until the distance between two neighboring characters does not exceed MaxGapInLine.

See also Character String, Character String, Max space length.

E.g.

The code below tell the program that the maximum distance between neighboring characters may not exceed 5 mm, otherwise a null hypothesis is generated.

MaxGapInLine (5mm);

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void AllowChoppedWords( Logic )

This flag specifies whether text objects which do not fit entirely within the left and right boundaries should be included into the hypothesis. The default value is True.

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void AddAlphabet( String alphabet, Real portion, Logic isRestrictionStrong )

Sets the alphabet and the allowed percentage of alphabet characters in the hypothesis. The flag isRestrictionStrong specifies whether exceeding the permissible rate of alphabet symbols must be considered as valid hypotheses:

·If the flag is set to True, hypotheses will be discarded when exceeding the permissible rate.

·If the flag is set to False, excess symbols will be considered to belong to no alphabet.

The default setting is True.

E.g.

The code below tells the program to add an alphabet which consists of the characters №, #, % and *, whose percentage in the hypothesis may not exceed 10%.

note Note.You can only add characters which are not part of any of the alphabets specified for the current element.

AddAlphabet ("№#%*", 0.1, True);

Void RegularExpression( String )

Sets the regular expression defining the text of the hypothesis.

E.g.

Below is a regular expression which looks for a string where characters may be arranged in one of two ways: 2 digits, - (hyphen), 1 digit or letter N, digit from 1 to 5, / (forward slash), 1 to 3 digits.

RegularExpression: ("([0-9]{2}[-][0-9])|([N][1-5][/][0-9]{1-3})");

which is the same as:

RegularExpression: ("([0-9]{2}\"-\"[0-9])|(\"N\"[1-5]\"/\"[0-9]{1-3})");

Void WholeWordMode ( Logic )

This flag specifies whether only whole words must be considered as valid hypotheses. If the flag is set to True, hypotheses made up of parts of words will be discarded. The default setting is False.

note Note.This property is different from AllowedChoppedWords in that AllowChoppedWords affects only formulation of hypotheses made up of words on the boundary of the search area, whereas WholeWordMode affects formulation of all hypotheses.

Void RegularExpressionFromDB( String connectionString, String selectString, Int maxRecordsCount = 1000 )

Uses a database to set the regular expression defining the text of the hypotheses (see Using databases and text files in the FlexiLayout language). The connectionString argument sets the string for connecting to the database. The selectString argument sets an SQL query, which starts with the SELECT command). To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000).

Void RegularExpressionFromFile( String fileName, Int maxRecordsCount = 1000 )

Uses a text file to set the regular expression defining the text of the hypotheses (see Using databases and text files in the FlexiLayout language). The fileName argument sets the name of the text file. To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000).

Void Width( Distance, Distance, Distance, Distance )

The width of the hypothesis specified as a fuzzy interval.

Void Height( Distance, Distance, Distance, Distance )

The height of the hypothesis specified as a fuzzy interval.

Void TrimSymbols( String )

Specifies the characters to be trimmed at the beginning and at the end of a hypothesis.

Void SimilarSymbolQuality( Real )

Specifies a coefficient by which the quality of a hypothesis should be multiplied if it includes a character from the list of characters that look like those in the alphabet.

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Static Text

Show/Hide Hidden Text

Parameter

Description

Void MinQuality( Real )

Sets the minimum quality of the hypothesis.

Void MaxErrors( Int )

Sets the maximum number of errors in the hypothesis.

See Max number of errors.

Void MaxErrorsPart( Real )

Sets the maximum percentage of errors in the hypothesis.

See Max error percentage.

Void MaxErrors( Int number, Real part )

Sets the maximum number of errors in the hypothesis: number – absolute number, part – percentage.
E.g.

The code below tells the program that the absolute number of errors may not exceed 3, and the percentage of errors may not exceed 20%.

MaxErrors (3, 0.2);

note Note.Out of the two conditions the program will use the strictest.

Void MaxGapInLine( Distance )

Sets the maximum distance between neighboring characters.

When generating a hypothesis, the program will add characters to the hypothesis until the distance between two neighboring characters does not exceed MaxGapInLine.

See also Character String, Character String, Max space length.

E.g.

The code below tells the program that the maximum distance between neighboring characters may not exceed 5 mm, otherwise a null hypothesis is generated.

MaxGapInLine (5mm);

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void AllowChoppedWords( Logic )

The flag specifies whether text objects which do not fit entirely within the left and right boundaries should be included into the hypothesis. The default value is True.

E.g.

The code below tells the program to look for the element only among the text objects which fit entirely within the search area.

AllowChoppedWords (False);

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void CaseSensitive( Logic Value=true)

Distinguishes between lowercase and uppercase letters if set to True.

Void IgnoreAccents( Logic value = true )

Ignores/does not ignore diacritics when searching for text. If the value is set to True, diacritics will be ignored (for example, the words "café" and "cafe" will be treated as identical).

Void SearchTextFromDB( String connectionString, String selectString, Int maxRecordsCount = 1000 )

Specifies the set of strings to be searched on an image with the help of a database (see Using databases and text files in the FlexiLayout language).

The connectionString argument sets the connection string for connecting to the database.

The selectString argument sets an SQL query, which starts with the SELECT command. The resulting set obtained by this query, which must contain only one field, represents phrase variants. In its simplest form, a query gets the required field from a specified database table. If a query returns more than one field, the data from the first field are used for the search.

To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000).

E.g.

SearchTextFromDB: "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\FCS\\DBKeywords.mdb", "SELECT Words FROM WordsTable", 500;

Void SearchTextFromFile( String fileName, Int maxRecordsCount = 1000 )

Specifies the set of strings to be searched on an image with the help of a fileName text file (see Using databases and text files in the FlexiLayout language).

To speed up the search, only the first maxRecordsCount variants are used (the default setting is 1000).

E.g.

SearchTextFromFile: "Keywords.txt", 500;

AllowIntersectPercent( Real )

Specifies the maximum allowed percentage of vertical overlap for two lines of text (the default setting is 15). You may want to use this parameter for texts with tight line spacing.

The following methods are only available if the text to find consist of one word

Void SearchText ( String )

Text to find.

The following methods are available if the text to find consists of several words

Void NextLinePenalty( Real )

See Static Text. Break line penalty.

Void OmissionPenalty( Real )

See Static Text. Missed words penalty.

Void WholeWordMode ( Logic )

The flag specifies whether only whole text objects must be considered as valid hypotheses. When set to True, hypotheses consisting of parts of words are ignored. The default setting is False.

note Note.This method is different from AllowChoppedWords in that AllowChoppedWords affects only hypotheses generated from words on the boundary of the search area, whereas WholeWordMode affects the generation of all hypotheses.

Void AllowEmbeddedHypotheses( Logic )

E.g.

The code below tell the program that its must formulate the longest hypothesis.

AllowEmbeddedHypotheses (False);

Void MaxLineBreakDistance( Distance )

The distance between the word in the next line and the previous line.

SuggestOnlySimilarChars( Logic value )

When set to true, only characters (hieroglyphs) with similar tracing are allowed as replacement characters in operations of insertion/deletion/replacement a character.

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Paragraph

Show/Hide Hidden Text

Parameter

Description

Void MaxGapInLine( Distance )

Sets the maximum distance between neighboring characters.

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxInterlineSpace( Distance )

The maximum distance between the lines.

Void MaxRelativeInterlineSpace( Real )

The maximum distance between the neighboring lines expressed as a percentage of the height of the top line.

Void MaxLineHeightSpread( Real )

The maximum variation in the height of the lines; calculated as the difference in height between the tallest line and the smallest line divided by the height of the tallest line.

Void MaxLineLengthSpread( Real )

The maximum variation in the length of the lines; calculated as the difference in length between the longest line and the shortest line divided by the length of the longest line.

Void MinHorLineOverlap( Real )

The minimum horizontal overlap of the neighboring lines; calculated as the length of the common segment of the lines divided by the length of the shortest line.

Void IgnoreSeparators( Logic )

This flag specifies whether to ignore separators during assembly of the paragraph. If the value is set to True, paragraphs that contain separators are not splitted.

Void MinLineWidth( Distance )

The minimum width of the line. Applies during concatenation of lines in a paragraph. Lines that do not satisfy the condition are excluded.

Void MaxLineWidth( Distance )

The maximum width of the line. Applies during concatenation of lines in a paragraph. Lines that do not satisfy the condition are excluded.

Void MinLinesCount( Int )

The minimum number of lines in the paragraph.

Void MaxLinesCount( Int )

The maximum number of lines in the paragraph. Applies during paragraph assembly. If the number of lines reaches the specified value, no more lines are added to the paragraph.

Void Alignment ( TextAlignment )

Sets the alignment type. Applies during the check after the paragraph assembly. Paragraphs with incorrect alignment are excluded. Admissible values:

·Alignment_None - alignment is not checked

·Alignment_Left - left alignment

·Alignment_Right - right alignment

·Alignment_Justified - justified

·Alignment_Center - center alignment

Void MaxAlignmentError( Distance )

The admissible error of alignment. Is calculated as the difference between the maximum and minimum coordinates of the corresponding line edge (the edge is defined by the alignment type).

Void AllowFirstLineIndent( Logic )

Specified whether the first line indent is allowed. When set to True, the first line can be indented for the Alignment_Left, Alignment_Right and Alignment_Justified alignment types. For the Alignment_Left and Alignment_Justified types, the left indent is allowed. For Alignment_Right, the right indent is allowed.

Void MaxFirstLineIndent( Distance )

The maximum allowed indent of the first line. If a negative value is specified, a hanging indent is allowed.

Void AllowLastHangingLine( Logic )

This flag specifies whether the paragraph can end with a shorter line. When set to True, the minimum length of last line of the paragraph is not restricted.

Void LinesCount( IntFuzzyInterval )

The number of lines in the paragraph.

Void FragmentWidth( IntFuzzyInterval )

The width of the paragraph in characters.

Void MaxLineHeight( Distance )

The maximum height of the characters (font size).

Void MinLineHeight( Distance )

The minimum height of the characters (font size).

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void AllowChoppedWords( Logic )

This flag specifies whether text objects which do not fit entirely within the left and right boundaries should be included into the hypothesis.

E.g.

The code below tell the program that it may look for the element among the text objects that only partially fit within the search area.

AllowChoppedWords (True);

Void MinQuality( Real )

Sets the minimum quality of the hypothesis.

Void FilterStamp( Logic )

See Paragraph properties. Paragraph tab. Remove stamp.

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Separator

Show/Hide Hidden Text

Parameter

Description

Void Mode( Direction )

Separator orientation. See Separator, Orientation.

E.g.

The code below tells the program that the separator is horizontal.

Mode: Horizontal;

Void MinQuality( Real )

Sets the minimum quality of the hypothesis.

Void MinRelativeLength ( Real )

Sets the minimum length of the separator which lies within the search area relative to the length of the search area. See Separator, Min relative length.

Void PenaltyLimitForLength( Real )

Specifies the minimum quality that the hypothesis may get for its length when calculating its quality (number from 0 to 1). The longer the separator object, the higher the quality. The highest quality of 1 has the separator whose length equals the length of the search area. As the relative length of the separator decreases from 1 to 0, the quality of the hypotheses decreases inn direct proportion from 1 to PenaltyLimitForLength.

note Note.This function was introduced to replace Void MaxPenalty( Real ), which is obsolete and will e removed from future versions. If you previously used Max length penalty, set PenaltyLimitForLength to (1 - [Max length penalty]).

See Element Properties dialog box, Separator tab.

Void MinSeparatorLength( Distance )

See Separator. Min length.

Void MaxSeparatorLength( Distance )

See Separator. Max length.

Void MaxSeparatorGap( Distance )

See Separator. Space. Max length.

E.g.

The code below tells the program that several horizontal separators located on one level must be considered as one separator if the gap between them does not exceed 20 dots.

Mode: Horizontal;
MaxSeparatorDistance (0mm);
MaxSeparatorGap(20dt);

Void MaxSeparatorRelativeGap( Real )

See Separator. Space. Max relative length.

Void MaxSeparatorGap( Distance d, Real r )

Sets absolute (d) and relative (r) constraints on the length of the space.

See Separator. Space. Max Length.

Void FitsWithinSearchArea( Logic )

Specifies that the separator must fit entirely within the search area.

See Separator, Fits entirely within search area property.

Void MaxSeparatorDistance( Distance )

See Separator. Space. Orthogonal shift.

E.g.

The code below tells the program that several vertical separators must be considered as one separator if the distance between them does not exceed 1 mm.

Mode: Horizontal;
MaxSeparatorDistance (1mm);


White Gap

Show/Hide Hidden Text

Parameter

Description

Void Mode( Direction )

White Gap orientation. See Element Properties dialog box, White Gap tab and the description of the White Gap properties.

E.g.

The code below tells the program to look for a vertical gap.

Mode: Vertical;

Void RelativeGapLevel( Real )

See White Gap. Relative upper threshold and the description of the White Gap properties.

Void MaxGapLevel( Distance )

See White Gap. Upper threshold and the description of the White Gap properties.

E.g.

The code below tells the program that the maximum gap level may not exceed 150 dots.

MaxGapLevel (150dt);

Void MinGapLevel( Distance )

See White Gap. Lower threshold and the description of the White Gap properties.

Void MinGapWidth( Distance )

See White Gap. Min width/height and the description of the White Gap properties.

E.g.

The code below tells the program that the minimum height of the horizontal gap is 50 dot.

Mode: Horizontal;
MinGapWidth (50dt);

Void Type(ImageObjectType )

Searches for a white gap among the objects of a particular type. (By default, the program will look for white gaps among any of the objects detected on the image.)
E.g.

The code below specifies that the program must look for white gaps only among text objects.

Type: AnyText+InvertedTextObject;

Void UseRawText( Logic )

Enables the use in text searches of those unrecognized text-like objects that were assigned the type Raw Text during pre-recognition. To enable this feature, call the method with parameter True. By default, only recognized text is used in text searches (i.e. the parameter is set to False).

More:

listPicture Hypotheses for White Gap elements


Barcode

Show/Hide Hidden Text

Parameter

Description

Void Type( BarcodeTypes )

See Barcode. Barcode Type.

E.g.

The code below tells the program that the barcode is of Interleaved 25 type.

Type: BarcodeType_Interleaved25;
Void Orientation( BarcodeOrientations )

Void Orientation( BarcodeOrientations )

See Barcode. Orientation.

E.g.

The code below tells the program that the barcode must be read left to right.

Orientation: BarcodeOrientation_LeftToRight;

Void MaxXOutsidePart( Real )

Specifies the part of the object that may extend beyond the search area horizontally. May assume values from 0 to 1. Those objects are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the object that may extend beyond the search area vertically. May assume values from 0 to 1. Those objects are included in the hypothesis that have the specified or smaller part outside the search area.


Date

Show/Hide Hidden Text

Parameter

Description

Void AddLanguage( String )

Adds a language to be used for detecting dates to the list of already specified language(s). The parameter should be a string specifying any of the supported languages: "English", "Czech", "Danish", "Dutch", "Estonian", "Finnish", "French", "German", "Greek", "Hungarian", "Italian", "Latvian", "Lithuanian", "Norwegian", "Polish", "Portuguese", "Russian", "Spanish", "Swedish", "Turkish".

Void DateFormat( DateFormats )

See Date. Format. Date.

E.g.

The code below tells the program that the date has the format MM/DD/YYYY

DateFormat: MonthDayYear;

Void DayFormat( DayFormatVariants )

See Date. Format. Day.

Void IgnoreAccents( Logic value = true )

Specifies whether diacritics should to be taken into account when looking for names of months. By default, diacritics are ignored.

Void Language( String )

See Date. Language.

Void MaxDate( String )

A string in the format DD/MM/YYYY which sets the Date parameter. See Date interval. To.

E.g.

The code below tells the program that the date lies between January 1, 2000 and December 31, 2004 (format is irrelevant).

MinDate: "01/01/2000";
MaxDate: "31/12/2004";

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis, that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis, that have the specified or smaller part outside the search area.

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void MinDate( String )

A string in the format DD/MM/YYYY which sets the Date parameter. See Date interval. From.

Void MinQuality( Real )

Sets the minimum quality of the hypothesis.

Void MonthFormat( MonthFormatVariants )

See Date. Format. Month.

E.g.

The code below tells the program that the month in the date may be written either as a word or as a two-digit number.

MonthFormat: DigitsWithLeadingZeroMonth + WordMonth;

Void Separators( String )

See Date. Separators.

E.g.

The code below tells the program that numbers in the date may be separated by dots (.) or forward slashes (/).

Separators: "./";

Void YearFormat( YearFormatVariants )

See Date. Format. Year.

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Currency

Show/Hide Hidden Text

Parameter

Description

Void AllowFractionalPartOmission( Logic )

Specifies whether the numerical value must have a fractional part.

See Currency dialog box, Allow missing fractional part property.

Void AllowSeparatorOmission( Logic )

Specifies whether the fractional part separator is required in the numerical value.

See Currency dialog box, Allow missing separator property.

Void CurrencyNames( String )

Specifies the possible currency names. The variants must be separated by a vertical bar (“|”).

See Currency dialog box, Currency name property.

E.g.

Currency: "USD|$|EUR|EURO";

Void CurrencyOmissionQuality( Real )

Sets the penalty for a missing currency name.

See Currency dialog box, Missing name penalty property.

Void CurrencyPosition( CurrencyPositionTypes )

Sets the location of the currency name – to the left or to the right of the numerical value.

See Currency dialog box, Currency name position property.

E.g.

CurrencyPosition: CurrencyPos_Left;

Void FindOnlyIntegers( Logic )

Finds only integers. Symbols set by the Separators function (or in the corresponding dialog box) will be ignored. AllowSeparatorOmission is automatically set to true and AllowFractionalPartOmission is automatically set to false.

Void MaximalValue( Real )

Sets the maximum numerical value.

See Currency dialog box, Maximum value property.

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void MinimalValue( Real )

Sets the minimum numerical value.

See Currency dialog box, Minimum value property.

Void Separators( String )

Sets the symbols which can be used to separate the integer and fractional parts of the numerical value.

See Currency dialog box, Possible fractional part separators property.

E.g.

Separators: ",.";

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Phone

Show/Hide Hidden Text

Parameter

Description

Void MinDigitsCount( Int )

Sets the minimum number of digits in the phone number.

See the Phone dialog box, Minimum number of digits property.

Void MaxDigitsCount( Int )

Sets the minimum number of digits in the phone number.

See the Phone dialog box, Maximum number of digits property.

Void Prefixes( String )

Sets the possible phone prefixes. Prefixes must be separated by commas. Commas may be followed by spaces.

See the Phone dialog box, Prefixes for phone numbers property.

E.g.

Prefixes: "tel, tel., phone";

Void PrefixOmissionQuality( Real )

Sets the penalty for a missing phone prefix.

See the Phone dialog box, Missing prefix penalty property.

Void Separators( String )

Sets the symbols used to separate digits in the phone number.

See the Phone dialog box, Possible digit separators property.

E.g.

Separators: "-/";

Void AddCodeDelimiters( String, String )

Sets the opening and closing brackets for the city code. The parameters of the function are one-character strings. The first parameter is an opening bracket, the second parameter is a closing bracket.

See the Phone dialog box, Area code/city code brackets property.

E.g.

AddCodeDelimiters: "{", "}";

Void PossibleDigitQuality( Real )

Sets the penalty for each missing wrong character in the phone number. The default value is 0.97.

Void UniformDigitStringQuality( Real )

Sets the penalty for a phone number which consists of only digits evenly distributed on the image. Used to distinguish telephone numbers from other sequences of digits, such as zip codes, account numbers, etc. The default value is 0.97.

Void MaxXOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area horizontally. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxYOutsidePart( Real )

Specifies the part of the character that may extend beyond the search area vertically. The part of the character is specified by a number from 0 to 1. Those characters are included in the hypothesis that have the specified or smaller part outside the search area.

Void MaxRelativeGapInLine( Real )

The maximum distance between neighboring characters expressed as a percentage of the line height.

Void AllowedTextRotations ( TextRotations )

Specifies a set of orientations of the recognized text in which an element search is allowed.


Table

Show/Hide Hidden Text

Parameter

Description

Column search parameters

Void AddHeaderKeyWord( String keyWord, TableBlockColumn column, Real omissionQuality, Logic wholeWordMode, Logic multiLine )

Specifies the keyword for the column name. See Table element dialog box, Column Properties, Detect by keyword in name option.

Void AddHeaderKeyHypothesis( Hypothesis hypothesis, TableBlockColumn column )

Specifies the column name by means of the detected hypothesis. See Table element dialog box, Column Properties, Use found element as column name option.

Void AddHeaderKeyHypothesis( DistInterval left, DistInterval top, DistInterval right, DistInterval bottom, TableBlockColumn column )

Specifies the coordinates of the column name.

Void AddColumnType( TableColumnType type, TableBlockColumn column, String regExp )

Specifies the column type. The third parameter must only be specified if the column type is a regular expression. See Table element dialog box, Column Properties, Type of column content property.

Void ColumnOmissionQuality( Real quality, TableBlockColumn column )

If fixed column orders are used, it sets the penalty for the hypotheses. The coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the column specified in the fixed column order is not detected.

If the parameter is not set, its default value is 0.9.

Void MissingContentPenalty( Real quality, TableBlockColumn column )

Sets the penalty for the hypotheses. The coefficient (a number from 0 to 1) by which the quality of the hypothesis will be multiplied if the actual data type in the column does not coincide with the data type specified by the user. (See Table element dialog box, Column Properties, Missing content penalty.) If the parameter is not set, its default value is 0.98.

If column order rules are used, it specifies the penalty for the absence of the column in the table.

Void ColumnBounds( Distance left, Distance right, TableBlockColumn column )

Sets the right and left boundaries of the search area used to search for the column. See Table element dialog box, Column Properties, Absolute area constraints.

Void ExactColumnBorders( XCoordinate left, XCoordinate right, TableBlockColumn )

Sets the exact column boundaries.

note Note.This parameter can be used to search for a table where the location of some (or all) of the columns is known in advance.

Parameters setting the column order

Void AddPossibleColumnsOrder( String orderName, TableBlockColumnArray array )

Specifies one of the variants of fixed column order. See Table element dialog box, Order tab, Fixed column order option.

Void ColumnsRelation( TableBlockColumnArray )

Specifies one rule for the column order. See Table element dialog box, Order tab, Rules for column order option.

Header search parameters

Void HasHeader( Logic )

Specifies whether the program should look for a header. See the Table element dialog box, Header tab, Look for header.

Void HeaderOptional( Real q1, Real q2 )

Specifies whether the header is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.

Void HeaderSearchArea( Rect )

Specifies the search rectangle for the header. If this function is used, the search area of the header will be calculated as the intersection of this rectangle and the one enclosing the search area of the whole table. See Table element dialog box, Header tab, Absolute area constraints.

Void MaxHeaderHypothesesCount( Int )

Sets the maximum number of hypotheses to be generated during header search. See Table element dialog box, Header tab, Number of hypotheses for header.

Void MinHeaderKeyElements( Int )

Sets the minimum number of key elements required to detect the header. The default value is 2.

Void ExtendHeaderLocalization( XInterval, YInterval, XInterval, YInterval )

Extends the localization area of the header. For example, it can be used to discard the line of unwanted information located between the header and the body of the table.

Footer search parameters

Void HasFooter( Logic )

Specifies whether the program should look for the footer. See Table element dialog box, Footer tab, Look for footer.

Void FooterOptional( Real q1, Real q2 )

Specifies whether the footer is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.

Void FooterSearchArea( Rect )

Specifies the search rectangle for the footer. If this function is used, the footer search area will be calculated as the intersection of this rectangle and the one enclosing the search area of the whole table. See Table element dialog box, Footer tab, Absolute area constraints.

Void FooterHasTopSeparator()

Specifies that there is a separator between the footer and the body of the table. The separator can be a part of a table boundary.

FooterWholeWordMode ( Logic )

This flag is used when looking for a footer based on keywords. If this flag is set to True, hypotheses made up of only word parts are discarded. The default setting is False. See Table element dialog box, Footer tab, Whole words only option.

Void FooterNearestToTop ( Logic )

This flag is used when looking for a footer based on keywords. If this flag is set to True, the program selects the topmost candidate and discards the rest. If this flag is set to False, the program considers all the possible candidates.

The quality of the footer contributes to the quality of the table and then the table hypothesis with the highest quality is selected.

The default setting is True.

Void AddFooterKeyWord( String )

Specifies a keyword for the footer of the table. See Table element dialog box, Footer tab, Search by keyword option.

Void AddFooterKeyHypothesis( Hypothesis )

Specifies the footer of the table by means of the detected hypothesis. See Table element dialog box, Footer tab, Use found element option.

Void AddFooterKeyHypothesis( XInterval, YInterval, XInterval, YInterval )

Specifies the coordinates of the footer of the table.

Body search parameters

Void DontFindBody()

Allows skipping the body search. Used for debugging.

Void BodyOptional(Real q1, Real q2 )

Specifies whether the body is optional, similarly to the Void Optional ( Real q1, Real q2 ) function for elements.

Void IgnoreVerticalSeparators()

Ignores vertical separators in the body of the table when dividing the table into columns (by default, separators are taken into account).

Void IgnoreSeparatorsFromHeader()

Ignores vertical separators in the header of the table at the column detection when dividing the table into columns (by default, vertical separators are taken into account).

Void AutoDetectTopAndBottom( Logic )

Search for the top and bottom boundaries of the table automatically. The default setting is true. If the flag is set to false, the entire text inside the search area of the table element is used.

Rows detection parameters

Void SingleLineTable( Logic )

Tells the program that each line of text must correspond to one row in the table. See Table element dialog box, Rows tab, One line of text corresponds to one row check box (if the option Detect rows automatically is selected).

Void SingleLineMasterColumn( Logic )

Tells the program that each line of text must correspond to one row in the master column of the table. See Table element dialog box, Rows tab, One line of text corresponds to one row check box (if the option Use master columns to detect rows is selected).

Void MaxRowVerticalGap( Distance )

Specifies the maximum vertical distance between two rows in the table. If the specified distance is exceeded, this means the end of the body of the table. By default, this distance is not limited.

Void MinRowVerticalGap( Distance )

Specifies the minimum vertical distance between two rows in the table. If the distance is smaller than the specified distance, the rows are merged into one. The default value is 0.

Void MaxMasterColumnRowGap( Distance )

Specifies the maximum vertical distance between two rows in the master column of the table. If the specified distance is exceeded, this means the end of the body of the table. By default, this distance is not limited.

Void MinMasterColumnRowGap( Distance )

Specifies the minimum vertical distance between two table rows in a particular column. If the distance is smaller than specified, the rows are merged into one. The default distance is 0.

Void IgnoreHorizontalSeparators()

Ignores horizontal separators when dividing the table into rows.

Void DivideRowsBySeparators()

Detects rows relying on separators only and ignoring text.

Void DivideRowsByMasterColumn( TableBlockColumn )

Tells the program to use the text of the column when dividing the table into rows. This function can be called multiple times. If a table on an image does not have the required column, the column from the next call of the function is used, etc. If all the columns are unavailable, the rows are detected in the whole table. See Table element dialog box, Rows tab, Use master columns to detect rows option.

Void MasterColumnTextAlignment( TextAlignmentInTableCell )

Specifies text alignment in a table cell in the Master Column. Can be TextAlignment_CellTop or TextAlignment_CellBottom.

Example:

MasterColumnTextAlignment: TextAlignment_CellBottom; - the text is aligned to the bottom border of the cell.

Void AddStopWord( String )

Specifies the words for which separate rows must not be drawn. See Table element dialog box, Rows tab, Stop words.

Void RowSplitters( YCoordinateArray, Logic isBodyTopIncluded = true, Logic isBodyBottomIncluded = true )

Specifies separators to divide the table into rows:

·isBodyTopIncluded == true - specifies the top of the table body

·isBodyBottomIncluded == true - specifies the bottom of the table body

·isBodyTopIncluded == false - the top of the table body is detected automatically

·isBodyBottomIncluded == false - the bottom of the table body is detected automatically

Any specified separators outside the table search area are ignored.

E.g.

let yArray = RepeatingGroup.AllInstances.GetYArray(1);
RowSplitters( yArray );

Multi-page table parameters

Void HeaderOnEachPage( Logic has = true )

Specifies that the table header occurs on every page (at the beginning of each one-page sub-table). See Table element dialog box Header tab, Header occurs on every page property.

Void AddHeaderKeyHypotheses( HypothesisInstances, TableBlockColumn )

Specifies a column name on multiple pages by means of a set of hypotheses for a subelement of a repeating group. See Column element dialog box, Use found element as column name property.

Void FooterOnEachPage( Logic has = true )

Specifies that the table footer occurs on every page. See Table element dialog box, Footer tab, Footer is on every page property.

Void AddFooterKeyHypotheses( HypothesisInstances )

Specifies a table footer on multiple pages by means of a set of hypotheses for a subelement of a repeating group. See Table element dialog box, Footer tab, Use found element as footer property.

Void PreviousInstances( TableHypothesisInstances )

Specifies the previous table instances if the table is inside a repeating group. It is assumed that the direction of instances is top to bottom, column boundaries have no shifts within the same page and may be slightly shifted horizontally between pages. The previous instances are used to search for or improve the search for columns if the table has no Header or if the Header is not detected.


Repeating Group

The following properties of a Repeating Group element must be specified in the Pre-Search Relations for all instances section. For details, see Additional search constraints for a Repeating Group element.

Parameter | Description
Void MinRepetitions( Int ) | Sets the minimum number of group instances in the document. See Element Properties dialog box, Repeating Group tab, the Min repetitions property.
Void MaxRepetitions( Int ) | Sets the maximum number of group instances in the document. See Element Properties dialog box, Repeating Group tab, the Max repetitions property.
Void PaginalMode( Logic value = true ) | Sets the Paginal search mode for group instances. See Element Properties dialog box, Repeating Group tab, the Paginal mode property.
Void MinRepetitionsOnPage( Int ) | Sets the minimum number of instances per one page. If the minimum number of instances is not detected, the repeating group is considered not detected. See Element Properties dialog box, Repeating Group tab, the Min repetitions on page property.
Void MaxRepetitionsOnPage( Int ) | Sets the maximum number of instances per one page. If a required number of group instances is detected on a page, the search stops on this page and continues on the next one. See Element Properties dialog box, Repeating Group tab, the Max repetitions on page property.


First Found

Navigation: FlexiLayout language > Specifying element properties >

Return to chapter overview

First Found

A First Found group element has no specific methods or properties. The non-specific methods and properties are described in the following sections:

·Functions which limit the search area

·Controlling searches

·Debug functions which return information about the search area


Labeled Field

A Labeled Field element is a Group element with predefined subelements. When you work with this element as one entity, its subelements are not visible and you cannot call their methods. To be able to access the methods of the subelements, turn the Labeled Field element into a usual Group element using command on the element's shortcut menu.

A Labeled Field has no specific methods or properties. The methods and properties common to all elements are described in the following sections:

·Functions which limit the search area

·Controlling searches

·Debug functions which return information about the search area


Region

Navigation: FlexiLayout language > Specifying element properties >

Return to chapter overview

Region

A Region element has no specific methods or properties. The non-specific methods and properties are described in the following sections:

·Functions which limit the search area

·Controlling searches

·Debug functions which return information about the search area


Hypotheses and their properties

Object Collection hypothesis

Character String hypothesis

Static Text hypothesis

Paragraph hypothesis

Barcode hypothesis

Date hypothesis

Currency hypothesis

Phone hypothesis

Table hypothesis

Table Column hypothesis

Repeating Group hypothesis

First Found hypothesis

Labeled Field hypothesis

Region hypothesis

Hypotheses for all types of element


Object Collection hypothesis

Parameter | Description
Int NumberOfObjects() | The number of classified objects within the region of the hypothesis.


Character String hypothesis

Parameter | Description
String Value() | The value of the text on the image within the region of the hypothesis.


Paragraph hypothesis

Parameter | Description
String Value() | The value of the recognized text on the image within the region of the hypothesis.


Table hypothesis

Navigation: FlexiLayout language > Hypotheses and their properties >

Return to chapter overview

Table Column hypothesis

From the hypothesis of the table element you can gain read-only access to the detected columns. To call a detected table, use the method Column( TableBlockColumn ). See the description of the hypothesis of the table element.

Parameter | Description
Distance Width() | The width of the column
Logic HasLeftSeparator() | Shows whether the column has a black separator on the left
Logic HasRightSeparator() | Shows whether the column has a black separator on the right
Logic HasLeftSeparatorInHeader() | Shows whether the column name has a black separator on the left
Logic HasRightSeparatorInHeader() | Shows whether the column name has a black separator on the right
String Name() | Column name
XCoordinate Left() | The left boundary of the column
XCoordinate Right() | The right boundary of the column


Repeating Group hypothesis

Parameter | Description
Hypothesis CurrentInstance() | The current instance of the repeating group when searching for subelements of the repeating element. Used to create relations among subelements of an incomplete current instance of the repeating group.
Hypothesis LastFound() | The last detected instance. If used in the relations of an element not from the given repeating group, the last detected instance of this group is taken. If used in the relations of subelements of the repeating group itself, the previous complete instance of this group is taken.
Hypothesis Instance( Int instanceNumber ) | Instance number instanceNumber
HypothesisInstances AllInstances() | All the detected instances of the repeating group. If used in the relations among subelements of the repeating group itself, all the previous complete instances of the group are taken.
Int InstancesCount() | The number of detected instances.
Logic HasInstances() | Checks if any instances have been detected.


First Found hypothesis

Navigation: FlexiLayout language > Hypotheses and their properties >

Return to chapter overview

First Found hypothesis

A hypothesis generated for a First Found is a hypothesis for the sub-element which is found first. The methods or properties for the hypothesis depend on this element.


Labeled Field hypothesis

Navigation: FlexiLayout language > Hypotheses and their properties >

Return to chapter overview

Labeled Field hypothesis

A Labeled Field element is a Group element with predefined subelements. The hypothesis for this element is generated in the same manner as for any Group element based on the hypotheses generated for its subelements. The hypothesis generated for a Labeled Field element has no specific properties. See the Hypotheses for all types of elements section for a description of the properties common to all elements.

The hypotheses generated for the subelements of this element may also be accessed. The properties of the hypothesis generated for the Label subelement are the same as the properties of a Static Text hypothesis. The hypothesis generated for the Field subelement may have the following specific properties depending on the type of content:

Field type | Property | Description
Any text | Text | The text of the hypothesis.
Currency | Value | The detected numerical value.
 | Currency name | The detected currency name.
Date | Day | Day.
 | Month | Month.
 | Year | Year.
Fixed variants | Keyword | The words included in the hypothesis. For each word, the number of errors is indicated.
Number | Text | The text of the hypothesis.
Phone | Number | The detected telephone number.
 | Prefix | The detected telephone prefix.
Regular expression | Text | The text of the hypothesis.


Hypotheses for all types of elements

Show/Hide Hidden Text

A hypothesis for an element can be either found or not found. A found hypothesis, as a rule, is formulated on the basis of one or several image objects or their fragments (an exception is the White Gap element which may contain no image objects at all).

A found hypothesis for a simple element is always a continuous region. Hypotheses for White Gap, Separator, and Barcode elements are always single rectangles.

If a hypothesis is formulated on the basis of a set of detected image objects, e.g. a hypothesis for a Paragraph element, the region of the hypothesis will be built on the basis of the array of rectangles of the detected objects. The region created in this way can be obtained by the Region method of the hypothesis. When displaying the region o f the hypothesis on the image, or when creating a block on the basis of the hypothesis, the boundaries of the region do not exactly follow the boundaries of each rectangle. Instead, the boundaries of the search area are smoothed out for better visualization. A region created in this way can be obtained using the SimplifiedRegion method of the hypothesis. The Region and SimplifiedRegion methods can be used either in the Advanced pre-search relations field on the Advanced tab (when describing the search area of the element), or in the Region expression field when describing the properties of the block and using the already found elements.

If a hypothesis was not found, it coincides with the fuzzy rectangle of its search area. When displaying a non-found hypothesis on the image, the program will draw the external rectangle of the fuzzy rectangle.

The Left, top, Right, and Bottom boundaries of any hypothesis are ranges. For each found hypothesis, the range degenerates to a point, i.e. Left.Start = Left.End, top.Start = top.End, etc. For a non-found hypothesis, the ranges of the boundaries coincide with the ranges of its search area.

Accessing generated hypotheses and their properties in the code of the corresponding dialog boxes of blocks and elements provides additional tools for setting up the FlexiLayout. Element hypotheses can be accessed by the names of the elements. To access a hypothesis for the current element in the Advanced post-search relations field, you can use only the name of the property.

Hypotheses and their properties are accessed in read-only mode. Hypotheses for elements can be accessed in the Advanced pre-search relations and Advanced post-search relations fields on the Advanced tab of the element's Properties dialog box as well as in the Region expression field in the block's Properties dialog box. In Advanced pre-search relations, you can access the generated hypotheses (and their properties) for all the elements located above the current element in the FlexiLayout tree. In Advanced post-search relations, you can access the generated hypotheses for the elements located above the current element in the FlexiLayout tree and the hypothesis for the current element itself. In Region expression, you can access the hypotheses (and their properties) for all the elements.

The table below lists the properties of hypotheses for all types of element.

Property | Description
Logic IsNull() | Whether this is a null hypothesis (if the element has been detected, IsNull property of the hypothesis is True).
Logic IsFound() | Whether the hypothesis is not null (if the element has not been detected, IsNull property of the hypothesis is False). Equivalent to IsNull.
XInterval Left() | The left boundary of the hypothesis, horizontal range in global coordinates.
YInterval top() | The top boundary of the hypothesis, vertical range in global coordinates.
XInterval Right() | The right boundary of the hypothesis, horizontal range in global coordinates.
YInterval Bottom() | The bottom boundary of the hypothesis, vertical range in global coordinates.
XInterval XCenter() | The X-coordinate of the center of the hypotheses, horizontal range in global coordinates.
YInterval YCenter() | The Y-coordinate of the center of the hypotheses, vertical range in global coordinates.
DistInterval Width() | The width of the hypothesis in global coordinates, range of distances.
DistInterval Height() | The height of the hypothesis in global coordinates, range of distances.
FuzzyRect FuzzyRect() | Fuzzy rectangle of the hypothesis in global coordinates.
Rect Rect() | The rectangle circumscribing the hypothesis in global coordinates. Coincides with the external rectangle of the fuzzy rectangle.
Region Region() | The region of the hypothesis in global coordinates. The method is not supported for Group elements.
Region SimplifiedRegion() | The region of the hypothesis in global coordinates simplified for better visual representation. The method is not supported for Group elements.
ImageObjectSet Set() | The image objects which are part of the hypothesis.
ImageObjectSet ExcludeSet() | The image objects which are in the region excluded from the search area by methods of type Exclude.
RectArray Rects() | The array of the rectangles included in the hypothesis. For most elements, it coincides with the array of the rectangles enclosing detected objects. For White Gap and Region elements, no objects are available.
Int HypothesesCount() | The number of hypothesis which can be formulated for the element in the search area. warning Important!The function may only be used if the maximum and minimum numbers of pages in the document are set to 1, i.e. the detected document has only one page. If you use this function for a multi-page document, matching a FlexiLayout will return an error.
PageInterval Pages() | The range of pages where the hypothesis is to be found.
PageArea PageAreaGlobal( Int PageNumber ) | Returns the part of the hypothesis located on the given page in global coordinates.
PageArea PageAreaLocal( Int PageNumber ) | Returns the part of the hypothesis located on the given page in the local coordinates of the page.
Example: accessing the properties of a hypothesis

Before you access the properties of a hypothesis for a simple or Group element, make sure that the hypothesis to be accessed is not a null hypothesis (call its IsNull property). Accessing a property of a null hypothesis (which corresponds to a non-detected element) will cause an error. Consider an example that uses the project from Sample 1 that can be found on the program CD-ROM.

Suppose there is an identifier on your document in the form of a barcode and you want your FlexiLayout to match only those documents on which the value of the barcode is 1556897142240. Do the following to achieve the desired result. In the Advanced post-search relations section of the element that describes the properties and search constraints of the barcode (element IdentityNumber in Sample 1), write the following code:

if value != "1556897142240" then Quality: 0;

Click Apply or Check. The compiler will not detect any syntax errors. It looks as if the code is OK. However, if you try matching the FlexiLayout with any page from Sample 1, the following error message will be displayed: " Error in element “MainGroup.IdentityNumber”, Advanced relations section: Attempt to access undefined hypothesis MainGroup.IdentityNumber."

The cause of error is as follows. The program finds a hypothesis for the barcode element. Then it compares the value of the barcode with the value specified in the code. If the values are different, the Quality: 0; code will reset the value of the hypothesis to 0. Then a null hypothesis is generated for this element, fro which the program also checks the condition value != "1556897142240". Since accessing the value of a null hypothesis is now allowed (it does not have this property), the program issues an error message "...undefined hypothesis..."

Therefore, you need to adjust the code as follows:

if not IsNull then {
if value != "1556897142240" then Quality: 0;
}

note Note.The above code will work only for a required element. For an optional element, the code has to be adjusted as follows:

if not IsNull then {
if value != "1556897142240" then Quality: 0;
}
else {Quality: 0;}

Otherwise, only the quality of the real hypothesis will be reset to 0. This will cause the program to generate a null hypothesis, for which the "if not IsNull" will not be executed. Therefore the quality of the final (null) hypothesis will remain the same as was specified in the properties of the element (0.97 if the default value was kept) and the program will continue matching the FlexiLayout, even without the given element.

If you add else {Quality: 0;} to the code, the string will be executed for all hypotheses (including the null hypothesis) and the matching of the FlexiLayout will be stopped, because the complete chain of hypotheses will also be reset to 0 at this element.

Methods Region Region() and Region SimplifiedRegion()compared

The methods Region Region() and Region SimplifiedRegion() allow you to get the region of an element, but the method Region Region() gets the exact region:

while the method Region SimplifiedRegion() gets the rectangle created based on the boundary coordinates:


Printing to debug

In the Advanced pre-search relations and Advanced post-search relations sections, you can use the Print function, which prints information. This allows you to print information about certain properties of the formulated hypotheses.

The format of the Print function:

Void Print( String text )

The FlexiLayout language has global functions that are used to create string representations of various types and print debugging information (see the table).

To display debugging data, the FlexiLayout language offers global functions that create string representations of various types available in the language (see the table below).

The global Chr( Int char ) function is used to format the printed lines using tab characters, carriage returns, etc. This function returns a string representation of a character by its Unicode code.

Examples of calling the Print function:

Print: Str( Group1.Item1.Width );

Print: "Is Item1 Null ? - " + Str( Group1.Item1.IsNull );

Print: "Calculate formula: ( 5 * 18 );" + Chr( 13 ) +Chr( 10 ) + "Result is: " + Str( 5 * 18 ) + Chr( 9 ) + "// example";

Print: Str( Group1.Item1.Rect );

Calling the Print function several times in a row in one of the Advanced… sections will print text consisting of several lines. The text will be printed in the Properties window of the active hypothesis in the Pre-search print and Post-search print properties.


Tips and tricks

This chapter describes several typical ways to create FlexiLayouts that would look for data fields on low-quality images. Such images are fairly common, with different scanning defects mostly caused by wrong scanning settings. For instance, an image may be too bright or too dark if brightness settings are not correct. As a result, some information on the image may be lost, or parts of the image may be noisy.

It is not always possible to rescan the documents, and the user often has to extract data from corrupted images. Moreover, some documents may have notes handwritten over useful information, which often causes recognition errors.

All the described instances of damage done to the text severely impair the quality of pre-recognition. The quality of pre-recognition may be improved by changing the recognition mode to Thorough. Unfortunately, this does not always help and greatly extends the pre-recognition time.

When a FlexiLayout is created in FlexiLayout Studio, the following method is usually used. The user can specify in the FlexiLayout that pre-recognition results may be inaccurate, i.e. differ from the source text. This fact is reflected in the standard settings of an element, for example, in the maximum number of errors in an element of type Static Text, or the percentage of non-alphabetic characters in a Character String element. High pre-recognition quality is not actually required when searching for data fields. It is required, however, when the detected fields are recognized in FlexiCapture. These programs offer specialized data types for each field, significantly improving the quality of recognition. Pre-recognition in FlexiLayout Studio is full-page OCR, and practice has shown that this is usually enough to detect the data fields on a document.

In real life projects, it is usually enough to create just a few elements to get a FlexiLayout that can successfully process good-quality images. Any user can easily create a FlexiLayout that will detect the required data fields on about 70% of the images. Such a FlexiLayout can be used in FlexiCapture. A FlexiLayout can be updated and 'taught' to extract data from low-quality images. The degree of such modification depends on the task at hand and the time available to the user.

The modification of a FlexiLayout includes detection of previously undetected elements and the attempt to find them with the help of additional elements (maybe of a different type) with less strict search constraints.

There are also other situations which require modifications to the FlexiLayout, including creation of additional elements. The user often has to process similar documents received from different sources, for example, documents created in different regional branches of a government institution. Such documents, despite their apparent likeness, may differ in the layout of data fields. In such cases it advisable to create one FlexiLayout instead of several slightly different FlexiCapture Document Definitions.

Documents may differ by the types of separators used on them or they may be filled in not only by hand but also by means of a printer. When teaching the program to find such fields, use methods described in this chapter.

A FlexiLayout Studio project which contains test images and a tested FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks.

Detecting dates in the case of low quality pre-recognition

Setting multiple static text values. Search for static text with similar values

Using Exclude to exclude elements

Using Group elements to optimize FlexiLayout structure and search

Searching for single-line Static Text elements

Restricting search area with RestrictSearchArea

Search for single-line fields of known or unknown format on documents of different quality

Elements search with Nearest and FuzzyQuality

Optimizing Group element search

The property "Optional" of a Group element

Digit strings search

Simplifying the FlexiLayout with an auxiliary element with a null hypothesis

Description of text fields containing framed letters


Date search after high or low-quality recognition

This chapter describes several typical ways to create FlexiLayouts that would look for date fields on low-quality images. Such images are fairly common, with different scanning defects mostly caused by wrong scanning settings. For instance, the image may be too bright or too dark if brightness settings are not correct. As a result, some information from the image may be lost, or parts of the image may be noisy.

FlexiLayout Studio offers a special Date element that is used to detect dates. However, when creating a FlexiLayout you may find this element insufficient. This may happen when the date on the documents does not match any of the formats available in the Date element. For instance, FlexiLayout Studio allows next languagesEnglish, Czech, Danish, Dutch, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, Turkish to be used in specifying the month in the date field. So, if the month is spelled out as a word in any language other than specified, the date will not correspond to any of the available formats, and thus you will not be able to detect it by means of a Date element.

Date search errors can also occur if the image has elements which cannot be removed. For example, the date may be underlined and there may be no visible gap between the date and the underline, crossed out or written in character cells with black separators (frames, combs). The inability to use the Date element for date search can also be caused by speckles in the search area, or by the fact that the date is not typed in but is filled in by hand.

The best way to organize a search for a date field is described in the sample project SearchOfDate.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Date).

There are 5 pages in the project:

·Page 1 - date format can be described by means of the Date element;

·Page 2 - the month in the date is written in French;

·Page 3 - the date is underlined;

·Page 4 - the date field is noisy;

·Page 5 - the date is filled in by hand.

Let us try and find the date on all the images including those where the date format is not supported by the element of type Date.

All the elements describing the date field are joined into a DateGroup element. First, this group has an element which looks for the name of the date field. In our project, this is an element of type Static Text named DateHeader with the only value 'Date:'.

note Note.Setting up the search constraints for all the elements in the Relations section is not difficult and thus is not described here. You can look it up directly in the project.

Next we create an element of type Date named DateField. This element will search for date fields whose format is supported by the Date element.

As is seen in the project, the Date element can detect the date only on the first page.

To search for dates on the other pages, an element of type Character String is created. In our project this element is named DateAsString. All the characters that are likely to occur on the images are represented in this element by means of an alphabet.

note Note.If the content in a data field can be structured and has a format which is not supported by the Date element, it is advisable, instead of specifying an alphabet, to describe this format with the help of a regular expression. However, you must be sure of the high quality of the processed images, as a regular expression presumes 100% match of the field and the described structure (alphabets, on the other hand, allow a certain percentage of errors. which is specified in the element's properties). Thus alphabets are a more flexible tool in the cases where accuracy of recognition can not be guaranteed. If you know that the month in the date will be written as a word in the same language as the pre-recognition language, then it may be advisable to divide the date field into three sections (day, month, year) and to search for the month field separately by using an element of type Static Text. Such a Static Text element should describe all possible variations of the month (e.g. full and abbreviated names of the month in the given language). Day and year fields will then be sought to the right and left of the month by means of elements of type Character String.

To optimize FlexiLayout matching, the following condition is provided in the Advanced pre-search relations field for the DateAsString element:

if (DateField.IsNull == FALSE) then Dontfind();

which is the same as:

if not DateField.IsNull then Dontfind();

This condition means that a search for the date as a character string will only be initiated if the date cannot be detected by using a Date element.

As is seen in the project, the element DateAsString finds the date on the rest of the project pages, where it could not be detected by the element of type Date.

On Page 4, however, the detected string contains only part of the date field. If you look at the pre-recognition results for the date field (by clicking Show Raw Objects on the toolbar), the reason for the partial detection becomes clear: the search area contains not only text objects, but other types of objects as well: Picture and Punctuation mark. Such a situation is typical for low-quality images - text objects are not always recognized during pre-recognition.

To find all the objects associated with the date field, an element of type Object Collection is created and named DateAsObjectCollection. All object types detected in the date field during pre-recognition are specified in the properties of the element. To optimize FlexiLayout matching, the following condition is provided in the Advanced pre-search relations field for the DateAsObjectCollection and the DateAsString elements:

if (DateField.IsNull == FALSE) then Dontfind();

note Note.The condition if (DateAsString.IsNull == FALSE) then Dontfind() can't be added to the Advanced properties of the DateAsObjectCollection element, because, as is clear from the example, there may be situations when the detected string contains only a part of the date.

At this stage the creation of elements describing the search constraints for the date fields may be considered complete. The Group element SearchElements.DateGroup.AlternativeDateGroup, which consists of the DateField, DateAsString, and DateAsObjectCollection elements, is specified in the project tree as a Source element for the Date block. Since the Dontfind() method was used to describe the properties of the DateAsString and DateAsObjectCollection elements, the actual region of the detected block will match either the region found by the hypothesis for the Date element or the combined regions of the DateAsObjectCollection and the DateAsString elements. In the latter case, we expect the region of the DateAsString element to be part of the region of the DateAsObjectCollection element, so the resulting region will be the region of the DateAsObjectCollection element.

note Note.In this case we can specify the Group element SearchElements.DateGroup.AlternativeDateGroup as a Source element, because the situation is relatively simple. The region of the group is a combination of the regions of its detected subelements. The Dontfind() method allows skipping the search for some of the subelements. Thus the region of the Group element SearchElements.DateGroup.AlternativeDateGroup will match the region of the subelement. In the given example, the Dontfind() method not only helps to optimize FlexiLayout matching, but also makes the description of blocks simpler.

Alternatively, we could use the code specified in the Expression section.

Rect OutputRect;
let dateGroup = SearchElements.DateGroup.AlternativeDateGroup;
if (dateGroup.DateField.IsNull == FALSE) then
outputRect = dateGroup.DateField.Rect;
else
outputRect = dateGroup.DateAsObjectCollection.Rect;
OutputRegion = outputRect;

The use of a Expression provides for additional options. For example, we could check if the region of the DateAsString element is really a part of the region of DateAsObjectCollection.

note Note.Using a Character String element to look for a date field, without defining the string format or using an element of type Object Collection, like in the given example, can lead to good results if the search area of the date field can be clearly defined. But if there are several character strings in the search area, then the string format should be described by means of a regular expression or a narrower alphabet. Otherwise, the final hypothesis can be unsatisfactory. By using the element of type Character String, the user can limit the number of characters in a string, the number of word ends and the length of spaces to filter out wrong hypotheses. If an element of type Object Collection is used, the hypothesis will include all the objects on the image that are located within the search area and meet the constraints on the object size.


Setting multiple static text values. Search for static text with similar values

To detect various titles of documents, tables, fields, or any text present on all or most of the images in a document, FlexiLayout Studio uses a special Static Text element. If different images which are to be processed by means of the same FlexiLayout have different variations of one and the same name (for example, the field 'Invoice number' has variations 'Invoice', 'Invoice:', 'Invoice No.', etc.), you must specify all the possible static text values even if they only differ in punctuation marks.

This is necessary due to the following reasons:

1.To generate a hypothesis corresponding to the specified value. For example, if we do not specify the variant 'Invoice:' but only specify the variant 'Invoice', the colon will not be included into the hypothesis for the field name. It may then be included into the search area of the invoice number which the program will search to the right of the name. If the search for the number allows non-digit or non-specified characters, then the column may get into the hypothesis of the element that describes the invoice number.

2.To avoid penalizing a hypothesis for characters not specified in the Search text window. For example, if the value 'Invoice:' is specified in the Search text section and the name 'Invoice#' is also encountered on the processed images, then, provided that some errors are permitted for the element, a hypothesis will still be generated but its quality will be penalized (in this example the FlexiLayout allows at least 1 error).

3.If there are variant hypotheses available, for example, 'Invoice|Invoice:', the program will assign the longer hypothesis a slightly higher quality, so that the hypothesis 'Invoice:' will be preferable. If a variant with ':' is specified, then the one without ':' will be penalized by 0.001, because the string 'Invoice' is a sub-string of 'Invoice:'. Penalizing the shorter name string, which is a sub-string of the other, makes the longer hypothesis the winner.

Let us use the sample project StaticText.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Variants of StaticText) to see how specifying the values of a Static Text element helps to detect the name of the 'Invoice number' field and the field itself.

The project has 5 pages:

·Page 1 - the field "Invoice number" has the name "INVOICE";

·Page 2 – the field "Invoice number" has the name "Invoice:";

·Page 3 – the field "Invoice number" has the name "Invoice #:";

·Page 4 – the field "Invoice number" has the name "Invoice -";

·Page 5 – the field "Invoice number" has the name "Invoice:", but the page also has a field "Invoice date", where the word "Invoice" is present.

In the Properties dialog box of the Static Text element named InvoiceHeader, we have specified all the possible names for the field that may be found on the processed documents. In this case, these are the above mentioned values. Letter-case in the names is irrelevant for search purposes: Invoice|Invoice:|Invoice#:|Invoice-.

note Note.To speed up the search for the element, all the variants are written without spaces. Absence or presence of spaces does not influence the quality of a hypothesis.

For the sake of simplicity, let us assume that the invoice number is always located to the right of the name. To search for the invoice number, a Character String element named InvoiceNumber has been created. Its alphabet and search constraints are specified in the Relations field. These settings are very simple and are not described here. You can look them up directly in the project.

A text block Invoice has been created in the FlexiLayout tree. The element InvoiceNumber has been specified as the Source element for the block.

As you can see after running the analysis procedure, the field name and the invoice number can be successfully detected on all the pages.

Now try removing temporarily all the static text values but the first (Invoice) from the InvoiceHeader element, and then try matching the FlexiLayout with all the pages again. You will see that the name and the invoice number have been successfully detected only on Page 1, because the name there fully matches the specified value (Invoice). On Pages 2-4, a part of the name got into the invoice number. On Page 5, there was an error in locating the number field.

Let us now restore the removed values. Look at the analysis results on Page 5, where the word Invoice occurs twice. As can be seen, the program generated 5 hypotheses for the InvoiceHeader element. The highest quality (Chain quality = 1, which, in this case, is equal to the Pre-search quality) is assigned to the hypothesis for the name "Invoice:". Hypotheses were also generated for the values "Invoice" and "Invoice d", because these strings are derivatives of the values specified for the InvoiceHeader element, for which a certain percentage of errors is allowed. These hypotheses were penalized (Cf. the above arguments for listing all the possible Static Text values), so their final quality is lower.


Using Exclude to exclude elements

When creating a FlexiLayout, the search areas cannot always be defined in terms of "top-bottom-left of-right of". This is particularly true when the search area contains unwanted objects, e.g. objects that may have been introduced during scanning. These objects should not make it into the recognition block, so they have to be excluded when creating the corresponding element. The field of the address in the figures below is a good example. What is meant here is the mutual location of the field names "Address:", "(Address)" (which must be excluded from recognition) and the address itself (which should be recognized).

The Exclude function excludes a region from the search area of an element. The region to exclude is specified when calling the function. The excluded region may be either the region of a hypothesis (detected or not), a rectangle or an array of rectangles of the found elements, or a region built from the regions of objects which are part of a found hypothesis (see ExcludeSet method).

Let us study the Exclude.fsp project (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Exclude) to see how the Exclude function works.

The project has 4 pages:

·Page 1 - the address field is written in several lines. The name "Address:" is in the first line, so we cannot say that the sought data field is to the right of or below the field name. However, the name still has to be excluded from recognition;

·Page 2 – the address field has no name;

·Pages 3 and 4 – the line "(Address)" lies within the data field. However, it has to be excluded from recognition.

On all the pages the address field is below the field with the company name.

First we create an element of type Static Text, name it CompanyHeader and specify its value. This element will be used to detect the name of the field.

Next we create an element of type Static Text and name it AddressHeader. This element will be used to detect the name of the field. We specify the following static text values: Address:|(Address), i.e. we list all the variants of this line that should be detected and then excluded from recognition in the address field. We describe the search constraints for these lines in the Relations field and specifying that these lines should be looked for below (Below) the CompanyHeader element.

note Note.The element for the name must be created before the element for the address field, because the Exclude function only allows referring to elements that are higher up in the FlexiLayout tree than the current element.

Launch the FlexiLayout matching procedure (Match FlexiLayout) to make sure that the name of the address is found on all the pages where it occurs.

Since the address field in this example has multiple lines, we create an element of type Paragraph to search for it. We name it Address and, as in the previous example, specify that it should be looked for below (Below) the CompanyHeader element.

Once you have run the FlexiLayout matching procedure, you will see that on pages 1,3 and 4 the line of the name has also been included into the address field.

Now let us go back to the Properties dialog box of the Address element and click the Search Constraints tab. Click Add... next to the Exclude regions of elements section and choose the AddressHeader element from the list.

After saving the properties of the element, run again the FlexiLayout matching procedure. You will see that the region of the block which corresponds to the address field acquired a non-rectangular shape, because the region of the name has been cut from it.

note Note.The Exclude regions of elements section allows you to exclude from the search area of the current element the region of a found hypotheses for another element. To exclude a more geometrically complex area, or to detect a region first and then exclude it from the recognition process, then you should use the functions Exclude, ExcludeRect and ExcludeSet in the Advanced pre-search relations field.

note Note.The region of a block by definition consists of rectangles placed one upon another, so any horizontal line can cross the region only once, i.e. there can be no vertical "teeth" jutting out. Therefore, if the line to be excluded and the required information are located on the same or roughly on the same level, then the name cannot be excluded at the stage of FlexiLayout creation. In that case the name can be excluded after recognition in FlexiCapture by using the "Substitute from the list" rule.


Using Group elements to optimize FlexiLayout structure and search

Using Group elements to search for objects is most efficient, because grouping elements together reduces the number of hypotheses for an element and speeds up the search for the resulting hypothesis for the whole FlexiLayout. Moreover, if the grouping of the elements reflects the logic of the document, it helps to optimize the structure of the FlexiLayout and makes it more explicit.

Grouping several elements together into one Group element enables the program to treat this set of elements as a whole with its own hypothesis (composed of individual hypotheses for elements in the group). Analysis of hypotheses and their elements takes place within the Group element, and only the user-specified number (1 by default) of the best hypotheses are used in the subsequent search for other elements.

The entire tree of elements can be regarded one Group element, the best hypothesis for which is the result of matching the FlexiLayout.

Let us study the GroupSample.fsp project (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Group\Project1) to see how Group elements can be used. Here we have an image where we want to detect fields with the invoice number, the invoice date, and the invoice sum.

As is seen on the image (the same is usually true for all financial documents), the number and the date of the document are neighboring fields. Even if the arrangement of the fields on another document is different, they still will be close to each other. Furthermore, they are connected by the logic of the document, as they describe certain bank details and form a logical block. To make the structure of the FlexiLayout more explicit, we will group them into a Group element named InvoiceRequisiteGroup.

note Note.Prior to grouping the elements, we created a special identifying element. (Identifier elements are described in detail in the section "Identifying and Processing FlexiLayouts in ABBYY FlexiCapture".) This element was only created to illustrate the "branching out" of the tree of hypotheses caused by the presence or absence of Group elements in it. Let us assume that all the elements in the tree, except the identifier element, are optional, and their null hypotheses have the default quality of 0.97.

The first element in the Group is an element of type Static Text, named InvoiceNumHeader, which describes the search constraints for the name of the field "Invoice number". The string "Invoice" is specified as the value of this element.

Based on the analysis of the images at our disposal, we will search for the invoice number to the right of the name, with the help of an element named InvoiceNum.

Similarly, under the line with the invoice number we created an element for the date field and named it InvoiceDateHeader. To search for the date itself we created the group DateGroup with the following subelements: InvoiceDate and InvoiceDateAsString. See Creating FlexiLayouts for poor quality images for more details.

To detect the field with the invoice sum, we created two elements: an element of type Static Text named TotalSumHeader (its value "Totalsum(EUR):" is written without spaces), and an element of type Character String named TotalSum (the latter will be used to look directly for the sum).

note Note.We do not describe here the settings of the elements. You can look them up directly in the project.

Please note that the string "Invoice", specified as the value of the element InvoiceNumHeader, can be encountered on the test images three times: as the name of the field "Invoice number", as a substring of the name of the field "Invoice date", and at the bottom of the invoice, as a substring in the invoice conditions: "Current invoice is…". It is also important to note that the name "INVOICE" (which we are going to detect by means of the InvoiceNumHeader element) is very noisy, which caused an error in the name. In the other lines, the string "Invoice" is clear, and the quality of the corresponding hypotheses must be higher than that of the hypothesis for the name.

Now try matching the FlexiLayout with the test images in the batch.

Once you have started the FlexiLayout matching procedure by selecting the Match command, you will see that the tree of hypotheses consists of a single chain.

The tree of hypotheses consists of just one chain. The quality of the Group coincides with the quality of the best chain in the Group.

Double-click InvoiceRequisiteGroup to open its Properties dialog box where we can see what hypotheses were generated for its subelements, which chain in the Group turned out to be the best and why.

We see that there are three hypotheses for the InvoiceNumHeader element, equal to the number of "invoice" strings detected. The quality of the hypothesis we are interested in is lower (approximately 0.99), because its area on the image is noisy and the program could only recognize "INVOIC" instead of "INVOICE". The quality of the other two hypotheses, however, is maximum (Chain quality = 1).

At the creation of the InvoiceNum element we specified that the invoice number can have any number of digits and should be sought to the right of the name. On our image these conditions are met in all the three cases, which enabled the program to continue creating a chain of hypotheses for each of the hypothesis for the name of the "Invoice number" field. It should be noted that, in spite of the fact that the Pre-search quality of each of the hypotheses of the InvoiceNum element is 1, the chain that we consider to be correct is still the worst. This happened because chain quality is assessed by the multiplying the qualities of all the hypothesis forming the chain. For the required name this quality is about 0.99. If the Group did not have any other elements, the final choice at this stage would be incorrect.

note Note.We did not specify Post-search relations for any of the elements, so for each of the elements Post-search quality = 1, and we can judge the quality of any given hypothesis by its Pre-search quality.

The search for the best hypothesis is done within the Group. The quality of all the chains is analyzed and compared. The quality of the Group will be determined by the quality of the best chain in the Group.

As we noted above, in the properties of the InvoiceDateHeader element we specified that it should be sought under the line with the invoice number. However, none of the chains with the best quality (Chain quality = 1) resulted in a hypothesis for the name of the date field. Consequently, null hypotheses were formed in these chains for the InvoiceDateHeader element. Since we did not change the default quality of a null hypothesis, the resulting Chain quality of the corresponding chains dropped to 0.97. At the same time, the element corresponding to the name of the date field was found for the chain that had the lowest quality. The quality of its hypothesis is approximately 0.993. It is less than 1 not because the image in the area of the name is noisy, which resulted in a recognition error and an incomplete match between the recognized text and the value specified in the properties of the InvoiceDateHeader element. As a result, the found hypothesis was penalized and its final quality is about 0.98 (the result of multiplying 0.99 by 0.993). Nevertheless, the final quality of this hypothesis is higher than that of the others (0.97), so at this stage this chain is the best.

To detect the date field, we created the Group element DateGroup, which specifies that at least one of the elements cannot be found if the other has been found (the Dontfind function was used). As a result of the document layout features and the properties specified for the InvoiceDateAsString element (its alphabet allows digits), the program managed to find the date field for all the chains, though only one hypothesis in the three is actually correct.

Since in each Group one of the elements has been found while the other has not, the final quality of the chain in each of the DateGroup groups is 0.97 (1 multiplied by 0.97, the default quality of the null hypothesis). In this example, the final quality of the DateGroup chains will not affect the "balance" among the hypotheses at the moment of detecting the InvoiceDateHeader element, i.e. the quality of each of the chains will be simply further multiplied by 0.97.

At the end the program generated a single hypothesis for the Group element InvoiceRequisiteGroup, which corresponds to the best chain in the Group. Its quality is approximately 0.953, i.e. the "group approach" helped the right hypothesis win, even though its initial quality was lower.

To illustrate how the tree of hypotheses would look like without Group elements in the FlexiLayout, we created the GroupSample.fsp project (Group\Project2 folder). The tree can be seen in the figure below. As is clear from the figure, after detecting the FormID element, the tree of hypotheses branched out because several hypotheses are generated for the InvoiceNumHeader element. As a result, the program has to compare the qualities of each of the chains, starting every time from its very first element and moving down to the last. Moreover, for any document with a layout more complex than the one in this example, a FlexiLayout without Group elements will produce a tree of hypotheses with too many branches, which will make FlexiLayout matching more difficult.

note Note.It is not recommended to place all the sought elements into one root group. This is only suitable for very simple FlexiLayouts with fewer than 10 elements, which is very rare in real-life tasks. An increase in the number of elements in the root Group causes massive growth of the number of hypothesis, until it reaches its limit of 10,000 or the memory allocated for the tree of hypotheses is all used up. In either case, matching the FlexiLayout may fail.

In real-life tasks there is usually no need to explore all the possible combinations of every hypothesis for one element with every hypothesis for every other element, as most of the elements might be detected independently from one another. That is why it is advisable to Group elements into the smallest possible Group elements, so as to reduce the number of combinations to analyze and speed up the search.

An ungrouped tree of hypotheses has too many branches and its visual analysis is difficult.

Moreover, since the quality of the final chain is calculated by multiplying the qualities of all the hypotheses in that chain, the volume of calculations may be much higher in a tree with too many branches, which will results in slower FlexiLayout matching.


Searching for single-line Static Text elements

If you need to detect a string of static text and you know that this field has only one line on all the images, it is advisable to enter the text value without spaces. It speeds up the search and does not affect the quality of the found hypothesis.

note Note.This is only true if the static text of the name has been recognized without errors. This is because the maximum number of errors (set for Static Text elements by two parameters: Max number of errors and Max error percentage) means the number of errors in a word. Thus, if the Max number of errors is set to 1, the name consists of 3 words, and the value of the Static Text is entered without spaces, the program can make no more than 1 mistake during recognition. When entered without spaces, the name is perceived by the program as a single word, regardless of the actual number of words in it. But if you separate the words in the name with spaces, the allowed number or percentage of errors will apply to each of the words you typed in the Search text field. If any recognition errors are made in a Static Text, the hypothesis is penalized in accordance with a certain algorithm, and the quality of the hypotheses with and without spaces may be different.

Let us study the Spaces.fsp project (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Spaces in StaticText\Project1) and learn some methods of working with Static Text elements.

The project has 2 pages:

·Page 1 – the quality of the image is good;

·Page 2 – the name of the data field is noisy.

We are going to search for the data field "Father's name" related to the name "Please indicate your father’s name here:"

In the project, we created an element of type Static Text and named it NameOfFatherHeader. We specified its value as one word without spaces (i.e. Pleaseindicateyourfather'snamehere:). Letter-case in the name is irrelevant. We left the default values for all the other properties of the element. The maximum number of errors in the name is 10 characters (30% of the 35 characters which make up the text).

Once you have run the FlexiLayout matching procedure by selecting the Match command, you will see that the name has been successfully detected on both pages. However, on Page 2 the Chain quality of the element hypothesis is about 0.994, because it has been penalized for the recognition error caused by the noise on the document.

note Note.To see the pre-recognition results for the sought name, click "L" ("Show Recognized Lines") on the toolbar and point at the text of the name. The pre-recognition result for the field name on Page 2 will look like this: "PLEASEINDICATE|OURFATHER'SNAMEHERE:". Alternatively, you can display the detected Static Text by selecting the hypothesis of the NameOfFatherHeader element in the Tree of Hypotheses window and moving your mouse pointer to the line Keyword in the Properties-Hypothesis window. In this case the pre-recognition results and detected errors (if any) will be displayed in the bottom part of the Properties-Hypotheses window.

To detect the data field "Father's name" we created an element of type Character String, because the sought data field has only one line and its value, unlike Static Text, changes from document to document. We named the element FathersName and specified its properties in the Relations section. Then we created a block with the same name in the FlexiLayout and specified that its region coincides with the region of the FathersName element (we selected the name of the element FathersName in the Source element field).

Now let us try matching the FlexiLayout with the same images but enter the value of the NameOfFatherHeader element as words separated by spaces.

To do this we created the Spaces.fsp project (Spaces in StaticText\Project2 folder). The value for the element NameOfFatherHeader looks like this: Please indicate your father's name here:. All the other settings are left unchanged (they are identical to those of the Spaces.fsp project located in the Spaces in StaticText\Project1 folder).

Once you have run the FlexiLayout matching procedure by selecting the Match command, you will see that the field name has been successfully detected on both pages. However, the Chain quality for the hypothesis of the NameOfFatherHeader element on Page 2 is now about 0.987, because the hypothesis was penalized for one recognition error caused by the low quality of the initial image.

note Note.Please note that if there are spaces in the Static Text value you type in the Search text field, each word will be analyzed individually and the maximum number or percentage of errors will apply to each of the words. The final quality of the Static Text hypothesis will then depend on the qualities of these separate words.


Restricting the search area by means of RestrictSearchArea

The function RestrictSearchArea allows you to specify the search area as a rectangle, an array of rectangles, or a region.

On different pages of the document the sought field is often located differently relative to its name. For example, on some pages the field can be to the right of the name, on the others it can be under the name. In such cases it is advisable to specify the search area as an array of rectangles. See Using Nearest and FuzzyQuality to look for elements about the use of the RestrictSearchArea function in such cases.

It may also be advisable to use the RestrictSearchArea function instead of doubling search constrains that are identical for several elements.

Use this function to describe the search area of the date field or any other field when, for some reason (e.g. low image quality or layout peculiarities), the use of an element of one type is not enough.

Let us see how the RestrictSearchArea function can be used to search for a date field. It is usually recommended to search for date fields with the help of at least two types of elements: Date and Character String. But if the image quality is very low, these two elements may not be enough. See Detecting dates in the case of low quality pre-recognition for more details on how to organize a search for date fields.

Let us see this function at work by taking by running the sample project SearchOfDate.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\RestrictSearchArea). This project is actually a copy of the project of the same name from the Date\FCS project folder. The search constraints for all the elements in it (DateField, DateAsString and DateAsObjectCollection) were identical and looked as shown in the figure below.

But in the current project, instead of doubling the search constraints in the Relations tab for the elements DateAsString and DateAsObjectCollection, we use the function RestrictSearchArea by writing the following code in the Advanced pre-search relations field on the Advanced tab:

if (DateField.IsNull == FALSE) then Dontfind();
else RestrictSearchArea (DateField.Rect);

This code means that searching for the date field as a string or as an object collection will only be attempted if the program fails to detect it by means of the Date element. And both elements will be looked for in the very area where the element DateField has not been detected. It so happens because the DateField.Rect method restores the rectangle enclosing the hypothesis of the DateField element. Since the hypothesis has not been found, the enclosing rectangle will coincide with the search area. Therefore, we specify a search area for the DateAsString and DateAsObjectCollection elements which coincides with the rectangle enclosing the search area of the undetected DateField element.


Searching for single-line fields of known or unknown format on documents of varying OCR quality

To detect single-line fields, FlexiLayout Studio has a special Character String element. If the sought field has a known format, then it can be described in the properties of the corresponding element on the Character String tab in the Regular expression field. But the use of a regular expression demands printed documents and a good image quality, because description with a regular expression does not permit any errors to be made in the field, otherwise the element simply will not be detected. Regular expressions also must not be used if the document is filled in by hand, even if its layout can be described. Nevertheless, such a field can be detected.

The search for a single-line field "Invoice number" with a similar format on all the pages is shown in sample the project StructuredStrings.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Structured strings).

The project has four pages:

·Pages 1 and 2 - the field "Invoice number" is filled in by means of a printer, printing quality is good;

·Page 3 – the field "Invoice number" is filled in by means of a printer, the image is noisy;

·Page 4 – the image quality is good, but the field "Invoice number" is filled in by hand.

invoice1 | invoice2
invoice3 | invoice4

We are going to look for the field "Invoice number" relying on the field name. First we need to create an element describing the search constraints of the field name. The created element is of type Static Text, named InvoiceNumberHeader and has the value "InvoiceN:".

The field "Invoice number" is a single-line field. To detect it, we have created an element of type Character String, named NumAsRegularExpression. As can be seen on the pages of the project, the format of the field "Invoice number" can be described with the following regular expression:

NNNN"-"NN"-"[A-Z]"/"NN

or (which is the same)

[0-9]{4}"-"[0-9]{2}"-"[A-Z]"/" [0-9]{2}

It means that the number is a sequence: "four digits - two digits - one Latin capital letter/two digits".

As is seen in the project, after running the FlexiLayout matching procedure by selecting the Match command, null hypotheses were generated for the element NumAsRegularExpression on pages 3 and 4, i.e. the element was not detected. On page 3, the noise caused a mismatch of the field and the regular expression. If you open Page 3 and click "L" ("Show Recognized Lines") on the toolbar, the pre-recognition of the invoice number on the page will look like "10&0-20-A/04". On Page 4, the invoice number is filled in by hand. You can see in the results of pre-recognition (Z.OOO-41-C/03) that it does not match the described format either.

The following solution to this problem is recommended. We create one more element of type Character String and named NumAsAlphabet. We specify for it the same search constraints as for the NumAsRegularExpression element. Then we group the two elements into one Group element InvoiceNumber. But we describe the element NumAsAlphabet not as a regular expression but as a list of all valid characters.

The following code should be written in the Advanced pre-search relations field:

if (NumAsRegularExpression.IsNull == FALSE) then Dontfind();

This means that the search for a string of an unknown format, described by the element NumAsAlphabet, will only be attempted if the program fails to detect it by means of the NumAsRegularExpression element, which describes a string of fixed format.

note Note.When specifying search constraints for the NumAsAlphabet element, you can use the drag&drop method to copy the settings from the section Relations of the element NumAsRegularExpression into the same section of the current element. Alternatively, the following code can be written in the Advanced pre-search relations field:

if (NumAsRegularExpression.IsNull == FALSE) then Dontfind();
else RestrictSearchArea (NumAsRegularExpression.Rect);

This code means that a search for the element NumAsAlphabet will only be attempted if the structure of the invoice number doesn't match the specified format, i.e. the program failed to detect the element NumAsRegularExpression. And the element NumAsAlphabet will be looked for in the same area where the element NumAsRegularExpression wasn't found.

Now we start again the FlexiLayout matching procedure on all the pages. As is seen in the project, the invoice number field is now successfully found on each of the pages.

In the project tree we created a text block named InvoiceNum. The group SearchElements.InvoiceNumber is specified as its Source element. At this stage the creation of a FlexiLayout to detect "Invoice number" fields is complete.

note Note.If, for some reason, the method described above is not sufficient for detecting the data field (whether its format is known or unknown), then one more element (of type Object Collection) can be created in the group. In this project, it is the element of type Object Collection, named NumAsObjectCollection. It is not actually needed given the good quality of the images in our project and is only shown as an example (the Disable command is specified for it). Introduction of an additional element of type Object Collection might be needed when it is difficult to predict pre-recognition results on different pages, but the search area can be accurately described, preventing unwanted information from getting into the hypotheses.

The following question may arise: why a regular expression is needed if the field can sometimes be detected without it? The answer is that the use of a regular expression makes the search more reliable. If this element is found, then you can be sure that you have found the very line that you need. This information can then be safely used to detect further elements and their relations. When the search constraints are lax, you cannot be absolutely sure that you have found exactly what you need.

This may happen if the image is very noisy. In such cases, the use of an element of type Character String with a specified alphabet can lead to the excessive percentage of errors (the Percentage of non-alphabet characters parameter). As a result, the element will be either not detected at all, or detected only partially. The example of such a situation is given in the picture below.


Using Nearest and FuzzyQuality to search for elements

warning Important!For the sake of simplicity, a one-page document is used in this sample.

In documents processing there are often situations when it is not enough to describe the location of elements relative to other elements in terms of the "above - below - to the right - to the left" kind. This may happen, for example, if in the search area there are several objects matching the search constraints. In such situations we need additional differentiating properties, specifically - the distance between the objects. For these purposes FlexiLayout Studio has the FuzzyQuality function, as well as the functions of the group Nearest (Nearest, NearestX, NearestY).

The applications of these functions are different.

The function Nearest can only be used in the Advanced pre-search relations field. It specifies that, among the several hypotheses of the element, the program must look for the nearest one to a certain element or point on the image set in the properties of the Nearest function. In the Advanced pre-search relations field of the element, only one function of the Nearest group can be used. After it is run, only one hypothesis is left, and it happens at the stage of hypotheses generation, i.e. before the code specified in the Advanced post-search relations field is run. The Minimum quality parameter, which specifies the minimum quality of hypotheses for the element, can be specified for the StaticText, CharacterString, Paragraph, Date and Separator elements. There is no guarantee that the remaining hypothesis is the best (and corresponds to the required object of the image), because Advanced post-search relations are very important for assigning a quality value to a hypothesis. When using the function Nearest, the choice of hypothesis is made at the stage of hypotheses generation and is based on the proximity to some point, not on the quality of the hypothesis. It should always be taken into consideration that if the properties specified in the Advanced post-search relations section are important for the correct selection of the hypothesis you should use the FuzzyQuality function instead of the functions of the Nearest group.

The FuzzyQuality function can only be used in the Advanced post-search relations section. Unlike the functions of the Nearest group, it doesn't select a single hypothesis but instead influences the overall quality of all the generated hypotheses based on the properties of these hypotheses and the parameters of the function FuzzyQuality. Besides, the FuzzyQuality function can be used multiple times for a single element in the Advanced post-search relations field. This means that several different constraints with different quality values can be applied to a hypothesis. All the values will be multiplied to determine the Post-search quality of the hypothesis. The FuzzyQuality function looks as follows:

FuzzyQuality: x, {f1, f2, f3, f4};

Its algorithm is as follows: the function checks whether the value of the parameter x belongs to the interval defined by the parameters f1, f2, f3, f4. The meaning of this fuzzy interval is similar to the fuzzy intervals specified for some of the parameters of the Character String element.

Let us see how the Nearest and FuzzyQuality functions can be used on the following images.

invoice5 | invoice6
invoice7 | invoice8

As is seen from the pictures, the document of the invoice is semi-structured, as the arrangement of the fields is different on different images. We are going to detect the fields "Invoice number" and "Invoice date".

To do this, we created the 1.fsp project (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\FuzzyAndNearest \Project1).

To optimize the FlexiLayout structure and to follow the logic behind the arrangement of the sought fields in the document, we grouped all the sought elements into a compound element, InvoiceGroup. We can start FlexiLayout creation with the creation of an element describing the search constraints for the name of the field "Invoice number". But the analysis of the images shows that the word "Invoice", which makes up the name, is encountered on the document several times. Since the relative location of the fields changes each time, we cannot specify the constraints that would guarantee the correct detection of the word "Invoice". It may, for example, be found in the name "Invoice date". To avoid such confusion, we started the description of the name of the date field by using an element of the Static Text type, named DateHeader. In the Search text field we specified two values of the name: Invoicedate:|Invoicedate (listing the variants of the name as they occur on the images). The letter case of the name is irrelevant.

note Note.See Setting multiple static text values. Search for static text with similar values for details on why you must specify both the variants.

We are going to look for the date field relying on the field name. In the project we have created a group DateAlternative, which consists of two elements: a Date element to search for the date field in one of the specified formats, and an element of type Character String, in case the format of the sought field is different.

note Note.See Detecting dates in the case of low quality pre-recognition for a detailed description of creating a FlexiLayout for date search.

As is seen from the images, the date field can either be located to the right of the name "Invoice date" or below it. If we set standard search constraints in the Relations field (these are displayed in the project, but disabled), then the search area will be too large, and may enclose some fields that may be mistakenly taken for the date field (an example is shown in the picture). This may happen, for instance, if the date doesn't match the format specified for the element Date.

To prevent the program from analyzing the unwanted area, we used an alternative method. In the Advanced pre-search relations field we wrote the following code:

let Header = InvoiceGroup.DateHeader;
if not Header.IsNull then
{ let rect1 = Rect (Header.Rect.Right, Header.Rect.Top-20dt,
PageRect.Right, Header.Rect.Bottom+20dt);
let rect2 = Rect (Header.Rect.Left - 200dt, Header.Rect.Bottom,
Header.Rect.Right + 150dt, Header.Rect.Bottom+200dt);
RectArray ar;
ar = RectArray ( rect1 );
ar.Add ( rect2 );
RestrictSearchArea( ar );
}
else
{ Above: PageRect.Top + PageRect.Height/2;
}

The code checks whether the name of the date field has been found. If it has been found, we specify the search area as an array of rectangles (in the example - 2 rectangles). One rectangle searches for the date to the right of the name, the other - below the name. If the name is not found, the search will be run in the upper half of the image.

In the case of a page where the search constraints were specified in the Relations section, the form of the search area after running this code will be different from a rectangle. As is seen in the picture, all the unwanted objects were removed from it.

note Note.The first line of the code (let Header = InvoiceGroup.DateHeader;) simplifies the code by defining the variable Header and assigning it the value of the element DateHeader.

We didn't duplicate the above code for the element DateAsString, but wrote the following search constraint in the Advanced pre-search relations section:

if not Date.IsNull then Dontfind();
else RestrictSearchArea (Date.Rect);

It means that if the element Date is not detected, the search will be run in the rectangle enclosing the search area of the element Date.

note Note.To specify the search area of the element DateAsString as an array of rectangles, instead of calling RestrictSearchArea (Date.Rect), duplicate the corresponding code from the Advanced pre-search relations section of the element Date.

Then we created an element of type Static Text (named InvoiceHeader) to detect the name of the field "Invoice number", and specified the sought value: "Invoice". Since the document is not structured, we are unable to give any specific search constraints.

Once the FlexiLayout matching procedure is finished, we can see that the name has been accurately detected only on the first page. On pages 2 and 4, the word "Invoice" was mistakenly detected in the name of the date field. On page 3, it was found at the bottom of the page, and, according to the optimization algorithm, the other hypotheses of the name were not generated, even though the word "Invoice" occurs on the image three times.

note Note.See the Optimizing Group element search for more information on optimal search for elements in the group.

To solve the problems, we used the following method. To exclude the region of the name of the date field from the search area of the field name "Invoice", we added the element DateHeader to the section Exclude regions of elements (see the picture below).

note Note.If we had started creating the FlexiLayout not with the name DateHeader but with the name InvoiceHeader, we wouldn't have been able to use the Exclude function, as this function can only exclude elements that are located higher than the current element in the project tree.

To exclude the unwanted detection of the word "Invoice" at the bottom of the page, we wrote the following code in the Advanced pre-search relations section.

NearestY: PageRect.Top;

This code tells the program to search for the element nearest to the top edge of the page.

Once the FlexiLayout has been matched, we see that our method failed on page 2, because the name of the date field here is very noisy and wasn't detected. On this page, the constraint specified in the Nearest function is true for both of the "Invoice" strings, because they are located on the same level. And since the recognition quality of the "Invoice" strings is good in both the cases, the optimization algorithm generated a single hypothesis instead of two separate ones. Unfortunately, this hypothesis is not correct.

To detect the "Invoice number" field, we created an element of type Character String, named InvoiceNumber. Similarly to the element for the date field, we specify the search constraints for the "Invoice number" field in the Advanced pre-search relations section. The search area for this element is an array of rectangles.

let Header = InvoiceGroup.InvoiceHeader;
if not Header.IsNull then
{ let rect1 = Rect (Header.Rect.Right, Header.Rect.Top-20dt,
PageRect.Right, Header.Rect.Bottom+20dt);
let rect2 = Rect (Header.Rect.Left - 200dt, Header.Rect.Bottom,
Header.Rect.Right + 150dt, Header.Rect.Bottom+200dt);
RectArray ar;
ar = RectArray( rect1 );
ar.Add( rect2 );
RestrictSearchArea( ar );
}
else
{ Above: PageRect.Top + PageRect.Height/2;
}
Nearest: Header;

Additionally, we added one more constraint to the code. We told the program that the element InvoiceNumber is the nearest to the element of the name.

After running the matching procedure, we see that the "Invoice number" field was detected wrongly on pages 2 and 4. It was wrongly detected on page 4 even though the name of the field was detected correctly.

note Note.As an alternative (for the images of the current project) to Nearest: Header;, we could write NearestY: Header.Rect.YCenter;, to tell the program that the sought field is vertically nearest to the center of the name. This could solve the problem of the incorrect detection of the field "Invoice number" on page 4. But it doesn't help on page 5, because the sought field is detected within the date field after the incorrect detection of the name "Invoice number".

Now let's see how we can use the FuzzyQuality function in such a situation.

To demonstrate this, we created the project 2.fsp (FuzzyAndNearest\Project2 folder).

The settings of this project are nearly identical to those of the project described above.

But there is one significant difference. We didn't use the Nearest function in the Advanced pre-search relations section. Instead, we wrote the following code in the Advanced post-search relations section:

if not IsNull then
{ FuzzyQuality: Rect.Top - PageRect.Top, {0,0,0,50000} * dt;
FuzzyQuality: 500dt-Width, {0,0,0,100000} * dt;
if not InvoiceHeader.IsNull then
{ FuzzyQuality: Rect.XCenter - InvoiceHeader.Rect.XCenter, {-10000,0,0,50000} *dt;
FuzzyQuality: Rect.YCenter - InvoiceHeader.Rect.YCenter, {-10000,0,0,10000} *dt;
}
}

With this method we can affect the quality of all the hypotheses, not excluding any of them. The choice of the best chain will be made for each chain individually by multiplying the quality values of all constituent hypotheses of the elements.

The line FuzzyQuality: Rect.Top - PageRect.Top, {0,0,0,50000} * dt; means, that if a non-null hypothesis is generated (if not IsNull check is run first), then the distance between the location of the element and the top edge of the page is determined. I.e. the difference (Rect.Top - PageRect.Top) is calculated, and the program checks whether this difference belongs to the interval {0, 0, 0, 50000}*dt. Such a description of the interval means that there is a direct dependency of the quality penalty and the distance between the element and the top edge of the page - the longer the distance, the greater the penalty. As is shown in the picture (a), with the specified parameters values, the maximum penalty (1) corresponds to the distance of 50000dt, while the distance of 1000 dots (1 dot is 1/300 of an inch) means the penalty of 0.02, the distance of 100dt - the penalty of 0.002.

note Note.When you choose parameters setting the boundaries of the interval, you should choose such parameters (particularly, when there are multiple element checks with the FuzzyQuality function) that won't penalize the right hypothesis to a degree when its final quality will be lower than that of a null hypothesis. If the quality of all the hypotheses (including the correct one) is lower than the quality value of a null hypothesis, the null hypothesis may be selected, i.e. the element won't be detected.

(a)

The line FuzzyQuality: 500dt - Width, {0,0,0,100000}*dt; means that the programs considers the difference of width of the detected object, corresponding to the hypothesis of 500dt. I.e. the difference (500dt - Width) is calculated and the program checks whether this difference belongs to the interval {0, 0, 0, 100000}*dt. The narrower the object, the greater the penalty, so longer invoice numbers will be preferable. This constraint can be used if the image is noisy. If the noise is recognized as a character from the specified alphabet (as it can be seen, for instance, on page 2), its hypothesis should be penalized to exclude it from further analysis.

note Note.The value of 500dt is chosen by visual examination, assuming that the string length in the field "Invoice number" is not greater than this value. The parameters specified here define that the maximum penalty (0.005) would correspond to the zero width of the field "Invoice number". For any other widths between 0 and 500dt, quality penalties would be lower.

The line FuzzyQuality: Rect.XCenter - InvoiceHeader.Rect.XCenter, {-10000,0,0,50000} *dt; means that if a non-null hypothesis of the element of the name of the "Invoice number" field is generated (if not InvoiceHeader.IsNull check is run first), then the distance between the center of the detected element InvoiceNumber and the center of the name InvoiceHeader is determined. The difference (Rect.XCenter - InvoiceHeader.Rect.XCenter) is calculated, and the program checks whether this difference belongs to the interval {-10000, 0, 0, 50000}*dt. This description also takes into account the possibility that the field "Invoice number" can be located below the name. In this case, the farther the elements are from each other, the greater is the penalty for the corresponding hypothesis. Hypotheses assuming that the number is located to the right of the name won't be penalized as much as those assuming that the number is below the name, as it is obvious that the "right" arrangement of the field "Invoice number" and its name is much more common.

As is shown in the picture (b), with the specified parameters of the left and the right boundaries of the interval, the maximum penalty (1) will correspond to the shift of the field "Invoice number" from the name field by 10000dt to the left or by 50000dt to the right. A shift of 1000 dot will be penalized by 0.1 if it's a "left" shift, or by 0.02 if it's a "right" shift. Similarly, a shift of 100 dot will be penalized by 0.01 if it's a "left" shift, or by 0.002 - if it's a "right" shift.

(b)

The line FuzzyQuality: Rect.YCenter - InvoiceHeader.Rect.YCenter, {-10000,0,0,10000} *dt; is identical to the previous one. But it is reserved for the cases when the field "Invoice number" is on the same horizontal level or even slightly higher than the field of the name. Penalties here are the same for any vertical shift. The boundaries of the interval are set, in accordance with to the same logic - to support the priority of hypotheses that find the data field to the right of its name. However, the project shows that these settings didn't prevent the correct detection of the invoice number even when it was located below the name (page 3).

After matching the FlexiLayout with all the pages, we see that the two sought fields have been successfully detected.

In conclusion we can say that the FuzzyQuality function is more efficient and flexible compared to the functions of the Nearest group, which is particularly important when processing of semi-structured documents.


Optimizing group element search

If all the hypotheses of the chain of elements in the Group element (Group) have the quality value of 1, then the other hypotheses of these elements won't be analyzed.

note Note.This is done to optimize the FlexiLayout, to quicken the matching procedure and to avoid the unwanted "branching" of the tree of hypotheses. But a hypothesis which is optimal for the program does not necessarily correspond to the sought object on the image. This might happen if the search constraints for the element are not strict enough. So, when such a situation arises, you should first of all analyze the parameters set for the elements search.

Let's consider the project GO.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\GO\1), where we are going to search for the field "Invoice number".

The project has 2 pages:

·Page 1 – the image quality is good;

·Page 2 – the name of the sought field is noisy.

We created the group InvoiceGroup, which contains the element used to search for the field name. This is an element of the Static Text type, named InvoiceHeader, with the value "INVOICE". To search for the field "Invoice number" itself we created an element of type Character String, named InvoiceNumber. We specified the search constraints of the date field search relative to the name in the Relations section of the element InvoiceNumber.

note Note.The letter-case of the name in the section Search text is irrelevant.

Note that the string "Invoice" specified as the value for the element InvoiceHeader occurs on the images three times: as the name of the "Invoice number" field, as a substring in the name "Invoice date" and at the bottom of the invoice, as a substring in the payment conditions "Current invoice is…". So we can predict that there will be three hypotheses after the matching procedure.

After running the FlexiLayout matching procedure by selecting the Match command, we see that the tree of hypotheses in the group InvoiceGroup has only one complete chain instead of the expected three, and the complete chain of hypotheses left does not correspond to the name we are trying to detect.

If you look at the properties of each of the elements in the generated chain, you will see that the Chain quality of each hypothesis is 1, which triggered the optimization - when the program detects an ideal chain in terms of quality (i.e. having the quality 1) it ceases to generate hypotheses.

note Note.To see the tree of hypotheses of the group, double-click the name of the Group element in the tree of hypotheses, or press Enter, or select the Show Details from the shortcut menu.

Why, at the stage of hypotheses generation, one object of the image is preferable over the others is determined the algorithm of the program.

Since the results of matching the FlexiLayout are unsatisfactory, we should analyze the reasons of the problem and decide how it can be solved.

First, we didn't limit the search area for the element InvoiceHeader. Second, when describing the element InvoiceNumber, we specified that the string of digits can be of any length (because we don't know the possible length of the invoice number). We also specified that it should be looked for to the right of the name, at approximately the same horizontal level. As you can see, all the three instances of the word "Invoice" match these conditions. That's why the incorrect detection of the name automatically caused the incorrect detection of the field "Invoice number". You must add some limiting constraints, so that the correct hypothesis is the best in the end, and the FlexiLayout is optimal not only in terms of matching speed.

If we assume that the arrangement of the fields is identical on all the pages of the project, then the easiest way is to "tell" the program that we need the string "Invoice" which is the nearest element to the right edge of the page. So we write the following code in the Advanced pre-search relations section of the element InvoiceHeader: Nearest: PageRight;. We can do so because the name of the sought field "Invoice number" is the only element nearest to the right edge of the page. If it weren't so or if the document weren't formalized, the Nearest function couldn't help us to solve the problem.

To show alternative ways to do this task, including the case with a semi-structured document, we created the project GO.fsp (folder GO\2).

As you can see on the images, the distance between the digit string and the word "invoice" is the smallest in the sought field "Invoice number". This is true on all the pages, which gives us an opportunity to affect the quality values of generated hypotheses by entering the following code in the Advanced post-search relations section of the element InvoiceNumber:

if (not InvoiceHeader.IsNull) and (not IsNull) then
{ FuzzyQuality: Rect.Left - InvoiceHeader.Rect.Right, {0, 0, 0, 10000}*dt; }

It means that if both elements are detected, the distance between the elements is calculated for the hypothesis of the element InvoiceNumber, and the program checks whether it belongs to the interval {0, 0, 0, 10000}*dt. This description of the interval shows the linear dependency between the quality of the hypothesis and the distance between the elements - the longer the distance, the greater the penalty (the function FuzzyQuality restores the post-search quality of the hypothesis - it can be seen in the Properties window of the hypothesis). The value for the right boundary of the interval (10000dt) was determined experimentally. When choosing this value, you should take into account the distance between the corresponding objects on test images.

As is seen from the picture below, under the specified interval properties, the maximum penalty (1) will correspond to a distance of 10000dt. Accordingly, a distance of 1000dt will bring a penalty of 0.1, a distance of 100dt - a penalty of 0.01, etc.

So for real distances of about 100-300 dot, which we can see on our images, the penalty coefficient will be 0.99-0.97.

note Note.See Using Nearest and FuzzyQuality to look for elements for more details about the use of these functions.

For the images in this batch, the hypothesis corresponding to the unwanted field "Invoice number" with the value "2005" got the maximum penalty, while the hypothesis corresponding to the sought field got the minimum penalty. Since penalizing made the Post-search quality of all the hypotheses different from 1, all the hypotheses of both elements of the Group element InvoiceGroup will now be analyzed.

Note that the field "Invoice number" was correctly detected even on page 2, where the name "Invoice" is very noisy, which caused a recognition error and, consequently, additional penalties for the hypothesis.


The "Optional" property of a Group element

At the creation of a Group element the Optional element box is clear by default, i.e. the element is obligatory. At FlexiLayout matching, a non-null hypothesis is generated for an obligatory Group element, even if null hypotheses are generated for all of its subelements. To check the properties of the subelements of such a hypothesis, call the code in their Advanced sections. If the Group element is optional, a null hypothesis can be generated for it (if there are no non-null hypotheses with the quality higher than the quality of a null hypothesis).

It is not recommended to select the Optional element box for Group elements. The reasons for this are that, if the Group element is Optional element and it is not detected (its quality is lower than the quality of a null hypothesis, of the function Dontfind() is called for it), then any call to any of its subelements will cause errors, because in a group with a null hypothesis, the hypotheses of subelements are not formulated. To avoid this error, you must first check the Group element. If the IsNull -check returns True, you mustn't address any of the subelements.

Then why do we need an optional Group element and its null hypothesis? It is needed when the entire group of fields is not present on the image. Then it is useless to search for them. And the search for the elements can be speeded up by calling the DontFind() method for the Group element.

note Note.Under "call" we mean writing code in any of the sections on the Advanced tab or in the block properties in the Expression window. If the properties of a Group element are called when setting the search constraints in Relations, then the IsNull -check is automatic. You can see this if you click Code on the Advanced tab.

To illustrate this, we created the project GroupSample.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Optional Group).

In the Properties dialog box of the Group element InvoiceRequisiteGroup, we selected the Optional element box. On the Advanced tab in the section Advanced pre-search relations we wrote the following code:

if FormID.IsNull then Dontfind();

Next we check for the availability of the element which identifies the document type. By using the element FormID, created prior to the Group element InvoiceRequisiteGroup, we search for the static text with a known value ("ID2015"). If the value of the identifier on the document matches the value specified in the Search text section, then a non-null hypothesis is generated for the element FormID. Otherwise, the static text FormID is not detected and we tell the program not to look for the Group element InvoiceRequisiteGroup, i.e. we created a null hypothesis for the optional Group element InvoiceRequisiteGroup.

In the project there is an element TotalSumHeader that is used to look for the name of the sum field. The following code is entered for the element in the Advanced pre-search relations section:

Below: SearchElements.InvoiceRequisiteGroup.InvoiceDateHeader, 0 * dot;

This code means that the search for the name will be run below the date field described by the element InvoiceDateHeader, which, in its turn, is a subelement of the Group element InvoiceRequisiteGroup.

Let's run the FlexiLayout matching procedure on both pages in the batch. For page 1 the procedure was successful, but at the attempt to apply the FlexiLayout to page 2, the program displays the following error notice: "Page 2: Error in element "SearchElements.TotalSumHeader", Advanced generator parameters section: Attempt to access undefined hypothesis: SearchElements.InvoiceRequisiteGroup".

This happens because on page 2 the value of the identifier of the document is ID 2589. Since this value is different from the one specified in the properties of the element FormID, the function Dontfind() for the Group element InvoiceRequisiteGroup generated a null hypothesis. So in the code we called for a non-existent hypothesis.

The correct code must look like this.

if not( SearchElements.InvoiceRequisiteGroup.IsNull ) then
{ Below: SearchElements.InvoiceRequisiteGroup.InvoiceDateHeader, 0 * dot;}

note Note.If you comment the code in the Advanced pre-search relations section and activate the flag near the similar search constraint of the element TotalSumHeader in the Relations section, then clicking Code in the Advanced tab will show that the compiled code already contains the IsNull -check.


Searching for strings of digits

An element of type Character String is used to search for digit strings. If the image quality is very good, then even a regular expression can be specified as an alphabet. But if the quality of images in the batch differs, we must specify the list of characters that can be recognized in the corresponding field. If the quality of images or print is non-satisfactory, digits can be mistakenly recognized as other characters. For example - "8" can be recognized as "B", "7" - as "?", "5" - as "S", "4" - as "H" or the letter combination "LI", etc. This can happen if the digits are "glued", which is common if documents are filled in by using a typewriter.

The degree of correspondence between the results of recognition and the actual characters depends on the image quality. If there is a tendency to misinterpret characters on all or most of the processed images, then you should add these recognition variants to the alphabet in the Edit Alphabet window of the corresponding element Character String. By specifying these characters, you tell the program not to penalize the hypothesis if these characters are encountered in the search area.

note Note.Certainly, there is no need to specifyallthe possible recognition variants. If the quality of the images is bad, it may be an extremely time-consuming task to find all such variants. If, because of low image quality, the results of the recognition are unpredictable, then you should run the search by using some other element properties, such as string length, length of spaces in the string, etc.

Specify the characters whose outlines are similar to those of digits. The chances of incorrect recognition for such characters are higher than for the rest. If required, you can specify other characters as well, if they are commonly mistaken for digits.

Let's consider the project 1.fsp (folder Digital strings\Project1).

The project has 3 pages.

·Page 1 – the digit 4 is recognized as the combination of letters "LI";

·Page 2 – the substring 13 is recognized as the letter "å";

·Page 3 – the digit 0 is recognized as "a", 2 and 5 are recognized as "S", 6 and 8 – as "B".

To detect the digit string, we created an element of type Character String, named it DigitalString and specified only digits as its alphabet. We set the maximum percentage of non-digit characters at 20.

After running the FlexiLayout matching procedure on all the pages, the digit field on page 3 wasn't fully detected. The quality value of the hypothesis is about 0.98. On pages 1 and 2, the string has been detected. But since it contains non-alphabetic characters, the corresponding hypotheses were penalized and their quality made 0.978 and 0.982 respectively.

Now let's see the results of the FlexiLayout matching if we add to the alphabet the characters that were mistakenly recognized instead of digits: L, I, e, a, B, S.

The result of the FlexiLayout matching can be seen in the project 2.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Digital strings\Project2).

The other settings in the projects are identical.

As you can see, the string on page 3 has been fully detected, and the quality of all the generated hypotheses is 1.


Simplifying the FlexiLayout by using an auxiliary element and a null hypothesis

This method can be used when you need to check the same bulky search constraints for several elements. The idea behind is that constraints are checked and the calculations are performed only once in some auxiliary element. As a result of checking the constraints, the given element is either searched for or not, so the found or unfound hypothesis is a marker signaling whether the constraints are met or not. This auxiliary element is created so that it can always detect something on the images, provided the DontFind() function (i.e. "stop the search") is not activated. The number of hypotheses shouldn't be too large, to avoid over extension of the tree of hypotheses and the time of the FlexiLayout matching. To achieve this, you can use, for instance, elements of the Object Collection or Paragraph types. These elements always generate a single hypothesis that includes all the objects of the specified type from the search area. In the Advanced pre-search relations section of the dummy element we write the set of conditions that we want to check for some of the elements located below the dummy element in the project tree. If all the conditions are met, we call the DontFind() function for the dummy element. In this case a null hypothesis will be generated for the dummy element, and it will serve as a marker that all the conditions have been met when the program starts searching for other elements. By doing so, we tell the program to run only the IsNull -check of the dummy element instead of checking the same bulky constraints for several elements.

note Note.This method helps to make the code more descriptive. Additionally, if you need to edit the constraints, you can do this only in the description of the dummy element. It lowers the chances of logical and syntactical errors when duplicating the code.

note Note.In the future versions of the product we plan to support creation of variables in the area of subelements of groups. The results of checking the constraints will then be stored in the values of different variables. The current method is a temporary solution (workaround) that helps to simplify the code in the Advanced sections in the present version of FlexiLayout Studio.

Let's see how this method works in the project 1.fsp (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks\Auxiliary element).

On these images, we will search for the following fields: "Invoice number", "Invoice date", "Company name", and "Company address".

Let's assume that we have to process invoices of two different types:

·The fields "Company name" and "Company address" are above the field "Invoice number";

·The fields "Company name" and "Company address" are below the field "Invoice number".

As you can see from the images, the fields "Company name" and "Company address" don't have names, which prevents us from using the standard procedure of looking for the date field by relying on its name. However, we can notice a certain pattern: when the date field is located to the right of the invoice number, the company name and address are located below the field "Invoice number" (pages 1 and 3); while if the date field is below the invoice number field, then the company details are above the field "Invoice number" (pages 2 and 4).

taking into account the detected pattern, it is would be best to search for the location of the fields "Invoice number" and "Invoice date" first. And then we are going to detect the other fields by relying on these two, specifying their mutual locations.

We have create a Group element InvoiceGroup that contains elements InvoiceHeader, InvoiceNum, DateHeader and a Group element DateGroup. These subelements are required to detect field names and the fields "Invoice Number" and "Invoice date".

note Note.See Detecting dates in the case of low quality pre-recognition for more details on the methods of date search. Here we only describe the constraints for the date search in the current project.

As you can see, the date fields on the images do not always have names. So, when searching for a date field, you need to specify two sets of constraints: for cases when the name has been detected and for cases when the name has not been detected (a special case would be if the name is present on the page but has not been detected, for example, because of noise).

if not DateHeader.IsNull then
{ RightOf: DateHeader.Rect.Right;
Below: DateHeader.Rect.Top - 30dt;
Above: DateHeader.Rect.Bottom + 30dt;
}
else
{ RectArray ar;
Let ar1 = Rect (InvoiceNum.Rect.Right, InvoiceNum.Rect.Top-30dt, PageRect.Right, InvoiceNum.Rect.Bottom + 30dt);
Let ar2 = Rect (InvoiceHeader.Rect.Left, InvoiceHeader.Rect.Bottom, InvoiceHeader.Rect.Right + 300dt, InvoiceHeader.Rect.Bottom + 150dt);
ar = RectArray (ar1);
ar.Add (ar2);
RestrictSearchArea (ar);
}

If the name of the date field is detected (the constraint if not DateHeader.IsNull is checked), then the search will be carried out relative to the name of the date field: to the right of the name, on one horizontal level, with some margin of error for vertical displacement:

{ RightOf: DateHeader.Rect.Right;
Below: DateHeader.Rect.Top - 30dt;
Above: DateHeader.Rect.Bottom + 30dt;
}

Otherwise the search area is divided into two rectangles: to the right of the invoice number and on the same level as the invoice number and below the invoice field.

note Note.For the sake of simplicity we assume that we have images of good quality where the field "Invoice number" and its name are always detected. In a real-life situation, before calling the properties of these elements we must run their IsNull-check, because if the elements are not detected, further search will be carried out relative to the search areas of the corresponding elements.

In the Advanced post-search relations section of the element Date we wrote the following code:

if (DateHeader.IsNull) and (not IsNull) then
{if (not InvoiceHeader.IsNull) then
{ FuzzyQuality: Rect.Left - InvoiceHeader.Rect.Right, {0, 0, 0, 50000}*dt;
FuzzyQuality: Rect.Top - InvoiceHeader.Rect.Bottom, {-50000, 0, 0, 50000}*dt;
}
if (not InvoiceNum.IsNull) then
{ FuzzyQuality: Rect.Left - InvoiceNum.Rect.Right, {0, 0, 0, 50000}*dt;
FuzzyQuality: Rect.Top - InvoiceNum.Rect.Bottom, {-50000, 0, 0, 50000}*dt;
}
}

It allows influencing the quality of the date hypothesis depending on its distance from the name of the invoice field and the field "Invoice number" itself if the name of the date field is not detected. The longer the distance to the specified fields, the greater the penalty will be for the corresponding hypotheses, i.e. we search for the date field nearest to the field "Invoice number".

note Note.See Using Nearest and FuzzyQuality to look for elements for more details on the use of these functions.

We specify identical search constraints for the element DateAsString, but in the Advanced post-search relations section we add one more line to the above-mentioned code:

FuzzyQuality: 600dt - Width, {0, 0, 0, 50000}*dt;

This line is needed during date search, so that a hypothesis with a longer string of alphabet characters is preferable to a shorter one.

Additionally, on the Search Constraints tab of the element DateAsString we specified that, when searching for the date as a string of characters, the region of the element InvoiceNum must be excluded. This is because we decided, for the sake of simplicity, not to duplicate for the element DateAsString the same search constraints as we specified in the Advanced pre-search relations section of the element Date. We specified the search area as RestrictSearchArea (Date.Rect);. We thus told the program to search for the object of the element DateAsString in the area of the fuzzy rectangle of the element Date. The search area of the element Date can be represented as an array of rectangles. When a null hypothesis is generated for the element Date, the rectangle enclosing the search area is taken as a rectangle (Rect) of the current element. As you can see on the image below, it also encloses the field "Invoice number" described by the element InvoiceNum. Under some conditions (for instance, when the date field is very noisy), a situation may occur when, instead of the date field, the element DateAsString will detect the field of the invoice number, as characters (including digits) specified for this element do not have any format restrictions.

After the elements required to search for the fields "Invoice number" and "Invoice date" have been described, we can go on to the search for the fields "Company name" and "Company address".

We create an element of type Paragraph and name it ShamElement. This element serves as an auxiliary element and is used exclusively to check the mutual location of the fields "Invoice number" and "Invoice date".

In the Advanced pre-search relations section of the auxiliary element, we wrote the following code:

Let Date1 = InvoiceGroup.DateGroup.Date;
Let Date2 = InvoiceGroup.DateGroup.DateAsString;
Let DateGroup = InvoiceGroup.DateGroup;
Let InvoiceHeader = InvoiceGroup.InvoiceHeader;
Let InvoiceNumber = InvoiceGroup.InvoiceNum;

if ((not InvoiceHeader.IsNull) or (not InvoiceNumber.IsNull)) and
(
((Date1.IsNull == FALSE) and ((max (InvoiceHeader.Rect.YCenter - Date1.Rect.YCenter, Date1.Rect.YCenter - InvoiceHeader.Rect.YCenter ) < 30dt) or (max (InvoiceNumber.Rect.YCenter - Date1.Rect.YCenter, Date1.Rect.YCenter - InvoiceNumber.Rect.YCenter ) < 30dt)) and ((Date1.Rect.Left - InvoiceHeader.Rect.Right > 100dt) or (Date1.Rect.Left - InvoiceNumber.Rect.Right > 50dt)))
or
((Date2.IsNull == FALSE) and ((max (InvoiceHeader.Rect.YCenter - Date2.Rect.YCenter, Date2.Rect.YCenter - InvoiceHeader.Rect.YCenter ) < 30dt) or (max (InvoiceNumber.Rect.YCenter - Date2.Rect.YCenter, Date2.Rect.YCenter - InvoiceNumber.Rect.YCenter ) < 30dt)) and ((Date2.Rect.Left - InvoiceHeader.Rect.Right > 100dt) or (Date2.Rect.Left - InvoiceNumber.Rect.Right > 50dt)))
)
then
{ Dontfind(); }
else
{ Below: PageRect.Top; }

Despite the simplicity of constraints checked by this code, the code itself turned rather bulky. Its idea is that, if the date field detected by means of one of the elements Date or DateAsString is located to the right of the invoice number field but on the same level (with a vertical tolerance of 30 dt), then we tell the program that a null hypothesis must be generated for the auxiliary element. In the other cases the element ShamElement will be looked for below the top edge of the page. Since we created an auxiliary element of type Paragraph without any additional search constraints, it will enclose all text objects on the page and a single hypothesis will be generated.

Nearly all the constraints to be checked are intuitively clear. So we are only going to describe the most complicated of them.

max (InvoiceHeader.Rect.YCenter - Date1.Rect.YCenter, Date1.Rect.YCenter - InvoiceHeader.Rect.YCenter ) < 30dt

This part of the code checks that the date field (in this case, if it is detected by the element Date) is located on one horizontal level with the element of the name of the field "Invoice number". The date may be slightly higher or lower than the name (because of the possible errors during scanning or document filling). We specified that the maximum difference is 30 dt. We check the mutual vertical location of the field "Invoice date" and "Invoice number" by the same method.

Date1.Rect.Left - InvoiceHeader.Rect.Right > 100dt

This line checks that the date field is located to the right of the name of the field "Invoice number" (the coordinate of the left boundary of the date is greater than that of the right boundary of the name). We specified a tolerance of 100dt because between the name and the date there must be the invoice number itself. The location of the date field is to the right of the field "Invoice number".

All the conditions of the check are then duplicated for the element DateAsString.

To check that our code is correct, let's run the FlexiLayout matching procedure on all the pages. We see that on pages 1 and 3, where the date field is located to the right of the invoice number, a null hypothesis was generated for the element ShamElement. On the other two pages, text fragments were detected.

To detect the company details, we create a Group element CompanyGroup. It groups the elements CompanyName of type Character String (the company name on test images is written in a single line) and Address of type Paragraph. The element will be used to search for the block containing the company address.

The use of the auxiliary element helps to simplify the code which describe the search constraints of the element in the Advanced pre-search relations section. So, if the auxiliary element is not detected (i.e. a null hypothesis is generated for it), this will mean that the date field is located to the right of the invoice field. In such a case, the field "Company name" will be looked for below the field "Invoice number". If the auxiliary element is detected, the field "Company name" will be looked for above the field "Invoice number".

if ShamElement.IsNull then
{ Below: InvoiceGroup.InvoiceHeader;
Below: InvoiceGroup.InvoiceNum;
NearestY: PageRect.Top;
}
else
{ Above: InvoiceGroup.InvoiceHeader;
Above: InvoiceGroup.InvoiceNum;
}

note Note.In this case we can use the function Nearest, as it helps to detect the field containing the company name unambiguously and accurately (there are no objects matching the same search constraints).

In the Advanced post-search relations section of the element CompanyName we write the following code.

if not IsNull then
{ FuzzyQuality: Rect.Left - PageRect.Left, {0, 0, 0, 50000}*dt;
FuzzyQuality: Rect.Top - PageRect.Top, {0, 0, 0, 50000}*dt;
FuzzyQuality: 100dt - Height, {0, 0, 0, 10000}*dt;
}

This code works when the single-line field "Company name" is looked for above the field of the invoice number. The sought fields don't have names. At the same time, the mutual location of the fields "Company Name" and "Company address" is different on pages 2 and 4. The constraint Above: InvoiceGroup.InvoiceHeader; and Above: InvoiceGroup.InvoiceNum; is met not only be the string with the company name, but also by the strings in the address field.

To select the only correct hypothesis among all the generated hypotheses, the following code in the Advanced post-search relations section is used.

By typing the code

FuzzyQuality: Rect.Left - PageRect.Left, {0, 0, 0, 50000}*dt;

and

FuzzyQuality: Rect.Top -PageRect.Top, {0, 0, 0, 50000}*dt;

we tell the program to stronger penalize hypotheses with objects close to the bottom and right boundaries of the image. However, on page 2 the field "Company name" is located to the left of the address field but lower then its upper line. So the described constraints are not sufficient to detect the sought field "Company name", and we have to add one more constraint.

FuzzyQuality: 100dt - Height, {0, 0, 0, 10000}*dt;

This line tells the program to check the height of all the lines for the generated hypotheses. The taller the characters in the line are, the higher the quality of the corresponding hypothesis.

After we have matched the FlexiLayout we see that the field "Company name" has been successfully detected on all the pages.

To detect the address field we wrote the following code in the Advanced pre-search relations section of the element Address:

if ShamElement.IsNull then
{ Below: CompanyName;
Above: TotalSumHeader.Rect.Top;
}
else
{
Above: InvoiceGroup.InvoiceHeader;
Above: InvoiceGroup.InvoiceNum;
RightOf: CompanyName.Rect.Left;
Exclude: CompanyName;
}

Here again we use the auxiliary element ShamElement, which helps to simplify the code.

The creation of a FlexiLayout is now complete. Once we have run the FlexiLayout matching procedure we will see that all the fields have been successfully detected.


Describing text fields containing framed letters

Sometimes you may need to create a FlexiLayout to look for fields which typically occur on traditional documents with a fixed layout. For example, you may need to describe a field in which letters must be entered into small frames. A typical example would be a company collecting documents from its regional offices. Even if the documents are expected to look the same, there may be subtle differences in layouts from one regional office to another, which means that they cannot be processed using a single "hard" Document Definition. In this case one FlexiLayout may be preferable to several slightly different "hard" Document Definitions.

If data fields sought on the document are of "framed letters" or "separate framed letters" type, a separator-based search for the boundaries of such fields can be very complicated, and the description of elements can turn bulky, particularly if the names for such fields are not available or uncertainly recognized. Moreover, it is very important that the block contain not only these fields but the entire frame as well. If separator lines are thin, they may sometimes be misprinted or lost during scanning. In such cases it is recommended to search for the boundaries using White Gap elements. Such field boundaries are described in the special FlexiLayout language in the Expression field of the block's Properties dialog box. You can describe the top boundary of the field as the bottom of the top white gap, the bottom boundary as the top of the bottom white gap, the right boundary of the field as the left boundary of the right white gap, and the left boundary of the field as the right boundary of the left white gap.

A FlexiLayout Studio project which contains test images and a tested FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\Tips and Tricks.

Example

Let us assume that all the 4 gaps (LeftGapName, RightGapName, TopGapName, BottomGapName) which are required to formally describe the location of the data field in the picture have been found.

The code in the Expression field will then look as follows:

Rect outputRect;
Let FieldLeft = LeftGapName.Rect.Right;
Let FieldRight = RightGapName.Rect.Left;
Let FieldTop = TopGapName.Rect.Bottom;
Let FieldBottom = BottomGapName.Rect.Top;
outputRect = Rect(FieldLeft, FieldTop, FieldRight, FieldBottom);
OutputRegion = outputRect;

note Note.Instead of "LeftGapName", "RightGapName", "TopGapName" and "BottomGapName" you should put the names of the corresponding White gap elements. If required, you can extend the field's width and height by using the Inflate option.

If data fields sought on the document are multiple-line fields which have the marking of "framed letters" or "separate framed letters" type, and the lines are not separated from each other by gaps, then you should look for top, bottom, right and left boundaries by using White Gap elements. Search for individual lines should then be specified by a special algorithm in the Expression field. In the given example, the height of each individual line can be calculated by dividing the height of the entire field by 2.


Appendix

Shortcut keys

Properties of image objects detected during pre-recognition

Supported image formats

Barcodes supported in ABBYY FlexiLayout" Studio

OCR languages supported in ABBYY FlexiLayout" Studio

User dictionaries

Alphabet used in regular expressions

Extended regular expressions

Dialog boxes

End-User License Agreement

Patents

How to buy ABBYY FlexiCapture

Third-party technologies


Shortcut keys

Show/Hide Hidden Text

How to set up shortcut keys

File menu

Command | Keys
New Project... | Ctrl+N
Open Project... | Ctrl+O
Save | Ctrl+S
Exit | Alt+X

Edit menu

Command | Keys
Cut | Ctrl+X
Copy | Ctrl+C
Paste | Ctrl+V
Delete | Del
Delete Page Data | Alt+Del
Select All | Ctrl+A
Find in Code... | Alt+F3
Go to Page... | Ctrl+G

View menu

Command | Keys
Hypotheses | Alt+5
Log | Alt+6
Show element references browser | Ctrl+Alt+R
Show Search Area | Alt+A
Hide Active Blocks or Elements | Ctrl+H
Images → Scale → Zoom In | Ctrl+NUM*
Images → Scale → Zoom Out | Ctrl+NUM/
Images → Tool → Create Element | Ctrl+Space
Images → Tool → Draw Location | Alt+Space

Batch menu

Command | Keys
Set Matched Result as Reference | Shift+R
Next Page | Ctrl+D
Previous Page | Alt+Left Arrow
Next document | Ctrl+Shift+NUM +
Previous document | Ctrl+Shift+NUM -

FlexiLayout / Classifier menu

Command | Keys
Match | Ctrl+E
Elements → Disable Element | Ctrl+Alt+D
Elements → Test Element | Ctrl+T

Tools menu

Command | Keys
Pre-recognize | Ctrl+R
Options... | F12

Image window

Command | Keys
Match/ Classify | Ctrl+E
Match Reference Document | Ctrl+Shift+E
Set Reference FlexiLayout Alternative → Create new alternative... | Shift+N
Clear Alternative | Shift+Del
Go to Page... | Ctrl+G
Pre-recognize | Ctrl+R
Hide Active Blocks or Elements | Ctrl+H
Show Search Area | Alt+A
Delete Pages / Delete Active Regions | Del
Scale → Zoom In | Ctrl+NUM*
Scale → Zoom Out | Ctrl+NUM/
Tool → Create Element | Ctrl+Space
Tool → Draw Location | Alt+Space
Test Element | Ctrl+T
Properties... | Alt+Enter

Hypotheses window

Command | Keys
Show Details | Enter
Go One Level Up | Backspace
Expand Active | Space
Expand All | NUM *
Collapse All | Shift+NUM *
Show Search Area | Alt+A
Element Properties... | Alt+Enter

Batch window

Command | Keys
Match / Classify | Ctrl+E
Set Matched Result as Reference | Shift+R
Clear Alternative | Shift+Del
Match Reference Document | Ctrl+Shift+E
Pre-recognize | Ctrl+R
Delete Pages | Del
Delete Page Data... | Alt+Del
Properties... | Alt+Enter

FlexiLayout window

Command | Keys
Build FlexiLayout / Build Classifier | Ctrl+B
Cut | Ctrl+X
Copy | Ctrl+C
Paste | Ctrl+V
Delete | Del
Rename | F2
Disable Element / Enable | Ctrl+Alt+D
Find in Code | Alt+F3
Test Element | Ctrl+T
Show element references | Ctrl+Alt+R
Properties... | Alt+Enter

Properties window

Command | Keys
Copy Value | Ctrl+C


Properties of image objects detected during pre-recognition

Show/Hide Hidden Text

These properties are displayed in the Properties dialog box. To view the properties of an image object, select it in the Image window.

The properties of image objects are read-only, but you can select and copy their values to paste them into the Element Properties dialog box.

Recognized Word

Property | Description
Object type | The type of the object - Text.
Surrounding rect | The coordinates of the surrounding rectangle.
Width | The width of the object.
Height | The height of the object.
Recognized text | The words recognized during pre-recognition.

Recognized Line

Property | Description
Object type | The type of the object - Recognized line.
Surrounding rect | The coordinates of the surrounding rectangle.
Width | The width of the object.
Height | The height of the object.
Recognized text | The lines recognized during pre-recognition.

Separator

Property | Description
Object type | The type of the object - Separator.
Surrounding rect | The coordinates of the surrounding rectangle.
Width | The width of the object.
Height | The height of the object.
Orientation | The orientation of the separator - Vertical or Horizontal.

Raw Objects

Property | Description
Object type | The type of the object - Image (elementary object).
Surrounding rect | The coordinates of the surrounding rectangle.
Width | The width of the object.
Height | The height of the object.
Data type | The type of the elementary object: ·Any Text ·Picture ·Punctuation Mark ·Inverted ·Checkmark

Barcode

Property | Description
Object type | The type of the object - Barcode.
Surrounding rect | The coordinates of the surrounding rectangle.
Width | The width of the object.
Height | The height of the object.
Text | The recognized value of the barcode.
Type | The type of the barcode.
Orientation | The orientation of the barcode: ·Left to right ·Bottom to top ·Right to left ·Top to bottom


Supported input formats

Show/Hide Hidden Text
Common office files
Document Type | Supported File Extensions
Text documents | *.doc, *.docx, *.rtf, *.htm/*.html, *.txt, *.odt
Spreadsheets | *.xls, *.xlsx, *.ods
Presentations | *.ppt, *.pptx, *.odp

note Note.Microsoft Office 2010 and earlier versions cannot be used to convert *.odt, *.ods and *.odp files.
Image files
Format | Color
BMP | black-and-white, grayscale, color
PCX, DCX | black-and-white, grayscale
PNG | black-and-white, grayscale, color
JPEG, JPEG2000 | grayscale, color
TIFF | black-and-white uncompressed, CCITT3, CCITT3FAX, CCITT4, Packbits; grayscale – uncompressed, Packbits, JPEG; color – uncompressed, JPEG
PDF | regardless of their type, PDF files are opened only as images (a separate license is required)
XPS | color; requires Microsoft.Net Framework 3.0
WIC-compatible | color; requires Windows Imaging Component (part of Microsoft.Net Framework 3.0)
DjVu | black-and-white, grayscale, color


Barcodes supported in ABBYY FlexiLayout™ Studio

ABBYY FlexiLayout Studio supports the following types of barcode:

·Australia Post

·Aztec

·Codabar

·Codabar with checksum

·Code 128

·Code 32

·Code 39

·Code 39 with checksum

·Code 39 with asterisk

·Code 93

·DataMatrix

·EAN 13

·EAN 8

·IATA 25

·Industrial 25

·Intelligent Mail

·Interleaved 25

·Interleaved 25 with checksum

·Japan Post

·Matrix 25

·Patch Code

·PDF 417

·Postnet

·QRCode

oQR code (Version 1-40)

oMicro QR Code (Version M1-M4)

·UCC-128

·UPC A

·UPC E


OCR languages supported in ABBYY FlexiLayout™ Studio

·Abkhaz

·Adyghe

·Afrikaans

·Agul

·Albanian

·Altai

·Arabic (Saudi Arabia)

·Armenian (Eastern)

·Armenian (Grabar)

·Armenian (Western)

·Avar

·Aymara

·Azeri (Cyrillic alphabet)

·Azeri (Roman alphabet)

·Bashkir

·Basque

·Belarusian

·Bemba

·Blackfoot

·Breton

·Bugotu

·Bulgarian

·Buryat

·Catalan

·Cebuano

·Chamorro

·Chechen

·Chinese Simplified

·Chinese Simplified and English

·Chinese Traditional

·Chinese Traditional and English

·Chukchee

·Chuvash

·Corsican

·Crimeam Tatar

·Croatian

·Crow

·Czech

·Dakota

·Danish

·Dargwa

·Dungan

·Dutch

·Dutch (Belgian)

·English

·English Legal Terminology

·English Medical Terminology

·Eskimo (Cyrillic alphabet)

·Eskimo (Roman alphabet)

·Esperanto

·Estonian

·Even

·Evenki

·Faroese

·Fijian

·Finnish

·French

·Frisian

·Friulian

·Gagauz

·Galician

·Ganda

·German

·German (Luxembourg)

·German (New Spelling)

·German Legal Terminology

·German Legal Terminology (new spelling)

·German Medical Terminology

·German Medical Terminology (new spelling)

·Greek

·Guarani

·Hani

·Hausa

·Hawaiian

·Hebrew

·Hungarian

·Icelandic

·Ido

·Indonesian

·Ingush

·Interlingua

·Irish

·Italian

·Japanese

·Japanese and English

·Jingpo

·Kabardian

·Kalmyk

·Karachay-Balkar

·Karakalpak

·Kashubian

·Kawa

·Kazakh

·Khakass

·Khanty

·Kikuyu

·Kirghiz

·Kongo

·Korean

·Korean (Hangul)

·Korean and English

·Koryak

·Kpelle

·Kumyk

·Kurdish

·Lak

·Latin

·Latvian

·Latvian Gothic

·Lezgi

·Lithuanian

·Luba

·Macedonian

·Malagasy

·Malay (Malaysian)

·Malinke

·Maltese

·Mansi

·Maori

·Mari

·Maya

·Miao

·MICR (CMC-7)

·MICR (E-13B)

·Minangkabau

·Mohawk

·Moldavian

·Mongol

·Mordvin

·Nahuatl

·Nenets

·Nivkh

·Nogay

·Norwegian

·Norwegian (bokmal)

·Norwegian (nynorsk)

·Nyanja

·Occidental

·Occitan

·Ojibway

·Old English

·Old French

·Old German

·Old Italian

·Old Spanish

·Ossetian

·Papiamento

·Polish

·Portuguese

·Portuguese (Brazilian)

·Provencal

·Quechua (Bolivia)

·Rhaeto-Romanic

·Romanian

·Romany

·Rundi

·Russian

·Russian (old spelling)

·Russian and English

·Russian with accent

·Rwanda

·Sami (Lappish)

·Samoan

·Scottish Gaelic

·Selkup

·Serbian (Cyrillic alphabet)

·Serbian (Roman alphabet)

·Shona

·Simple chemical formulas

·Slovak

·Slovenian

·Somali

·Sorbian

·Sotho

·Spanish

·Sunda

·Swahili

·Swazi

·Swedish

·Tabasaran

·Tagalog

·Tahitian

·Tajik

·Tatar

·Thai

·Tok Pisin

·Tongan

·Tswana

·Tun

·Turkish

·Turkmen (Cyrillic)

·Turkmen (Latin)

·Tuvinian

·Udmurt

·Uighur (Cyrillic alphabet)

·Uighur (Roman alphabet)

·Ukrainian

·Uzbek (Cyrillic alphabet)

·Uzbek (Roman alphabet)

·Vietnamese

·Welsh

·Wolof

·Xhosa

·Yakut

·Yiddish

·Zapotec

·Zulu


User Dictionaries

Show/Hide Hidden Text

A User Dictionary is an auxiliary dictionary created by the user which contains words not included in the built-in dictionaries. Built-in dictionaries can be supplemented with a user dictionary to improve the quality of data capture. Typically, a user dictionary will contain specialized terms, abbreviations, company names, etc.

You can set up and enable user dictionaries on the Languages tab of the Pre-recognition Properties dialog (to open this dialog, open the FlexiLayout or Classifier menu, click Properties and then click the Advanced pre-recognition properties... button).

Existing user dictionaries are listed in the User Dictionaries field along with the following information:

·Enabled
Indicates whether the User Dictionary is being used.

·Name
The name of the custom dictionary.

·Language
The language of the custom dictionary.

Creating and editing a custom dictionary

To add a custom dictionary, click the Add... button on the Languages tab of the Pre-recognition properties dialog. Then, in the Add New Dictionary dialog box that opens, specify the following properties:

·Dictionary name
The name of the dictionary.

·Definition method
The dictionary's type:

oDictionary file
This type of dictionary is based on a DIC file.

oRegular expression
This type of dictionary is based on a regular expression.

note Note.A dictionary's type cannot be changed after the dictionary has been created.

·Is language-neutral
If this option is enabled, the custom dictionary will be used alongside all built-in dictionaries for all enabled recognition languages. The Language parameter will be set to Neutral and this setting will become impossible to change. This option is only available for user dictionaries of the Regular expression type.

·Language (locale)
The dictionary's language can be selected from this drop-down list. A dictionary's language cannot be changed after the dictionary has been created.

When you click the OK button, a dialog box with a list of all editable and uneditable parameters will appear.

To view a dictionary's properties, select a dictionary and then click the Edit button. The General tab of a dictionary's properties dialog contains its general properties: the dictionary's name, type, language, and any user comments. The name of a dictionary can be changed after the dictionary has been created.

The Dictionary tab of a dictionary's properties dialog contains settings that depend on the dictionary's type and user alphabet settings.

·If you select the Dictionary file type when creating the dictionary, click the [image] button and specify the path to a DIC file or create a new dictionary by clicking the Create new dictionary.... If you decide to create a new dictionary, specify its name in the Create New Dictionary File dialog box and click OK, then specify its settings in the editor.
Commands of the dictionary editor

Button | Description
Add | Adds a value to a user dictionary.
Delete | Deletes the value currently selected in the list.
Import... | Imports values from a TXT or DIC file to the user dictionary. note Note.Punctuation marks (.,;:/*{}[]<>? etc.) are used as separators between words in dictionaries. If you want to use these symbols in dictionary words, place the following string in the beginning of the text file: "DICTIONARY_PROPERTIES=USE_CONFIDENCE". In this case only line break symbols will be treated as separators between words. In this case the number after the first space in the sting will indicate the weight of the word, and all other symbols will bee ignored.
Export... | Exports values from the dictionary to a TXT file.
Close | Closes the editor.

When a dictionary is created, it is saved as a DIC file in the project folder.

·If you selected the Regular expression dictionary type, specify the expression. You can click the Button button to open a menu that will help you create the expression. For details, see Alphabet used in regular expressions.

note Note.Words from a user dictionary have a higher priority than words from a built-in dictionary. Enabling the Prefer words from dictionary further increases the priority of words from a dictionary.

User Alphabets

You can create a user alphabet Alphabet group on the Dictionary tab of a dictionary's properties dialog. A user dictionary is a set of characters, separators, prefixes and suffixes that may be used in a user dictionary. If a user alphabet is used together with a user dictionary, dictionary words that contain characters which are not in the user alphabet are considered to be non-dictionary words. In other words, a user alphabet can be used to limit the set of characters that are permitted for custom dictionaries.

To specify permitted characters, enable the Use custom alphabet option and then specify the alphabet's symbols in the text box or by using the editor. You can open the editor by clicking the Edit button.

To specify permitted separators, prefixes, suffixes and ignored characters (collectively referred to as punctuation marks in this section for simplicity's sake), click the Advanced parameters button. In the Advanced custom alphabet parameters dialog box, specify the punctuation marks.

·Punctuation marks adjoining the beginning of word
Punctuation marks that may adjoin the beginning of a word, such as the underscore in "_unknown".

·Punctuation marks adjoining the end of word
Punctuation marks that may adjoin the beginning of a word, such as the ampersand in "user&".

·Standalone punctuation marks
Punctuation marks that may occur separately, such as the vertical bar in "January |"

You can specify symbols which you want the program to ignore when checking words against the user dictionary in the Exclusion characters group of options. For example, if you specify the regular expression "+33NNNNNNNN and the hyphen (-) as ignored character, the program will consider "+33-11111111", "+33-111-11-111" and "+33-111-111-11" as matches for the regular expression.


Alphabet used in regular expressions

A regular expression is a formal description of the structure of a word or a field value.

Name | Conventional designation | Usage example
Any character | * | "c"*"t" – allows such words as cat, cot, etc.
Letter | C | C"ot" – allows such words as Rot, pot, cot, Dot, mot, etc.
Uppercase letter | A | A"ot" – allows such words as Rot, Cot, Mot, Dot, etc.
Lowercase letter | a | a"ot" – allows such words as rot, cot, mot, dot, etc.
Letter or number | X | X – allows any standalone number or letter.
Number | N | N"th" allows such words as 5th, 4th, 6th, etc.
String | " " | "cot"
Or | | | "pl"("o"|"a")"t" – allows words "plot" and "plat".
Character from group | [] | [tm]"ot" – allows words "tot" and "mot".
Character not from group | [^] | [^t]"ot" – allows words "cot", "lot", etc., but does not allow the word "tot".
Any number of repetitions (applies to the expression or subexpression on the left) | {-} | [AB74]{-} – allows any combinations of characters A, B, 7, 4 of any length.
Number of repetitions n | {n} | N{2}"th" allows such words as 25th, 84th, 11th, etc.
From n to m repetitions | {n-m} | N{1-3}"th" allows such words as 5th, 84th, 111th, etc.
From 0 to n repetitions | {-n} | N{-2}"th" allows such words as 84th, 5th, etc.
From n repetitions and more | {n-} | N{2-}"th" allows such words as 25th, 834th, 311th, 34576th, etc.
Subexpression | () |
Hyphen symbol | [\-] |
Slash symbol | [\\] |

Examples of regular expressions:

1.Postal code: [0-9]{6}
An sample value: "142172"

2.Zip code (USA): [0-9]{5}("-"[0-9]{4}){-1}
Sample values: "55416", "33701-4313"

3.Income: N{4-8}[,]N{2}
Sample values: "15000,00", "4499,00"

4.Month in the numerical form: ((|"0")[1-9])|("10")|("11")|("12")
Sample values: "4", "05", "12"

5.Fraction: ("-"|)([0-9]{1-})(|(("."|",")([0-9]{1-})))
Sample values: "1234,567", "0.99", "100,0", "-345.6788903"

6.E-mail: [A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-3}"@"[A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-4}"."([A-Za-z]{2-4}|"asia"|"museum"|"travel"|"example"|"localhost"
Sample values: "support@abbyy.com", "my-name@company.org.ru", "info@gallery.museum"

See also:

Extended regular expressions


Extended regular expressions

Formats are specified by means of extended regular expressions.

Extended regular expressions are regular expressions with additional functionality enclosed between an opening bracket followed by a percent character and a percent character followed by a closing bracket ([% and %]). Extended regular expressions have the following additional features:

1.One or more characters inside the brackets are supplemented with popular OCR errors.
For example, [%S%] may allow S, $, and 5.

2.Special words inside [%...%] for common character sets and OCR errors:

a.LETTERS — Capital Latin letters and characters commonly recognized as capital Latin letters;

b.DIGITS — Digits and characters commonly recognized as digits;

c.LETERSANDDIGITS — Capital Latin letters, digits, and characters commonly recognized as capital Latin letters and digits.

For example, [%DIGITS%]{9} specifies nine consecutive digits or common OCR errors for digits, e.g. "OI234Sb7B9".

note Note.If search results are not satisfactory, open the Advanced > Code tab in the element's properties, check the regular expression to make sure there are no mistakes, and then copy it to the Regular Expression box and check the alphabet.


Dialog boxes

Options dialog box

Fuzzy interval visual editor

Element Properties dialog box


Options dialog box

Navigation: Appendix > Dialog boxes >

Return to chapter overview

Options... dialog box

Show/Hide Hidden Text

This dialog box allows you to select colors of objects and highlighting lexemes, possible page orientation, units of measurement to be used in the program, settings used when training a FlexiLayout and some other options. You can open the Options dialog box by selecting Tools → Options… or by pressing F12.

Show Options dialog box

options

Option

Description

Colors tab

Layout colors group

Selects the colors of objects in the program (the colors of elements, hypotheses, search area, etc.). Select the desired object, click the color button, and select the desired color on the palette.

Reset and Reset All buttons

Clicking Reset selects the default color for the object.

Clicking Reset All selects the default colors for all objects.

Text colors group

Selects the color of lexemes in code (the colors of key words, variables, comments, etc.). Select the desired object, click the color button, and select the desired color on the palette.

Reset and Reset All buttons

Clicking Reset selects the default color for the object.

Clicking Reset All selects the default colors for all objects.

Show image in black and white

Select this option to display color images in black and white. Clear this option to display color images.

Orientation And Units tab

Orientation correction group

Correct orientations of pages

Selects the possible orientation of pages in the batch. Select Image → Correct Orientation to select page orientation automatically based on the selected pre-recognition language. If none of the options is selected, orientation will not be corrected automatically. The possible orientations of pages:

·Rotated 180° - select this option if the batch may contain pages rotated by 180°

·Rotated 90° clockwise - select this option if the batch may contain pages rotated by 90° clockwise

·Rotated 90° counterclockwise - select this option if the batch may contain pages rotated by 90° counterclockwise

Units group

Selects the units of measurement to be used in the program: dots, centimeter, millimeter, points, inches. All the measurements (element sizes, distances) will be in the units selected in this dialog box.

Training tab

Navigation group

Selects the navigation mode to be used when training a FlexiLayout. You can navigate on pages containing:

·any unmarked element

·any unmarked field

·any unmarked static element

·unmarked selected element

Draft layout prediction group

Predict layout automatically on navigation

Selects this option to match the draft layout on navigation.

Replace existing regions of fields on batch prediction

Selects this option to remove existing boxes from the image when matching a draft layout.

Template generations group

Create Identifiers on Generation

Enables automatic creation of identifiers for layout alternatives during training.

Shortcuts tab

You can use this tab to specify keyboard shortcuts for specific commands. You can also change existing keyboard shortcuts.

Category (drop-down list)

Contains a list of all command categories. When you select a category, all commands in that category will be displayed. Select All commands to display all existing commands in the command list.

The name of a category usually matches the name of the menu item that contains the commands in that category. The Elements tree category contains commands from the FlexiLayout menu in the case of a flexible layout project or commands from the Classifier menu item in the case of a classifier project.

Command list

This is a list of all commands in the selected category. The Action column contains the names of commands and the HotKey column contains one of the keyboard shortcuts for commands. Every command can have several keyboard shortcuts.

To sort commands by names or keyboard shortcuts, click the name of either the Action or the HotKey column.

Current shortcuts box

When you select a command, all of its keyboard shortcuts will be displayed in the Current shortcuts box on the right.

Description area

This area contains a short description of the selected command.

Press new shortcut key box

This box is used for entering keyboard shortcuts for commands.

To specify a keyboard shortcut:

·Click the Press new shortcut key box

·Press the desired key or combination of keys on the keyboard

·Click the Assign button to assign the key or keys you pressed to the command.

·To delete a keyboard shortcut, press the Backspaсe key.

If you try to assign a keyboard shortcut which is already in use to another command, a message that contains the name of the command to which the keyboard shortcut is already assigned will be displayed. Click Yes to reassign the keyboard shortcut, or click No to cancel.

note Note.A keyboard shortcut can be assigned to multiple commands provided that these commands are never available at the same time. For example, the Match, Classify, and the Generate Alternatives command from the training mode are assigned to Ctrl+E by default.

note Note.Some keyboard shortcuts are reserved for specific commands and cannot be assigned to other commands. For example, Ctrl+A, Ctrl+C, Ctrl+V, Ctrl+X, Ctrl+Y, Ctrl+Z, Ctrl+Ins, Shift+Ins and Del.

Buttons

Reset all

Resets the keyboard shortcuts for all commands to their default values.

Delete shortcut

Deletes a keyboard shortcut.

Reset command

Resets the keyboard shortcut for the selected command to its default value. If the default shortcut matches a keyboard shortcut of another command, you will be prompted to change one of the shortcuts.

Assign

Assigns a keyboard shortcut to the selected command.

Other tab

Export group

To increment the version on export automatically, select the corresponding option.

Advanced code group

The maximum number of characters in each of the fields on the Advanced tab.

Search area group

To show the search area on the image, select the corresponding option.

Prerecognition area group

To show the search area on the image, select the corresponding option.

Appearance group

To use large toolbars in the program, select the corresponding option. You need to restart the program for the option to take effect.


Fuzzy interval visual editor

Show/Hide Hidden Text

ABBYY FlexiLayout Studio offers a visual editor to make specifying fuzzy intervals easier. You can open the fuzzy interval editor from the Properties dialog box of a Character String element (Character String tab, [image] button) or from the main menu by selecting Tools → Fuzzy Interval Editor….

Show Fuzzy Interval Editor dialog box

This dialog box displays a graph representation of the fuzzy interval. The vertical axis measures the quality of the hypothesis and the horizontal axis measures the linear dimensions or the number of characters. Coordinates of the intersection of the fuzzy interval borders with the horizontal axis are also displayed on the graph.

The "Zoom in" and "Zoom out" buttons change the horizontal and vertical scales synchronously. You can also zoom a selected image area using the Zoom selected area button. The [image] [image] [image] [image] buttons allow you to move the area in the corresponding direction. To fit the interval, click [image].

The fields below the graph contain the numerical values of the interval. You can specify the interval either by editing the graph with your mouse or by entering the desired numerical values in the corresponding fields.

The visual fuzzy interval editor operates in two modes:

1.Fuzzy intervals for units of measurement, which may be fractional. In this case, select Distance under Interval type.

note Note.

2.Fuzzy intervals for positive integers, such as string length in characters. In this case, select Integer under Interval type.

note Note.If you open the fuzzy interval editor from the Properties dialog box of a Character String element, one of the two modes is automatically selected depending on the field from which you called the editor.

Editing the graph

You can change the interval by moving the green markers to the right or to the left with your mouse. You can also change the angle of the slopes. Certain restrictions apply: you cannot move the left marker to the right of the right marker, etc. The corresponding numerical values will be displayed in the fields below the graph.

Changing the numerical values directly

The Left, Left non-penalized, Right, and Right non-penalized fields correspond to the representation of the fuzzy interval in the program. Left and Right are the extreme points, Left non-penalized and Right non-penalized are the non-penalized points. The Left slope and Right slope groups set the slope of the sides of the graph, which represent the penalty coefficient for deviating by a Distance from the non-penalized point. Changing a slope moves the corresponding extreme point without changing the non-penalized point. Changing an extreme and non-penalized point results in changes in the corresponding slope. When you edit fields, the depiction and the values of the dependent fields are changed accordingly.

Saving the results

If the fuzzy interval editor was called from the Properties dialog box of a Character String element, clicking OK will automatically insert the fuzzy interval into the corresponding field of the dialog box.

If the fuzzy interval editor was called from the Tools menu, you can copy the fuzzy interval from the Result field or from the Code field. The purpose of the Code field is to allow you to paste the code into the code on the Advanced tab, for example, when using a fuzzy interval as an argument of the FuzzyQuality function.

See Using Nearest and FuzzyQuality to search for elements.


Element Properties dialog box

General tab

Static Text tab

Separator tab

White Gap tab

Barcode tab

Character String tab

Paragraph tab

Date tab

Object Collection tab

Phone tab

Currency tab

Repeating Group tab

Columns tab

Order tab

Header tab

Footer tab

Rows tab

Label tab

Field Position tab

Field tab

Search Constraints tab

Relations tab

Advanced tab

Advanced for All Instances tab

Errors tab


End-User License Agreement (EULA)

ABBYY® FlexiCapture®

Important! Read the following terms carefully before installing, copying and/or otherwise using ABBYY® FlexiCapture® (hereinafter referred to as “the SOFTWARE”). Installing, copying or otherwise using the SOFTWARE indicates Your acceptance of these terms.

This End-User License Agreement (hereinafter referred to as the "EULA") is a legal agreement between You, the end user, who obtained or is using the SOFTWARE, on the one hand and ABBYY, on the other.

This EULA comes into effect when You demonstrate Your consent to be bound by its terms by selecting the “I accept the terms of the license agreement” button followed by selecting the “Next” button and installing the SOFTWARE, or when You install, copy or start using the SOFTWARE in any manner. Any such act is deemed to demonstrate Your acknowledgment that You have read this EULA, that You understand it and agree to be bound by its terms. If You do not agree to the terms of this EULA, do not use the SOFTWARE and disable, remove it from Your system, and destroy any copies of the SOFTWARE in Your possession. This EULA is binding for the entire period that You use the SOFTWARE unless otherwise stated in this EULA or in a separate written agreement with ABBYY.

The SOFTWARE is protected by copyright laws and international treaty provisions and some portions are protected by patent and trade secret laws. The SOFTWARE is licensed to You under this EULA, not sold to You. You agree that this EULA is enforceable like any written negotiated agreement signed by You. This EULA is enforceable against You.

If a separate written agreement with regard to the SOFTWARE has been concluded with ABBYY, then, in the event of any discrepancy between that agreement and this EULA, the terms of the separate agreement shall prevail over any inconsistent term in this EULA. Any terms and conditions contained in Your purchase orders or other documents shall not modify this EULA or expand ABBYY’s obligations hereunder. The EULA may be available in different languages. There may be inconsistencies or differences in interpretation between the English version of the EULA and those EULAs made available in other languages. For the sake of uniformity and to avoid any ambiguity, the English version of the EULA shall govern in all disputes, claims or proceedings to interpret, enforce or otherwise relating to the EULA.

Definitions

"ABBYY" means

ABBYY USA Software House Inc., registered at 890 Hillview Court, Suite 300, Milpitas, California, 95035, USA, when article 15.1 of this EULA applies;

ABBYY Japan Co., Ltd., registered at 2-5-14 Shin-Yokohama, Kohoku-ku, Yokohama-shi, Kanagawa-ken 222-0033, Japan, when article 15.2 of this EULA applies;

ABBYY Europe GmbH, registered at Landsberger Str. 300, 80687 Munich, Germany, when article 15.3 of this EULA applies;

ABBYY UK Ltd., registered at Centrum House, 36 Station Road, Egham, Surrey, TW20 9LF, United Kingdom, when article 15.4 of this EULA applies;

ABBYY PTY Ltd., registered at Citigroup Building’, Level 13, 2-26 Park Street, Sydney NSW 2000, Australia, when article 15.5 of this EULA applies;

ABBYY Production LLC, registered at ul. Otradnaya dom 2B, korpus 6, office 14, 127273, Moscow, Russia, when article 15.6 of this EULA applies;

and ABBYY Solutions Ltd., registered at Michail Karaoli 2, Egkomi CY 2404, Nicosia, Cyprus, in all other cases.

“ABBYY Partner” means an entity or individual that is authorized by ABBYY to resell and distribute licensed copies of the SOFTWARE to End Users, either directly or through one or more sub-resellers or sub-distributors.

“Computer” means a specific physical device or virtual machine that may consist of one or more CPU (central processing unit) cores and running a specified operating system. Any changes to the configuration or composition of the Computer could result in the Computer being treated as a different Computer for licensing purposes.

“Intellectual Property Rights” means all intellectual and industrial property rights and includes rights to (i) inventions, discoveries, and letters patent, including applications therefor, reissues thereof, and continuation and continuations in part; (ii) copyrights; (iii) designs and industrial designs; (iv) trademarks, service marks, trade dress and similar rights; (v) know-how, trade secrets, and confidential information; (vi) integrated circuit topography rights and rights in mask works; and (vii) other proprietary rights.

“License” means the non-exclusive limited right granted to You by ABBYY to install and use the functionality of the SOFTWARE in accordance with the terms and conditions of this EULA.

“SOFTWARE” means ABBYY FlexiCapture including any and all of the software components embedded in it or made available online or in other ways, including, but not limited to, executable, help, demo, sample, and other files; libraries, databases, samples, associated media (images, photos, animations, audio components, video components, music, etc.), printed materials, and other software components.

“Station” means a part of the SOFTWARE, that can be installed as a separate SOFTWARE application, or as a thin browser-based client, or as a mobile app, and solves one or more tasks constituting the functionality of the SOFTWARE.

“You”, “Your” and “End User” refer to and include any person and/or any entity that obtained this SOFTWARE for his/her or its own use and not for purposes of further resale and any actual user of the SOFTWARE.

1. License Grant

1.1 Subject to the terms and conditions of this EULA, ABBYY grants to You a limited, non-exclusive License to install and use the functionality of the SOFTWARE subject to all restrictions (limitations) and the scope of the License as may be provided by, this EULA, the software and/or hardware license keys provided by ABBYY (“License Key”), the SOFTWARE, and/or a separate written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase. In this case, the separate written agreement between You and the ABBYY Partner may not exceed the scope of the license granted and restrictions specified in this EULA and/or in the separate agreement with ABBYY, and/or impose additional duties on ABBYY. The ABBYY Partner’s documentation accompanying the purchase of the SOFTWARE may not contradict the terms of the EULA, the separate agreement with ABBYY and ABBYY’s written instruments concerning the terms of use and/or purchase of the SOFTWARE.

All of the provisions stated herein apply to both the SOFTWARE as a whole and to all of its separate components and end-user documentation with the exception of the third party software included in the SOFTWARE, which is covered by its own license terms as specified in article 14. Any issue with respect to the scope of Your License shall be construed in favour of the restrictions on the scope of Your License. Restrictions on Your use of the SOFTWARE and the scope of Your License may include, but are not limited to, the following:

1.1.1. Number of Stations. The types of Stations and permitted number of their installations may be limited.

1.1.2. Processing volume. The number of volume units (e.g. pages, words, symbols) that may be processed with the SOFTWARE may be limited in one or more ways, such as limitations on the number of volume units that may be processed within particular time periods, such as monthly or annually, or on the overall number of volume units that may be processed. The size of a page or other volume unit may also be limited.

1.1.3 Duration. Use of the SOFTWARE may be limited to a specific period of time, and the SOFTWARE may not be used after the expiration of such time period.

1.1.4 If You licensed the SOFTWARE on a subscription basis, Your rights to use the SOFTWARE are limited to the subscription period. After the expiration of Your subscription period, the functionality of the SOFTWARE will be no longer available until You make a payment to extend Your subscription period. You may extend Your subscription period at any time during the subscription period. If You extend Your subscription period, you may continue using the SOFTWARE until the end of Your extended subscription period.

Additional terms and conditions of use of the SOFTWARE on a subscription basis may be set forth in a separate agreement between You and ABBYY or an ABBYY Partner, which you shall accept before obtaining (purchasing) the SOFTWARE on a subscription basis.

1.1.5 Features, Add-ons, and Custom Components. The use of particular features, add-ons, and/or custom components of the SOFTWARE may be limited by License Key and/or written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase.

1.1.6 Processing Power. The number of CPU (central processing unit) cores of the Computers which can be utilized by the SOFTWARE may be limited by License Key and/or written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase.

1.2 All rights not expressly granted to You by the EULA are reserved by ABBYY. This EULA does not grant You any rights in connection with any trademarks of ABBYY.

1.3 If Article 15.6 applies and You are a natural person, You may use the SOFTWARE worldwide. If You are an entity, You can obtain (purchase) the SOFTWARE in the countries listed in the Article 15.6. only if You or Your branch and/or representative offices are registered in these countries, unless otherwise agreed in a separate written agreement between You and ABBYY. The employees of the entity or of its branch and representative offices may use the SOFTWARE worldwide, provided the SOFTWARE has been obtained and installed in the country where the entity or its branch and representative offices are registered.

1.4. Any use of the SOFTWARE or its component parts outside of or in contravention of the terms and conditions of this EULA shall constitute a breach of ABBYY’s and/or third parties’ Intellectual Property Rights and shall give cause for the revocation of all rights to use the SOFTWARE granted to You under this EULA.

1.5 If You deploy or use the SOFTWARE in a virtual environment, including, without limitation, by means of VMware, Citrix or ghosting, the access to or use of the SOFTWARE may in no way exceed the restrictions on the SOFTWARE, or the scope of the License that has been granted. For instance, one and the same License Key may not be used to permit use or access to the SOFTWARE in a virtual environment by a number of Computers that is greater than the number of Computers for which a License has been properly obtained, nor may the SOFTWARE be used to process more than the total number of pages that has been permitted.

1.7 If You use the SOFTWARE by means of a Web browser, You may simultaneously access the SOFTWARE by as many stationsas permitted by the scope of Your License and specified in the License Key.

1.8 You may receive the SOFTWARE on more than one medium (multiple-media SOFTWARE), including downloads over the Internet. Regardless of the quantity or type of media You receive, You are only licensed to use the SOFTWARE in accordance with the scope of Your License.

2. Limitations of Use

2.1 All terms of use and limitations governing the use of the SOFTWARE are stated in this EULA, unless additional terms of use or limitations are stipulated in a separate written agreement between You and ABBYY or an ABBYY Partner or in other documentation accompanying the SOFTWARE, provided that the ABBYY Partner’s agreement and documentation may not impose additional duties on ABBYY.

2.2 You may not perform or make it possible for other persons to perform any activities included in the list below:

2.2.1 Reverse engineer, disassemble, decompile (i.e. reproduce and transform the object code into source code) or otherwise attempt to derive the source code for the SOFTWARE or any part, except, and only to the extent, that such activity is expressly permitted by applicable law notwithstanding this limitation. If applicable law prohibits the restriction of such activities, any information so discovered must not be disclosed to third parties except as such disclosure is required by law and such information must be promptly disclosed to ABBYY. All such information shall be deemed to be confidential and proprietary information of ABBYY.

2.2.2 Modify, adapt (including any changes for the purpose of enabling the SOFTWARE to run on Your hardware), or make any changes to the object code of the SOFTWARE, applications and databases contained in the SOFTWARE other than those provided for by the SOFTWARE and described in the documentation.

2.2.3 Correct errors in the SOFTWARE or translate the SOFTWARE without the prior written consent of ABBYY.

2.2.4 Rent, lease, sublicense, assign or transfer any rights granted to You by this EULA and other rights related to the SOFTWARE to any other person or authorize all or any portion of the SOFTWARE to be copied onto other Computers (except as described in article 2.5) unless otherwise authorized in writing by ABBYY.

2.2.5 Make it possible for any person not entitled to use the SOFTWARE to access and/or use the SOFTWARE, including without limitation in a multi-user system, virtual environment, or via the Internet.

2.2.6 Remove, change or obscure any copyright, trademark or patent notices that appear on the SOFTWARE as delivered to You.

2.3 You may not use the SOFTWARE to provide paid or free services based on the SOFTWARE functionality (including recognition, conversion, document capture and classification) and/or to provide the results or access to the results acquired through the use of the SOFTWARE as a part of another service that has the SOFTWARE functionality (including recognition, conversion, document capture and classification) as its component to any third party unless You have entered into a separate written agreement with ABBYY.

2.4 You may not bypass the SOFTWARE’s user interface that is provided with the SOFTWARE, or use the SOFTWARE in aggregate with any other software unless you have entered into a separate written agreement with ABBYY.

2.5 You may only make a one-time permanent transfer of this SOFTWARE directly to another end user. If You are an entity, such a transfer requires written approval by ABBYY. Such transfer must include all of the SOFTWARE (including all copies, component parts, the media and printed materials, and any updates) and this EULA. Such transfer may not be by way of consignment or any other indirect transfer. The transferee of such one-time transfer must agree to comply with the terms of this EULA, including the obligation to not further transfer this EULA and SOFTWARE. You must uninstall the SOFTWARE from Your Computer or from Your local area network in the event of such SOFTWARE transfer.

3. Pre-release, Trial or Demo SOFTWARE

3.1 If the SOFTWARE You have received with this License is a pre-commercial release or Beta-Release Software, provided for a trial or for demonstration, verification or testing purposes, has limited or less than full functionality, labeled “Not for Resale”, “Trial”, “Demo” or was provided at no charge (“Restricted Software”), then this article 3 shall apply until such time that You obtain (purchase) a License for the full version of the SOFTWARE. To the extent that any provision in this is in conflict with any other term or condition in this EULA, this article shall supersede such other term(s) and condition(s) with respect to the Restricted Software, but only to the extent necessary to resolve the conflict.

3.2 THE RESTRICTED SOFTWARE IS PROVIDED TO YOU “AS IS” AND WITHOUT WARRANTY OR INDEMNITY (EXPRESS, IMPLIED OR STATUTORY) OF ANY KIND. THE RESTRICTED SOFTWARE DOES NOT REPRESENT FINAL SOFTWARE FROM ABBYY, AND MAY CONTAIN BUGS, ERRORS AND OTHER PROBLEMS THAT COULD CAUSE SYSTEM OR OTHER FAILURES AND DATA LOSS. TO THE GREATEST EXTENT ALLOWABLE UNDER APPLICABLE LAWS, NO WARRANTY SHALL APPLY TO THE RESTRICTED SOFTWARE, AND FOR CLARITY YOU ACKNOWLEDGE THAT ABBYY DISCLAIMS ANY WARRANTY OR LIABILITY OBLIGATIONS TO YOU OF ANY KIND INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NON-INFRINGEMENT, QUIET ENJOYMENT, AND FITNESS FOR A PARTICULAR PURPOSE. WHERE LIABILITY CANNOT BE EXCLUDED BUT MAY BE LIMITED, ABBYY’S TOTAL LIABILITY AND THAT OF ITS PARTNERS SHALL BE LIMITED TO THE SUM OF FIFTY UNITED STATES DOLLARS (U.S. $50) OR THE TOTAL AMOUNT YOU PAID FOR THE SOFTWARE, WHICHEVER IS GREATER.

3.3 Restricted Software may have limited functionality, such as having functionality for a limited period of time, and upon expiration of permitted functionality (“time-out”), Your access and ability to use the Restricted Software may be disabled. Upon a time-out, Your rights under the EULA shall terminate, unless You obtain a new License from ABBYY.

3.4 Restricted Software for which there has not been a commercial release.

3.4.1 Restricted Software for which there has not been a commercial release constitutes the Confidential Information of ABBYY.

3.4.2 As to Restricted Software for which there has not been a commercial release, ABBYY does not promise or guarantee, has no express or implied obligation, and You acknowledge that ABBYY has not promised or guaranteed, that such software will be further developed, or that a commercial version will be announced or made available in the future. ABBYY may not introduce a software product similar to or compatible with such software. Accordingly, You acknowledge that any use, research or development that You perform regarding such software is done entirely at Your own risk.

3.4.3 You agree to provide feedback to ABBYY regarding testing and use of the Restricted Software, including error or bug reports (“Feedback”), and to entirely transfer and grant to ABBYY all rights in such Feedback, including without limitation, the rights to use, publish and disseminate the Feedback. All Feedback constitutes the confidential information of ABBYY.

3.4.4 Confidentiality of Restricted Software for which there has not been a commercial release and its Results:

You agree not to disclose accompanying written, oral or electronic information divulged to You by ABBYY related to the Restricted Software for which there has not been a commercial release. Any information about the quality of such Restricted Software or the quality of the results acquired through the use of such Restricted Software, Feedback, and any information about bugs, errors and other problems discovered by You in the Restricted Software for which there has not been a commercial release are the confidential information of ABBYY.

3.4.5 You shall not disclose confidential information. The term “disclose” means to display, describe, copy, lease, loan, rent, assign, transfer or provide access, over a network or otherwise, to confidential information reproduced in any form, including oral communications, to any third party.

3.4.6 You shall take all reasonable steps to prevent the disclosure of confidential information and to keep it confidential.

3.4.7 You shall promptly inform ABBYY if You become aware of any disclosure of confidential information. If You are in breach of the terms and conditions set forth in articles 3.4.4-3.4.6 above, You shall compensate ABBYY for any loss resulting from such breach.

3.4.8 Upon receipt of a later version of Restricted Software or a commercial release of such software, whether as a stand-alone product or as part of a larger product, You agree to return or destroy all earlier versions of the Restricted Software received from ABBYY.

3.4.9 If You have been provided the Restricted Software pursuant to a separate written agreement, Your use of the SOFTWARE is also governed by such agreement. To the extent that any term or condition of a separate written agreement, such as the Mutual Non-Disclosure Agreement, are in conflict with any term or condition of this EULA, a separate written agreement shall supersede such other term(s) and condition(s) with respect to the SOFTWARE, but only to the extent necessary to resolve the conflict.

4. Not-for-resale SOFTWARE

4.1 If the SOFTWARE is labeled "Not for Resale" or "NFR," then, notwithstanding other articles of this EULA, You may only use such SOFTWARE for demonstration, verification or testing purposes.

5. Updates

5.1 If the SOFTWARE is labeled as an update, You must own a license for the previous version of the SOFTWARE identified by ABBYY as being eligible for this update in order to use the SOFTWARE.

5.2 The SOFTWARE labeled as an update replaces and/or supplements the product that formed the basis for Your eligibility for the update.

5.3 You may only use the resulting updated product in accordance with the terms of the EULA supplied with the update.

5.4 You acknowledge that any obligation ABBYY may have to support the version of the SOFTWARE being updated shall end upon the availability of the update.

6. Technical Support and Maintenance

6.1 You may be provided with ABBYY technical support and/or maintenance related to the SOFTWARE ("Support Services") subject to conditions of the current ABBYY support policy; however, You may be entitled to a different level of Support Services than is stated in the ABBYY support policy in accordance with a written agreement executed with ABBYY with respect to such Support Services. Also You may be entitled to certain support services by an ABBYY Partner in accordance with an agreement between You and the ABBYY Partner with respect to such support services under the stipulation that the ABBYY Partner’s agreement may not impose additional duties on ABBYY.

6.2 General terms and conditions of the ABBYY support policy are published on the ABBYY Web site www.abbyy.com. ABBYY reserves the right to change the support policy at any time without any prior notice.

6.3 In addition to the general terms and conditions, ABBYY may have specific support policies in specific regions which may be regulated by separate agreements.

6.4 Any supplementary software code and any SOFTWARE component provided to You as part of Support Services is to be considered a part of the SOFTWARE and subject to the terms and conditions of this EULA.

6.5 To be eligible for Support Services,You shall have a valid Support and Maintenance Agreement. If You have no valid Support and Maintenance Agreement, ABBYY reserves the right to withhold delivery of Support Services.

7. Ownership.

7.1 No title to any of ABBYY’s Intellectual Property Rights (including the SOFTWARE and any ABBYY patents, trademarks, or copyrights) is transferred to You. You shall not, in any way, during or after the term of the Agreement, make any use of or claim any right to any name, logo, trademark, pattern, or design owned by ABBYY, or any name, logo, trademark, pattern, or design resembling them.

7.2 No title to any of Your Intellectual Property Rights (including the application and any of Your patents, trademarks, or copyrights) is transferred to ABBYY.

7.3 The SOFTWARE contains valuable trade secrets and confidential information belonging to ABBYY and third parties and is protected by copyright laws, including, without limitation, by United States Copyright Law, laws of Russian Federation, international treaty provisions, and the applicable laws of the country in which it is being used or obtained.

7.4 All title and rights in and to the content that is not contained in the SOFTWARE, but may be accessible through the use of the SOFTWARE, are the property of the respective content owners and may be protected by applicable copyright or other intellectual property laws and international treaties. This EULA does not grant You any Intellectual Property Rights.

8. Limited Warranty: Disclaimers

8.1 If required by the legislation of the country in which You obtained (purchased) the SOFTWARE, ABBYY warrants that the media on which the SOFTWARE is furnished will be free from defects in materials and workmanship under normal use only and only for the minimal guarantee term determined by the legislation of the country in which You obtained (purchased) the SOFTWARE starting from the date You obtained (purchased) the SOFTWARE. If the SOFTWARE was obtained (purchased) in the countries enumerated in article 15.6. this period will constitute thirty (30) days starting from the date You obtained (purchased) the SOFTWARE.

8.2 EXCEPT AS EXPRESSLY PROVIDED IN THIS ARTICLE 8 (LIMITED WARRANTY, DISCLAIMERS), AND EXCEPT FOR ANY WARRANTY, CONDITION, REPRESENTATION, OR TERM TO THE EXTENT TO WHICH THE SAME CANNOT OR MAY NOT BE EXCLUDED OR LIMITED BY LAW APPLICABLE TO YOU IN YOUR JURISDICTION, THE SOFTWARE, (INCLUDING ANY THIRD PARTY SOFTWARE CONTAINED THEREIN), INCLUDING, WITHOUT LIMITATION, ANY SOFTWARE DOCUMENTATION, UPGRADES AND UPDATES IS BEING DELIVERED TO YOU “AS IS” AND ABBYY MAKES NO WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS (EXPRESS OR IMPLIED WHETHER BY STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE) AS TO ANY MATTER, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY, OR FITNESS FOR ANY PARTICULAR PURPOSE, OR THAT THE SOFTWARE WILL CARRY NO ERRORS, MEET YOUR REQUIREMENTS, OR THAT THE SOFTWARE WILL FUNCTION PROPERLY WHEN USED IN CONJUNCTION WITH ANY OTHER SOFTWARE OR HARDWARE. ABBYY DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULT YOU MAY OBTAIN BY USING THE SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE LIES WITH YOU. FURTHERMORE ABBYY MAKES NO WARRANTIES FOR ANY THIRD PARTY SOFTWARE PRODUCTS WHICH MAY BE SUPPLIED WITHIN THE SOFTWARE.

9. Limitation of Liability

9.1 IN NO EVENT WILL ABBYY BE LIABLE TO YOU FOR ANY DAMAGES, BUSINESS INTERRUPTION, LOSS OF DATA OR INFORMATION OF ANY KIND, BUSINESS OR OTHERWISE, CLAIMS OR COSTS WHATSOEVER, OR ANY CONSEQUENTIAL, INDIRECT, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES, OR ANY LOST PROFITS OR LOST REVENUE RESULTING FROM AND/OR RELATING TO THE USE OF THE SOFTWARE, OR DAMAGES CAUSED BY POSSIBLE ERRORS OR MISPRINTS IN THE SOFTWARE, EVEN IF ABBYY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS, OR FOR ANY CLAIM BY ANY THIRD PARTY. THE FOREGOING LIMITATIONS AND EXCLUSIONS APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION. ABBYY’S SOLE AND AGGREGATE LIABILITY UNDER OR IN CONNECTION WITH THE SOFTWARE SHALL BE LIMITED TO THE PURCHASE PRICE ORIGINALLY PAID FOR THE SOFTWARE, IF ANY.

10. Warranty Exclusion and Limitations for Users Residing in Germany or Austria

10.1 If You obtained Your copy of the SOFTWARE in Germany or Austria, and You usually reside in such country, then, in accordance with German law, ABBYY warrants that the SOFTWARE provides the functionalities set forth in its documentation included in the SOFTWARE (the "agreed upon functionalities") for the limited warranty period following receipt of the SOFTWARE copy when used on the recommended hardware configuration. As used in this article, "limited warranty period" means two (2) years if You are a consumer, and one (1) year if not. Non-substantial variation from the agreed upon functionalities shall not be considered and does not establish any warranty rights. This limited warranty does not apply to the SOFTWARE provided to You free of charge, for example, updates, pre-release versions, "Trial" versions, product samples, "Not for resale" ("NFR") copies of the SOFTWARE, or to SOFTWARE that has been altered by You, to the extent such alterations caused a defect. To make a warranty claim, during the limited warranty period You must return, at our expense, the SOFTWARE and proof of purchase to the location where You obtained it. If the functionalities of the SOFTWARE vary substantially from the agreed upon functionalities, ABBYY is entitled (by way of re-performance and at its own discretion) to repair or replace the SOFTWARE. If this fails, You are entitled to a reduction of the purchase price (reduction) or to cancel the purchase agreement (rescission). For further warranty information, please contact ABBYY Europe GmbH, Landsberger Str. 300, 80687 Munich, tel.: +49 89 69 3333-0, e-mail: support@abbyy.com.

10.2 If You obtained Your copy of the SOFTWARE in Germany or Austria, and You usually reside in such country, then:

10.2.1 Subject to the provisions in article 10.2.2, ABBYY’s statutory liability for damages shall be limited as follows: (i) ABBYY shall be liable only up to the amount of damages as typically foreseeable at the time of entering into the purchase agreement in respect of damages caused by a slightly negligent breach of a material contractual obligation and (ii) ABBYY shall not be liable for damages caused by a slightly negligent breach of a non-material contractual obligation.

10.2.2 The limitation of liability set forth in article 10.2.1 shall not apply to any mandatory statutory liability, in particular, to liability under the German Product Liability Act, liability for assuming a specific guarantee or liability for culpably caused personal injuries.

10.2.3 You are required to take all reasonable measures to avoid and reduce damages, in particular to make backup copies of the SOFTWARE and Your Computer data subject to the provisions of this EULA.

11. Warranty Exclusion and Limitations for Users Residing in Australia

11.1 If you obtained Your copy of the SOFTWARE in Australia, and You usually reside in such country then:

11.1.1 ABBYY’s goods come with guarantees that cannot be excluded under the Australian Consumer Law. You are entitled to a replacement or refund for a major failure and for compensation for any other reasonably foreseeable loss or damage. You are also entitled to have the goods repaired or replaced if the goods fail to be of acceptable quality and the failure does not amount to a major failure.

11.1.2 Where ABBYY provides any additional express warranty or warranties with the SOFTWARE, the benefits given to you by such warranty or warranties are in addition to and do not replace your other rights and remedies under the Australian Consumer Law. To make a warranty claim, You must return, at Your expense, the SOFTWARE and proof of purchase to the location where You obtained it, or, where return is not possible, make the SOFTWARE available for inspection by ABBYY or its representative. No claim will be valid under the warranty unless the SOFTWARE has been tested and deemed defective by ABBYY pursuant to the terms of the warranty. If the SOFTWARE is determined to be defective (in the discretion of ABBYY), ABBYY is entitled (at its own discretion) to repair or replace the SOFTWARE. For further warranty information, please contact ABBYY PTY Ltd.: ‘Citigroup Building’ Level 13, 2 Park Street, SYDNEY NSW 2000 Australia, tel.: +61 (02) 9004 7401; e-mail: support@abbyy.com.

11.1.3 Subject to Your rights arising under the Competition and Consumer Act 2010 (Cth) or other similar consumer legislation, You agree that ABBYY will not be liable in respect of any claim by You (whether contractual, tortious, statutory or otherwise) for any direct, special, incidental, indirect or consequential damages or injury including, but not limited to, any loss of profits, contracts, revenue or data arising out of or in connection with the provision of the SOFTWARE or the provision of any other goods or services under this EULA or any other written agreement executed between You and ABBYY or an ABBYY Partner and whether as a result of any breach or default by ABBYY or any negligence of ABBYY. The maximum liability of ABBYY and that of its Partners under this EULA and any other written agreement executed between You and ABBYY or an ABBYY Partner for any and all breaches, and any negligence in relation to such agreements, will be limited to the sum of fifty United States Dollars (U.S. $50) or the total amount You paid for the SOFTWARE, whichever is greater.

11.1.4 If the Competition and Consumer Act 2010 (Cth) (or analogous legislation) applies and permits the limitation of liability for breach of warranty implied by statute, the liability of ABBYY is limited, at the option of ABBYY, to:

11.1.4.1 In the case of goods, any one or more of the following: (i) the replacement of the goods or the supply of equivalent goods; (ii) the repair of the goods; (iii) the payment of the cost of replacing the goods or of acquiring equivalent goods; or (iv) the payment of the cost of having the goods repaired; and

11.1.4.2 In the case of services: (i) the supplying of the services again; (ii) or the payment of the cost of having the services supplied again.

11.1.5 Any of the terms and conditions of this EULA which limit or exclude any term, condition or warranty, express or implied, or the liability of ABBYY will apply to the extent permitted by Australian law and will not be construed as excluding, qualifying or limiting Your statutory rights or remedies arising by virtue of the breach of any implied term of this EULA where such exclusion, qualification or limitation would be prohibited by statute.

11.1.6 If You are a consumer (as defined in the Competition and Consumer Act 2010 (Cth)), then nothing in this EULA restricts, limits or modifies Your rights or remedies against ABBYY for the failure of a statutory guarantee under the Australian Consumer Law where such restriction, limitation or modification would be prohibited by the Competition and Consumer Act 2010 (Cth).

12. Additional Limitations for SOFTWARE obtained in the USA

Government Use. The Licensed Software and related documentation are "Commercial Items", as that term is defined at 48 C.F.R. §2.101, consisting of "Commercial Computer Software" and "Commercial Computer Software Documentation", as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished rights reserved under the copyright laws of the United States.

13. Export rules

You agree that You shall not export or re-export the SOFTWARE in violation of any export provisions in the laws of the country in which this SOFTWARE was purchased or otherwise acquired. In addition, You represent and warrant that You are not prohibited under applicable laws from receiving the SOFTWARE.

14. Third-party software

14.1 Embedded Fonts. Font programs are subject to copyright, and the copyright owner may impose conditions under which a font program can be used. One of the conditions may be that you need a licensed copy of the font program to embed the font into a PDF file. In no event shall ABBYY be liable for any damages arising out of or in connection with your use of embedded fonts.

14.2 Datalogics Software and Adobe Products

14.2.1 Copyright 2000 - 2012 Datalogics, Inc.

Copyright 1984 - 2012 Adobe Systems Incorporated and its licensors. All rights reserved.

14.2.2 The term " Datalogics Software and Adobe Products" means Datalogics Software and third party products (including Adobe Products) and related documentation, and any upgrades, modified versions, updates, additions, and copies thereof.

14.2.3 You acknowledge and agree that third party licensors are the owners of certain proprietary information and intellectual property rights included in the Host Products and the Documentation. Such third party licensors are third party beneficiaries entitled to enforce ABBYY’s rights and your obligations hereunder and to seek appropriate legal and equitable remedies, including but not limited to, damages and injunctive relief, for your breach of such obligations.

14.2.4 License Grant and Restrictions. ABBYY grants you a non-exclusive right to use the Datalogics Software and Adobe Products under the terms of this EULA. You may make one backup copy of the Datalogics Software and Adobe Products, provided the backup copy is not installed or used on any computer.

14.2.5 Intellectual Property Rights. The Datalogics Software and Adobe Products incorporated into the SOFTWARE are owned by Datalogics, Adobe and third parties and their suppliers, and their structure, organization and code are the valuable trade secrets of Datalogics, Adobe and third parties and their suppliers. The Datalogics Software and Adobe Products are also protected by United States Copyright law and International Treaty provisions. You may not copy the Datalogics Software and Adobe Products, except as provided in this EULA. Any copies that you are permitted to make pursuant to this EULA must contain the same copyright and other proprietary notices that appear on or in the Datalogics Software and Adobe Products. You agree not to modify, adapt, translate, reverse engineer, decompile, disassemble or otherwise attempt to discover the source code of the Datalogics Software and Adobe Products. Except as stated above, this EULA does not grant you any intellectual property rights in the Datalogics Software and Adobe Products.

14.2.6 Font License. You may embed copies of the font software into your electronic documents for purpose of printing, viewing and editing the document. No other embedding rights are implied or permitted under this license.

14.2.7 Warranty. ABBYY AND ITS SUPPLIERS DO NOT AND CANNOT WARRANT THE PERFORMANCE RESULTS YOU MAY OBTAIN BY USING THE SOFTWARE.

14.2.8 Export Rules. You agree that the Datalogics Software and Adobe Products will not be shipped, transferred or exported into any country or used in any manner prohibited by the United States Export Administration Act or any other export laws, restrictions or regulations (collectively the “Export Laws”). In addition, if the Datalogics Software and Adobe Products are identified as export-controlled items under the Export Laws, you represent and warrant that you are not a citizen, or otherwise located within, an embargoed nation and that you are not otherwise prohibited under the Export Laws from receiving the Datalogics Software and Adobe Products. All rights to use the Datalogics Software and Adobe Products are granted on condition that such rights are forfeited if you fail to comply with the terms of this EULA.

14.2.9 Governing Law. This EULA will not be governed by the conflict of law rules of any jurisdiction or the United Nations Convention on Contracts for the International Sale of Goods, the application of which is expressly excluded.

14.2.10 General Provisions. This EULA shall not prejudice the statutory rights of any party dealing as a consumer.

14.2.11 Trademarks. Trademarks appearing herein are either registered trademarks or trademarks of their respective owners in the United States and/or other countries.

14.3 Pixtran (pixtools)

14.3.1 Distribution of any Application shall be pursuant to a written end-user license which

a. grants the end-user only a right to use the Application,

b. protects EMC’s and EMC’s licensors’ intellectual property rights in the Software under all legal theories applicable to the geography where the Application is to be used,

c. provides proper attribution of copyrights to EMC and its licensors, and

d. makes no representations or warranties on behalf of EMC to such end- users. All rights not expressly granted herein are reserved by EMC.

14.4 Cuminas DjVu 3

14.4.1 Portions of this computer program are copyright © 2008 Celartem, Inc. All rights reserved. Portions of this computer program are copyright © 2011 Caminova, Inc. All rights reserved. Portions of this computer program are copyright © 2013 Cuminas, Inc. All rights reserved. DjVu is protected by U.S. Patent No. 6,058,214. Foreign Patents Pending. Powered by AT&T Labs Technology..

14.4.2 You, as the End-User, have the right to use DjVu SDK as part of the SOFTWARE for the entire period of such SOFTWARE copyright or for another lesser term of use, stated in the EULA.

14.4.3 You may not perform or make it possible for other persons to perform reverse engineer, disassemble, decompile (i.e. reproduce and transform the object code into source code) or otherwise attempt to derive the source code for the SOFTWARE or any part, except, and only to the extent, that such activity is expressly permitted by applicable law notwithstanding this limitation. If applicable law prohibits the restriction of such activities, any information so discovered must not be disclosed to third parties with the exception that such disclosure is required by law and such information must be promptly disclosed to ABBYY. All such information shall be deemed to be confidential and proprietary information of ABBYY.

14.4.4 ABBYY MAKES NO WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS (EXPRESS OR IMPLIED WHETHER BY STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE) AS TO ANY MATTER, INCLUDING WITHOUT LIMITATION NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY, OR FITNESS FOR ANY PARTICULAR PURPOSE, OR THAT THE SOFTWARE WILL CARRY NO ERRORS, MEET YOUR REQUIREMENTS, OR THAT THE SOFTWARE WILL FUNCTION PROPERLY WHEN USED IN CONJUNCTION WITH ANY OTHER SOFTWARE OR HARDWARE. ABBYY DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULT YOU MAY OBTAIN BY USING THE SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE LIES WITH YOU. FUTHERMORE ABBYY MAKES NO WARRANTIES FOR ANY THIRD PARTY SOFTWARE PRODUCTS WHICH MAY BE SUPPLIED WITHIN THE SOFTWARE.

14.4.5 IN NO EVENT WILL ABBYY BE LIABLE TO YOU FOR ANY DAMAGES, BUSINESS INTERRUPTION, LOSS OF DATA OR INFORMATION OF ANY KIND, BUSINESS OR OTHERWISE, CLAIMS OR COSTS WHATSOEVER, OR ANY CONSEQUENTIAL, INDIRECT, INCIDENTAL DAMAGE, OR ANY LOST PROFITS OR LOST SAVINGS RESULTING FROM AND/OR RELATING TO THE USE OF THE SOFTWARE, OR DAMAGES CAUSED BY POSSIBLE ERRORS OR MISPRINTS IN THE SOFTWARE, EVEN IF AN ABBYY REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS, OR FOR ANY CLAIM BY ANY THIRD PARTY. THE FOREGOING LIMITATIONS AND EXCLUSIONS APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION. ABBYY’S SOLE AND AGGREGATE LIABILITY UNDER OR IN CONNECTION WITH THIS EULA SHALL BE LIMITED TO THE PURCHASE PRICE ORIGINALLY PAID FOR THE SOFTWARE, IF ANY.

14.4.6 Limitations for SOFTWARE obtained at the USA.

14.4.6.1 Government Use. If use is made of the SOFTWARE by the United States Government or any US Government agency, the following additional terms shall apply: (1) Restricted Computer Software, as defined in the Rights in Data-General clause at Federal Acquisition Regulations 52.227-14; and (2) any use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (с)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013.

14.4.6.2 Export rules. You agree that You shall not export or re-export the SOFTWARE in violation of any export provisions in the laws of the country in which this SOFTWARE was purchased or otherwise acquired. In addition, You represent and warrant that You are not prohibited under applicable laws from receiving the SOFTWARE.

14.4.7 Third-Party Code:

14.4.7.1 Oniguruma Copyright © 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

14.4.7.2 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

14.4.7.3 MD5 A portion of this software is derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. Mersenne Twister Copyright © 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Hiroshima University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

14.4.7.4 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

14.5 WIBU SDK

14.5.1 WIBU, CodeMeter, SmartShelter, SmartBind are registered trademarks of Wibu-Systems.

14.5.2 German export regulations apply in the event of an export of Wibu-Systems products.

14.6 HDPhotoDPK

14.6.1 The technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") listed hereof are used in the SOFTWARE. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.6.2 Technologies of Microsoft Corporation used in the SOFTWARE:

14.6.2.1 MICROSOFT HD PHOTO 1.O DEVICE PORTING KIT (A.K.A. MICROSOFT WINDOWS MEDIA PHOTO 1.0 DEVICE PORTING KIT)

14.6.3 © 2005-2006 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.6.4 The Microsoft Technologies are licensed, not sold. This EULA only gives You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

14.6.4.1 use the Microsoft Technologies for any other purpose than the one intended. The Microsoft Technologies’ purpose is for the implementation of HD Photo encoders and/or decoders in XML Paper Specification products that comply with and support the HD Photo 1.0 file format (a.k.a. the Windows Media Photo 1.0 file format) as defined in the specification(s) provided in the Microsoft Technologies.

14.6.4.2 publish the Microsoft Technologies for others to copy;

14.6.4.3 rent, lease or lend the Microsoft Technologies;

14.6.4.4 transfer the Microsoft Technologies or this Microsoft Software License Terms to any third party other than as expressly permitted thereunder.

14.6.4.5 Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting

14.7 Microsoft Visual C++ 2015 Runtime Library, Microsoft Visual C++ 2015 OMP Library

14.7.1. The technologies of Microsoft Corporation used in the SOFTWARE:

- Microsoft Visual C++ 2015 Runtime Library

- Microsoft Visual C++ 2015 OMP Library

© Microsoft Corporation. All rights reserved. Microsoft and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

14.7.2. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. For more information, see www.microsoft.com/licensing/userights. You may not:
• work around any technical limitations in the Microsoft Technologies;
• reverse engineer, decompile or disassemble the Microsoft Technologies, or otherwise attempt to derive the source code for the software except, and solely to the extent: (i) permitted by applicable law, despite this limitation; or (ii) required to debug changes to any libraries licensed under the GNU Lesser General Public License which are included with and linked to by the Microsoft Technologies;
• remove, minimize, block or modify any notices of Microsoft or its suppliers in the Microsoft Technologies;
• use the Microsoft Technologies in any way that is against the law;
• share, publish, rent or lease the Microsoft Technologies, or provide the Microsoft Technologies as a stand-alone hosted solution for others to use.

14.7.3. Export restrictions. Microsoft technologies, online services, professional services and related technology are subject to U.S. export jurisdiction. You must comply with all applicable international and national, laws including the U.S. Export Administration Regulations, the International Traffic in Arms Regulations, Office of Foreign Assets Control sanctions programs, and end-user, end use and destination restrictions by the U.S. and other governments related to Microsoft products, services and technologies. For additional information, see www.microsoft.com/exporting.

14.8 Mapifolders

14.8.1. To support the Microsoft Outlook integration, the technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") are used. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.8.2. Technologies of Microsoft Corporation used in the SOFTWARE:

MICROSOFT Outlook 2010: MAPI Header Files

© 2009-2010 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.8.3. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

work around any technical limitations in the Microsoft Technologies;

reverse engineer, decompile or disassemble the Microsoft Technologies, except and only to the extent that applicable law expressly permits, despite this limitation;

make more copies of the Microsoft Technologies than specified in the Microsoft Software License Terms and this EULA or allowed by applicable law, despite this limitation;

publish the Microsoft Technologies for others to copy; rent, lease or lend the Microsoft Technologies; or use the Microsoft Technologies for commercial software hosting services. 14.8.4. Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting

14.9 Intel® Parallel Studio XE Composer Edition for C++

The Materials of the Software Intel® Parallel Studio XE Composer Edition for C++ (hereinafter - Materials) are not designed, intended, or authorized for use in any type of a system or application in which the failure of the Materials could create a situation where personal injury or death may occur (e.g., medical systems, life sustaining or lifesaving systems). Should You use the Materials for any such unintended or unauthorized use, You hereby indemnify, defend, and hold Intel and its officers, subsidiaries and affiliates harmless against all claims, costs, damages, expenses, and reasonable attorney fees arising out of, directly or indirectly, such use and any claim of product liability, personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Intel was negligent regarding the design or manufacture of the Materials.

14.10. Microsoft Outlook 2010 SDK

14.10.1. To support the Microsoft Outlook integration, the technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") listed in paragraph 2 are used. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.10.2. Technologies of Microsoft Corporation used in the SOFTWARE:

MICROSOFT Outlook 2010: MAPI Header Files

© 2009-2010 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.10.3. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

work around any technical limitations in the Microsoft Technologies;

reverse engineer, decompile or disassemble the Microsoft Technologies, except and only to the extent that applicable law expressly permits, despite this limitation;

make more copies of the Microsoft Technologies than specified in the Microsoft Software License Terms and this EULA or allowed by applicable law, despite this limitation;

publish the Microsoft Technologies for others to copy;

rent, lease or lend the Microsoft Technologies; or

use the Microsoft Technologies for commercial software hosting services.

14.10.4. Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see

www.microsoft.com/exporting

15. Governing Law

15.1 If the SOFTWARE was obtained in the United States, Canada, Mexico, Belize, Costa Rica, El Salvador, Guatemala, Honduras, Montserrat, Nicaragua, Panama, Turks and Caicos Islands, Virgin Islands, or Taiwan, this EULA shall be governed by and construed in accordance with the laws of the State of California, United States of America. With respect to any dispute which may arise in connection with this EULA and/or this SOFTWARE, You consent to the exclusive jurisdiction and venue of the federal and/or state courts in the county of Santa Clara in the state of California. For the avoidance of doubt if the SOFTWARE was obtained in the United States, You obtained (purchased) the SOFTWARE from ABBYY USA Software House, Inc.

15.2 If the SOFTWARE was obtained in Japan, this EULA shall be governed by and construed in accordance with the laws of Japan and the parties accept the exclusive jurisdiction of the Tokyo District Court of Japan.

15.3 If the SOFTWARE was obtained in Austria, Belgium, Bulgaria, Croatia, the Czech Republic, Denmark, Finland, France, Hungary, Italy, Germany, Luxembourg, the Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Latvia, Lithuania, Estonia or any other member state of the European Union, that is not directly mentioned in article 15.4 of this EULA, or in Switzerland, Norway, Iceland or Liechtenstein, Albania, Bosnia and Herzegovina, Georgia, Iraq, Israel, the Republic of North Macedonia, Turkey, Serbia, Montenegro, Moldova and Ukraine this EULA shall be governed by and construed in accordance with the substantive law of Germany. The courts of Munich shall have exclusive jurisdiction over all disputes relating to this EULA.

15.4 If the SOFTWARE was obtained in the United Kingdom of Great Britain and Northern Ireland, the Republic of Ireland, the Cayman Islands, Gibraltar, Guernsey, the Isle of Man, Jersey, and the British Virgin Islands this EULA shall be governed by and construed in accordance with the Laws of England and Wales and the parties accept the exclusive jurisdiction of the courts of England and Wales.

15.5 If the SOFTWARE was obtained in Australia, New Zealand, Papua New Guinea, Christmas Island, Cocos (Keeling) Islands, Cook Islands, Fiji, Niue, Norfolk Island, Tokelau this EULA shall be governed by and construed in accordance with the Laws of the State of New South Wales, Australia and the parties accept the exclusive jurisdiction of the State and Federal Courts in the State of New South Wales.

15.6 If the SOFTWARE was obtained in Russia, Belarus, Kazakhstan, or any other country of the CIS, except for Moldova this EULA shall be governed by and construed in accordance with the substantive law in force in the Russian Federation.

15.7 If article 15.6 applies and You are an entity or a sole proprietor (a person who is in business by himself/herself without the use of a company structure or partners and bears alone full responsibility for the actions of the business) the Arbitrazh Court of Moscow, the Russian Federation, shall have exclusive jurisdiction over all disputes relating to this EULA. If article 15.6 applies and You are an individual person, the Butyrsky District Court of Moscow, the Russian Federation, shall have exclusive jurisdiction over all disputes relating to this EULA.

15.8 In the cases described in articles 15.1 - 15.6, this EULA will not be governed by the conflict of law rules of any jurisdiction or the United Nations Convention on Contracts for the International Sale of Goods, the application of which is expressly excluded.

15.9 If the SOFTWARE was obtained (purchased) in a country other than the countries specified in articles 15.1 - 15.6, this EULA shall be governed by and construed in accordance with the substantive law of the country in which You obtained (purchased) the SOFTWARE.

16. Termination

16.1 Unless otherwise agreed with ABBYY in a separate written agreement or except as otherwise provided by the EULA or the documentation for the SOFTWARE, this EULA is effective in perpetuity from the date which You first demonstrate Your acceptance as provided at the beginning of the EULA or as long as it is permitted under applicable law. To the extent that applicable law requires the statement of an expiration period for this EULA, this EULA will last as long as permitted, but in any event, at least as long as the duration of the SOFTWARE copyright and in this case shall automatically expire without further notice when such time period elapses.

16.2 Without prejudice to any other rights, ABBYY may terminate this EULA if You fail to comply with the terms and conditions of this EULA. In such an event, You must destroy all copies of the SOFTWARE, all of its component parts and remove the SOFTWARE from Your Computers.

16.3 You may terminate this EULA by destroying all copies of the SOFTWARE, all of its component parts and removing the SOFTWARE.

16.4 Such termination does not relieve You of Your obligation to pay for the SOFTWARE. The Definitions and articles 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 and article 3.4.4 shall survive the termination or expiration of this EULA, howsoever caused, but this shall not imply or create any continued right to use the SOFTWARE after termination or expiration of this EULA.

17. Miscellaneous

17.1 In the course of activation, installation, operation, registration and/or technical support and maintenance of the SOFTWARE You may be asked to provide ABBYY with certain personal information (such as but not limited to Your name, company name (if applicable), email address, phone number) and technical information (such as but not limited to characteristics of Your hardware, third party software, Serial number of Your SOFTWARE). You may choose not to provide us with Your personal and/or technical information, in which case You may not be able in the future to obtain technical support or maintenance of the SOFTWARE available to ABBYY customers who provide their personal and/or technical information, if provision of personal and/or technical information is essential to provide You with technical support or maintenance of the SOFTWARE or is a requirement of such technical support or maintenance of the SOFTWARE and it does not contradict applicable law. For example, to provide you with technical support, ABBYY needs to process your email or phone number to communicate with you. You agree that Your personal and/or technical information may be processed (including but not limited to collected and/or otherwise used) by ABBYY and/or its affiliates or ABBYY Partners in compliance with applicable law provided that the confidentiality of the data and data security is maintained if it is required by applicable law. To know more about personal data processing, please see Privacy Policy located at http://www.abbyy.com/privacy.

17.2 You acknowledge that the SOFTWARE may have periodic Internet connection with an ABBYY server to check the status of the SOFTWARE or download additional content, information or components. Such information can be used for security (e.g. fraud prevention) and statistical (e.g. billing and analytical) purposes. ABBYY will take reasonable steps with the goal that no personal information about You or Your Computer will be transferred during such connections.

17.3 ABBYY may send You e-mails containing product and company news, information about special offers, advices on product usage and other product and company-related information provided You consent to receive such information. You may remove Your e-mail address from ABBYY’s mailing list at any time by clicking on the unsubscribe link located at the bottom of each email.

17.4 If any claims or lawsuits are brought against You in connection with Your use of the SOFTWARE, You shall inform ABBYY in writing about them promptly and whenever practicable within three (3) business days from the moment You learn of them. You shall take all necessary actions to enable ABBYY to take part in the proceedings or hearings of or take over the defense of said claims or lawsuits in court or arbitration, and shall provide ABBYY with Your full cooperation and all information ABBYY deems useful or necessary for the defense of settlement of the corresponding claims or lawsuits, promptly upon (and whenever practicable no later than seven (7) days from the moment of) the receipt of an inquiry from ABBYY.

17.5 Unless otherwise agreed by the parties, the Software licensed under this EULA requires the payment of consideration. Consideration under this EULA is the price of the License established by ABBYY or an ABBYY Partner and payable in accordance with the payment procedures established by them, or may be included in value of equipment or hardware obtained by You or is part of the consideration payable by You for the full version of the SOFTWARE.

17.6 If any part of this EULA is found void or unenforceable, it will not affect the validity of the balance of the EULA, which shall remain valid and enforceable according to its terms.


Patents

U.S. Patent Nos. 5,490,216, 5,625,465, 5,768,416, and 6,094,505.


How to buy ABBYY FlexiCapture

To submit a purchase order for ABBYY FlexiCapture or ask any related questions, please contact regional offices of ABBYY.


Third-party technologies

© 1984-2011 Adobe Systems Incorporated and its licensors. All rights reserved.

Protected by U.S. Patents 5,929,866; 5,943,063; 6,289,364; 6,563,502; 6,639,593; 6,754,382; Patents Pending.

Adobe, the Adobe logo, Acrobat, the Adobe PDF logo, Distiller and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Portions of this computer program are copyright © 2008 Celartem, Inc. All rights reserved.

Portions of this computer program are copyright © 2011 Caminova, Inc. All rights reserved.

Portions of this computer program are copyright © 2013 Cuminas, Inc. All rights reserved.

DjVu is protected by U.S. Patent No. 6,058,214. Foreign Patents Pending.

Powered by AT&T Labs Technology.

PixTools © 1994-2007 EMC Corporation. All rights reserved.

WIBU, CodeMeter, SmartShelter, SmartBind are registered trademarks of Wibu-Systems.

Portions of this software are copyright © 2012 University of New South Wales. All rights reserved.

© 2001-2006 Michael David Adams

© 1999-2000 Image Power, Inc.

© 1999-2000 The University of British Columbia

This software is based in part on the work of the Independent JPEG Group.

© 1991-2013 Unicode, Inc. All rights reserved.

The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc.

Portions of this software are copyright © 1996-2002, 2006 The FreeType Project (www.freetype.org). All rights reserved.

© ParaType, 2003

EMC2, EMC, Captiva, ISIS and PixTools are registered trademarks, and QuickScan is a trademark of EMC Corporation.

Kodak is a registered trademark of Eastman Kodak Company.

.NET, Access, Active Directory, ActiveX, Aero, Excel, Hyper-V, InfoPath, Internet Explorer, JScript, Microsoft, Office, Outlook, PowerPoint, SharePoint, Silverlight, SQL Azure, SQL Server, Visual Basic, Visual C++, Visual C#, Visual Studio, Windows, Windows Azure, Windows Power Shell, Windows Server, Windows Vista, Word are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.

All other trademarks are the property of their respective owners.

The TWAIN Toolkit is distributed as is. The developer and distributors of the TWAIN Toolkit expressly disclaim all implied, express or statutory warranties including, without limitation, the implied warranties of merchantability, noninfringement of third party rights and fitness for a particular purpose. Neither the developers nor the distributors will be liable for damages, whether direct, indirect, special, incidental, or consequential, as a result of the reproduction, modification, distribution or other use of the TWAIN Toolkit.

JasPer License Version 2.0

© 2001-2006 Michael David Adams

© 1999-2000 Image Power, Inc.

© 1999-2000 The University of British Columbia

All rights reserved.

Permission is hereby granted, free of charge, to any person (the "User") obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1.The above copyright notices and this permission notice (which includes the disclaimer below) shall be included in all copies or substantial portions of the Software.

2.The name of a copyright holder shall not be used to endorse or promote products derived from the Software without specific prior written permission.

THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.


Tutorial

In this Tutorial you will find two sample FlexiLayouts and detailed step-by-step instructions on how to create them.

For the sake of simplicity, the samples in this Tutorial use one-page documents. For sample FlexiLayouts designed to process more complex documents, see the folders Contract, Invoice, Letter, Prices, etc. located in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS.

·The Halloween Registration Form section describes the creation of a FlexiLayout for a simple registration document. You will learn how to create blocks and elements, set simple search constraints and describe field locations. The FlexiLayout Studio project with the test images and a ready-made FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Halloween Form.

·The Easiest Recipes section describes the creation of a FlexiLayout for a more complex document with various types of fields. Here you will learn some tricks and non-standard approaches that may be helpful when describing field locations. The FlexiLayout Studio project with the test images and a ready-made FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Recipe.

·The Invoices section describes a creation of a flexible Document Definition (FlexiLayout) for a simple invoice. You will create blocks and elements of type Table and also learn some approaches which may be used in case of realistic images. The tutorial has links to various sections of the help file, particularly Help/Tutorial/Sample1 and Help/Tutorial/Sample2, which describe in detail how to create a FlexiLayout with blocks and elements of different types (except Table) and how to do most basic actions. You can find a third sample FlexiLayout in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice One-Page. The test images in the project are typical of invoices and contain standard data fields and a table.


Sample 1. Introduction

Show/Hide Hidden Text

warning Important!For the sake of simplicity, a one-page document is used in this sample.

This sample document is a typical example of a registration form for which a FlexiLayout must be created. You will go through all the steps required to create a FlexiLayout that will detect the following elements: Static Text, Character String, Barcode, Paragraph, Date, Separator, and Object Collection.

The ultimate goal is to create a FlexiLayout which will enable ABBYY FlexiCapture to locate the following fields on all the test pages:

·NAME

·YOUR PLANET NAME

·YOUR SPACESHIP NUMBER

·DATE YOU ARRIVED AT THE EARTH

·YOUR IDENTITY NUMBER ON THE PARTY

·YOUR PHOTO IN FANCY DRESS

Additionally, the FlexiLayout must enable FlexiCapture to find a text field in which the guest has entered the information he or she managed to find about Halloween. Unlike all the above fields, the exact name of this field is not known in advance.

Show me...

sample1


Sample 1. Step 1: Creating a new project

note Note.A project is a set of files created by ABBYY FlexiLayout™ Studio which contains all the data pertaining to a FlexiLayout.

1.Create a new folder and name it Halloween Form.

2.Run ABBYY FlexiLayout Studio.

3.Create a new project by selecting File → New Project.

4.Type the name for the project: Sample1, select a project type: ABBYY FlexiLayout Project Files (*.fsp), and specify the path to the Halloween Form folder.

After you create the project, the Halloween Form folder will contain:

·Sample1.fsp – the file of your project,

·Sample1Batch – the default folder where all images added to the batch are stored,

·Sample1Templates – the default folder where the FlexiLayout is stored.


Sample 1. Step 2: Adding images to the batch

Show/Hide Hidden Text

note Note.A batch is a set of test images (pages) to be used for debugging a FlexiLayout.

Once the new project has been created, you must add the test images to the batch. The images will be used to debug the FlexiLayout.

1.Click the Batch tab in the main program window.

2.Select the Open & Add Images... command in the File menu or in the shortcut menu.
Show me...

tutorial2

3.In the Open Images dialog box, click the Image Preprocessing Settings... and in the dialog box that opens select the One document per file option.

4.Specify the test image files (sample 1 images can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Halloween Form\Halloween FormBatch\Halloween FormBatch\<page number>\Image\bwPage.frdat).

The test images you add to the batch will be displayed in the Batch window.

Show me...

tutorial2a

note Note.When adding images, you can specify how reference assembly must be performed. By selecting One document per file, you tell the program that each image is a separate document.

For more information about reference assembly, see the Reference document assembly section of the help file.


Sample 1. Step 3: Setting the FlexiLayout properties

Show/Hide Hidden Text

By default, the program has named the new FlexiLayout FlexiLayout1 (see the FlexiLayout tab in the FlexiLayout Properties dialog box).

Show me...

tutorial3

We recommend renaming the FlexiLayout and giving it a meaningful name for the sake of convenience. The name you give to your FlexiLayout will also be displayed in ABBYY FlexiCapture after you have created a FlexiCapture FlexiLayout on the basis of the FlexiLayout.

To set the FlexiLayout properties (these also include the name of the FlexiLayout):

1.Double-click the name of the FlexiLayout (i.e. FlexiLayout1) or right-click the FlexiLayout and select Properties... in the shortcut menu.

2.In the Name field, type a new name for the FlexiLayout, e.g. RegistrationForm.

3.Specify the pre-recognition parameters:

oFrom the Text languages list, select English as the pre-recognition language (the documents contain text in English).

oSelect Typographic in the Text type group (this is the default setting), assuming that in this particular case neither a dot-matrix printer nor a typewriter will be used to fill in the document.

oMode. You can select either Fast or Thorough pre-recognition mode, depending on the quality of the images to be processed. Since the sample images are of good quality, contain no noise and almost no small print, select the Fast mode. This will speed up pre-recognition, both when creating the FlexiLayout in FlexiLayout Studio and when processing it in FlexiCapture.

Multi-page parameters – Our document contains one page. Therefore, specify 1 for Minimum number of pages and 1 for Maximum number of pages.

Show me...

tutorial4

There is no need to specify the beginning and end of documents, so you can delete the predefined Header and Footer elements from the list of elements of your FlexiLayout.

note Note.You can add Header and Footer elements to a FlexiLayout to help the program detect the beginning and end of documents. If the program fails to find both the Header and Footer elements when matching the FlexiLayout, it will use the maximum number of pages specified in the FlexiLayout for document separation. For the document in this example, we specified 1 as the maximum number of pages.


Sample 1. Step 4: Pre-recognition

Show/Hide Hidden Text

Before you start creating document elements, you need to know which objects on the document can be used as "signposts" when looking for fields (blocks). These are usually pictures and/or text fragments that are consistently detected during pre-recognition.

To start pre-recognition:

1.Select all the images in the batch.

2.Select the Pre-Recognize command in the Batch menu or in the shortcut menu of each image.
Show me...

tutorial5

note Note.If you change images in the batch or add new images, you will need to restart the pre-recognition procedure. If an image has not been pre-recognized, it will be pre-recognized when matching it with its FlexiLayout.


Sample 1. Step 5: Viewing images and pre-recognition results

Show/Hide Hidden Text

Open the first page in the batch, double-click the corresponding line in the Batch window.

The image will be displayed in the Image window in Matched Layout mode.

By default, the pre-recognition results are not displayed on the image.

To view the pre-recognition results:

·Select the Show Image Objects command in the Image window and then select the type of image object you wish to see.
Show me...

tutorial7

or

·Click the corresponding icon on the Extracted Objects toolbar.

note Note.You can also view all the objects by selecting the Show All Objects command.


Sample 1. Step 6: Analyzing pre-recognition results and selecting reference elements

When analyzing the pre-recognition results, you might wish to view different types of objects and images separately.

First, find the objects which have been consistently detected during pre-recognition on each of the test images and which the program may use as reference elements when looking for fields.

Once you have viewed the pre-recognition results for all the test images, you will notice that:

1.The program has consistently detected all the Text objects corresponding to the names of the fields, and all the Barcode objects and Separator objects around the photograph. These objects can be used as reference elements when looking for the blocks.

2.On images 3, 5 and 6 the program has detected separators that are missing on the other images. These objects cannot be used as reference elements when looking for the blocks.

3.On images 1 and 6, the program has failed to recognize all parts of the photograph as image objects of type Picture. This means that looking just for a Picture object the program will not find the entire photograph, and you will need to use additional methods. (They will be described in Step 20: Describing the Photograph field.)

Now you can create and set up the reference elements and specify the search constraints for blocks corresponding for fields to be search.


Sample 1. Step 7: Creating a form identifier

Navigation: Tutorial > Sample 1 >

Return to chapter overview

Sample 1. Step 7: Creating a document identifier

Show/Hide Hidden Text

When processing semi-structured documents in ABBYY FlexiCapture, one would normally wish to exclude documents not belonging to the current type. One way to identify a document is to mark at least one element as required. A required element must be consistently detected on all the documents of a given type (otherwise, the program will not be able to match the document and its FlexiLayout).

In this particular case, the document heading (HALLOWEEN REGISTRATION FORM) will make a good identifier element, since it contains distinct text that can be easily read by the OCR engine.

note Note.You can specify an identifier element or set of elements in a predefined compound Header element (not described in this tutorial).

The document heading will be used solely to identify the document as belonging to the given type. In the FlexiLayout, specify the document heading as an element of type Static Text.

To create an ID element:

1.Click the FlexiLayout tab in the program main window.

2.Select SearchElements in the FlexiLayout tree.

3.Select the Static Text command in FlexiLayout → Add element or in the shortcut menu of the element (New → Static Text).

4.In the Name field, type a name for the element, e.g. IDHeader.

5.Select Required element on the General tab to make the document heading a required element.
Show me...

tutorial8

6.Click the Static Text tab.
Show me...

tutorial9

7.In the Search text field, type the text to find: HALLOWEEN REGISTRATION FORM.
Judging by the first image in the batch, one can assume that the document heading is written in one line. Therefore, you can type the heading without spaces to speed up looking for single-line static text.

8.Set the maximum number of errors that may occur in the found text (either in percentage points or as a number). In this particular case we recommend setting the Max error percentage at 20, allowing 5 errors for 25 characters of the document heading.

note Note.The optimal percentage of allowed errors can only be found by trial and error.


Sample 1. Step 8: Testing the identifier element

Show/Hide Hidden Text

To check that the program can reliably detect the image object corresponding to identifier element IDHeader, try matching the FlexiLayout with each image in the batch:

1.Open each image one by one.

2.Select the Match command in the FlexiLayout menu or in the shortcut menu of each image.

If the image and its FlexiLayout have been matched successfully, the program draws a blue frame around the detected element and the hypothesis which the program formulates about the IDHeader element will be marked with [image] in the Tree of Hypothesis. If you click the hypothesis, you will see the properties of the hypothesis in the Properties window.

Show me...

tutorial10

Once you have examined the FlexiLayout matching results for all the images, you will see that the program has failed to formulate a hypothesis for the IDHeader element on image 2 (it is marked with [image]). This is because the document heading is written in two lines on this image, whereas you described the IDHeader as single-line text.


Sample 1. Step 9: Adjusting the properties of the identifier element

Show/Hide Hidden Text

For the identifier element to be detected consistently on all the documents, you need to adjust its properties:

1.Open the element's Properties dialog box.

2.Click the Static Text tab.
Show me...

tutorial11

3.In the Search text field, type the text to find, preserving the spaces: HALLOWEEN REGISTRATION FORM. This means that the program will look for a phrase which may not be written in one line.

4.Select Take spaces into account and Permit multiple lines to specify that the search phrase may be written on more than one line.

5.Set the Line break penalty to 1. This will preserve the quality of the hypothesis when it goes to the next line. If you set a smaller value, the hypothesis will be penalized.

Now if you try matching the FlexiLayout and the images, the program will detect the identifier element on all the test images.


Sample 1. Step 10: Describing the YOUR PLANET NAME field

The field names are detected reliably on all the test images and do not repeat on each given document. The order of the fields is the same on all the documents, even though their exact locations may vary from document to document. This means that for all the fields you can:

1.Create Static Text elements to look for the name of the field.

2.Use the field name to locate Character String, Paragraph, Barcode etc. elements, which will then be used to look for the corresponding fields.

3.Create blocks (which correspond to fields) and specify their location as coinciding with that of the corresponding reference elements.

To describe the location of the block corresponding to the YOUR PLANET NAME field:

1.Create an element of type Static Text and name it PlanetNameHeader. This element will correspond to the name of the field YOUR PLANET NAME.

2.Create an element of type Character String and name it PlanetName. This element will correspond to the field YOUR PLANET NAME proper.

3.Create a block of type Text and name it PlanetName. This block will correspond to the field YOUR PLANET NAME.


Sample 1. Step 11: Describing the YOUR PLANET NAME field with a PlanetNameHeader element

Show/Hide Hidden Text

Even though the YOUR PLANET NAME field is preceded by the NAME field, the FlexiLayout must first search for the field YOUR PLANET NAME. This will exclude the ambiguity which may arise if the FlexiLayout looks for the NAME field first. As the word NAME can be found in both field names, the program will formulate several hypotheses if you instruct it to look just for the word NAME without any additional constraints. To avoid this ambiguity, the program must first look for the YOUR PLANET NAME field and only then for the NAME field. In Step 15 you will impose additional constraints on the NAME field.

To create a PlanetNameHeader element:

1.Create an element of type Static Text and name it PlanetNameHeader.
Do not select Required element which is not selected by default. Unlike the document heading, which is used as a document identifier and for this reason was specified as a required element, all the other elements are assumed to be optional. This will allow the program to formulate null hypotheses even for those elements for which it fails to find the corresponding objects on the images.
Show me...

tutorial12

2.Click the Static Text tab.

3.In the Search text field, type the text to search. Since the field name is written in one line on all the test images, you can type it without spaces: YOURPLANETNAME.

4.Set the Max error percentage to 20, since the field name has more than one word and is fairly long.

Try matching the FlexiLayout with the test images and make sure that the program successfully finds the YOUR PLANET NAME field on all the images.

Show me...

tutorial13


Sample 1. Step 12: Describing the YOUR PLANET NAME field with a PlanetName element

Show/Hide Hidden Text

We assume that the YOUR PLANET NAME field always contains only one line. Since, unlike the field name, the data in this field are not fixed, you must define it as a Character String element.

To create the PlanetName element:

1.Create an element of type Character String and name it PlanetName.
Show me...

tutorial14

2.Click the Character String tab.
Show me...

tutorial15

3.Set the alphabet, i.e. all the characters that may be encountered in the names of planets and their satellites. Judging by the test images, the alphabet consists of English letters and parentheses. To set the alphabet, click the Add... button and select the required characters in the Add New Alphabet dialog box.

note Note.The selected characters will be displayed in the Character Set column, (Character String tab, Alphabets field).

4.Set the Percentage of alphabet characters to 100. This means that the program will take into account only the characters of the current element when looking for the object corresponding to PlanetName element.
Show me...

tutorial16

note Note.Generally, you can specify several alphabets for one element. In the Percentage of alphabet characters field, specify the maximum percentage of the characters of each alphabet in the element.

5.Clear the Allow embedded hypotheses box. This will allow the program to formulate hypotheses which have the maximum length and meet all the search criteria. Otherwise the program may formulate several embedded hypotheses, each consisting of portions of one of the selected alphabets (taking into account the allowed percentage of non-alphabet characters).

6.In the Percentage of non-alphabet characters field set the maximum percentage of non-alphabet characters to 10%.

note Note.This value can only be selected by trial and error and can be changed when adjusting the FlexiLayout.

7.In the Character count field, specify this fuzzy range: {0, 3, 35, 100}. This is an estimation of the length of the string of characters. We assume that the possible names of planets may have from 3 to 35 characters. Any hypotheses outside this range will be penalized.

note Note.This value can only be selected by method of trial and error and can be changed when adjusting the FlexiLayout.

8.Click the Relations tab.
Show me...

tutorial17

9.Use the PlanetNameHeader element as the reference element for the PlanetName element. The name of the planet will always be to the right of the field name and will be located on the same level with the name. Therefore, you must specify the location of the element relative to the name and to the name's top and bottom boundaries. Otherwise, the program will formulate a valid hypotheses for any text fragment that consists of characters of the set alphabet, even if it is located higher or lower than the name.
To sum up: the program must look for the name of the planet described by the PlanetName element to the right of the field name specified as the PlanetNameHeader element and located on the same level with the PlanetNameHeader element.

10.Specify that the PlanetName element is located to the right of the PlanetNameHeader element.
For this, click the Add button and in the dialog box that opens select PlanetNameHeader in the Reference element field. From the Type drop-down list, select Right of and leave the default value of the Offset field equal to 0. Click the Add Relation button.
Show me...

tutorial18

11.Specify that the PlanetName element is located not lower than the PlanetNameHeader element. For this, click the Add button and in the dialog box that opens select PlanetNameHeader in the Reference element field. In the Type drop-down list, select Above and set Offset to -100 (this value can only be selected by trial and error). This will give the program some leeway when detecting the position of the element relative to the name. The negative Offset value means that the element is located above the bottom boundary of the name. Click the Add Relation button.

12.Specify that the PlanetName element is located not higher than the PlanetNameHeader element.
For this, click the Add button and in the dialog box that opens select PlanetNameHeader in the Reference element field. In the Type drop-down list, select Below and set Offset to -100 (this value can only be selected by trial and error). This will give the program some leeway when detecting the position of the element relative to the name. The negative Offset value means that the element is located below the top boundary of the name. Click the Add Relation button.

note Note.If you select <whole> in the Reference boundary field, positive Offset values allow you to specify only the following locations: to the right of the right-hand boundary of the element, to the left of the left-hand boundary of the element, higher than the top boundary of the element, or lower than the bottom boundary of the element. If you select Top and Bottom in the Reference boundary field, positive Offset values will limit the search area by the top and bottom boundaries of the element and exclude hypotheses which go beyond the top and bottom boundaries of the name of the field.


Sample 1. Step 13: Testing the YOUR PLANET NAME field

Show/Hide Hidden Text

To check that the program can correctly find the field described by the PlanetName element, activate the Batch tab in the FlexiLayout Studio main window and try matching the FlexiLayout with each image in the batch:

1.Open an image.

2.Select the Match command in the FlexiLayout menu or in the shortcut menu of each image.

note Note.To carry out a fast check, select all the required images in the batch and then select the Match command in the shortcut menu of the batch. The results can be viewed in the Image window in Matched Layout mode. To carry out a more thorough check, which takes more time but allows you to view the formulated hypotheses, select the Match command for each open image separately.

Once you have matched the FlexiLayout with the images, you will see that the YOUR PLANET NAME field corresponding to the PlanetName element has been found successfully on all the images.

Show me...

tutorial19


Sample 1. Step 14: Describing the YOUR PLANET NAME field with a PlanetName block

Show/Hide Hidden Text

To create a block corresponding to the YOUR PLANET NAME field:

1.Click the FlexiLayout tab in the program main window.

2.Select Blocks in the FlexiLayout tree.

3.Select Add Blocks → Text in the FlexiLayout menu or New → Text in the shortcut menu.
Show me...

tutorial20

4.In the Properties dialog box, type a name for the block in the Name field, e.g. PlanetName.

note Note.The name of the block need not coincide with the name of the element corresponding to the YOUR PLANET NAME field, but this is convenient when working with the FlexiLayout.

5.To describe the location of the block, select Source element. Click [image] and specify the PlanetName element as the source element.
Show me...

tutorial21


Sample 1. Step 15: Describing the NAME field

Show/Hide Hidden Text

To describe the location of the block corresponding to the NAME field:

1.Create an element of type Static Tex and name it NameHeader. This element will correspond to the name of the NAME field.

2.Create an element of type Character String and name it GuestName. This element will correspond to the NAME field proper.

3.Create a GuestName block corresponding to the NAME field.

The elements and the block for this field are created as described in Steps 10 to 14 with the following exceptions:

·When specifying the search area for NameHeader, specify that it is located above the PlanetName Header element. This will prevent the program from formulating an erroneous hypothesis that contains the word NAME from the name YOUR PLANET NAME. Show me...

tutorial22

·Unlike the alphabet of the PlanetName element, the alphabet of the GuestName element must include only English letters and the "-" symbol. In the Character count field, specify the fuzzy interval {0, 0, 50, INF}.

·When specifying the search area for the GuestName element, specify the NameHeader element as the reference element.

·When creating the GuestName block, specify the GuestName element as the source element.


Sample 1. Step 16: Describing the YOUR SPACESHIP NUMBER field

Show/Hide Hidden Text

To describe the location of the block corresponding to the YOUR SPACESHIP NUMBER field:

1.Create an element of type Static Text and name it SpaceShipHeader. This element will correspond to the name of the YOUR SPACESHIP NUMBER field.

2.Create an element of type Character String and name it SpaceShip. This element will correspond to the YOUR SPACESHIP NUMBER field proper.

3.Create a block and name it SpaceShip. This block will corresponding to the YOUR SPACESHIP NUMBER field.

The elements and the block for this field are created as described in Steps 10 to 14 with the following exceptions:

·Unlike for the PlanetName element, specify a regular expression for the SpaceShip element rather than an alphabet. This is necessary because the format of data in the YOUR SPACESHIP NUMBER field is the same on all the test images.
The format of spaceship numbers can be defined using the following regular expression:
[N]{5}[A-Z][A-Z][N]{2} (for more on regular expressions see the help file for ABBYY FlexiCapture)
Show me...

tutorial23

·When defining the search area for the SpaceShip element, specify the SpaceShipHeader element as the reference element.

·When creating the SpaceShip block, specify the SpaceShip element as the source element.


Sample 1. Step 17: Describing the DATE YOU ARRIVED AT THE EARTH field

Show/Hide Hidden Text

To describe the location of the block corresponding to the DATE YOU ARRIVED AT THE EARTH field:

1.Create an element of type Static Text and name it DateHeader. This element will correspond to the name of the DATE YOU ARRIVED AT THE EARTH field.

2.Create an element of type Date and name it ArrivalDate. This element will correspond to the DATE YOU ARRIVED AT THE EARTH field proper.

3.Create a block and name it ArrivalDate. This block will correspond to the DATE YOU ARRIVED AT THE EARTH field.

The elements and the block for this field are created as described in Steps 10 to 14 with the following exceptions:

·Unlike for the PlanetNameHeader element, enter the text in the Search text field with spaces: DATE YOU ARRIVED AT THE EARTH. Select the Take spaces into account and Permit multiple lines options and set Line break penalty to 1.
Show me...

tutorial24

·For the DATE YOU ARRIVED AT THE EARTH field, create an element of type Date and name it ArrivalDate. For the ArrivalDate element, specify all the possible date formats on the Date tab. We assume that months will always be written in digits, and the year will always be a 4-digit number. Clear the Word box in the Month group and the Two digits box in the Year group. Other options may be left unchanged.
Show me...

tutorial25

·When defining the search area for the ArrivalDate element, specify the DateHeader element as the reference element.

·When creating the ArrivalDate block, specify the ArrivalDate element as the source element.


Sample 1. Step 18: Describing the YOUR IDENTITY NUMBER ON THE PARTY field

Show/Hide Hidden Text

To describe the location of the block corresponding to the YOUR IDENTITY NUMBER ON THE PARTY field:

1.Create an element of type Static Text and name it BarcodeHeader. This element will correspond to the name of the YOUR IDENTITY NUMBER ON THE PARTY field.

2.Create an element of type Barcode and name it IdentityNumber. This element will correspond to the YOUR IDENTITY NUMBER ON THE PARTY field proper.

3.Create a block and name it IdentityNumber. This block will correspond to the YOUR IDENTITY NUMBER ON THE PARTY field.

The elements and block for this field are created as described in Steps 10 to 14 with the following exceptions:

·For the YOUR IDENTITY NUMBER ON THE PARTY field, create an element of type Barcode and name it IdentityNumber. For the IdentityNumber element, specify the type of barcode (EAN13) and its orientation (Left-to-Right) on the Barcode tab.
Show me...

tutorial26

·When creating an IdentityNumber block, specify the IdentityNumber element as the source element.


Sample 1. Step 19: Describing the ANY TEXT field

Show/Hide Hidden Text

The field located at the bottom of the document has no fixed name. Therefore, objects other than names must be used to locate this field. We will assume that each ANY TEXT field has its own unique name.

First, try using the already created IdentityNumber element to look for the ANY TEXT field, because on all the test images the ANY TEXT field is located below this element.

note Note.Do not use separators that are present on some images, as those are not regular and reliable elements. See Step 6.

To use the IdentityNumber element to find the object corresponding to the ANY TEXT field:

1.Create an element of type Paragraph and name it TextField. This element will correspond to the ANY TEXT field.

2.On the Relations tab, describe the location of the TextField element as Below the IdentityNumber element.

Try finding the ANY TEXT field using the IdentityNumber element. You will see that on some images the hypothesis will also include barcode digits. Therefore, you need to describe the location of the ANY TEXT field more precisely.

Create a White Gap element with horizontal orientation. This element will correspond to the gap between the text and the barcode. This element will be used as a reference element when looking for the ANY TEXT field.

Be sure to place the White Gap element above the TextField element in the tree of elements.

1.Create an element of type White Gap and name it BetweenGap.

2.On the White Gap tab, select Horizontal as the orientation of the BetweenGap.
Show me...

tutorial27

3.On the Relations tab, specify the search area for the BetweenGap element as an area below the IdentityNumber element but no further than 200 dots from the bottom boundary of the BarcodeHeader element.
Show me...

tutorial27a

4.Create an element of type Paragraph and name it TextField.

5.On the Relations tab, describe the location of the TextField element as Below the BetweenGap element, Offset =0.

Try matching the FlexiLayout with all the test images. You will see that the formulated hypothesis about the TextField element does not contain any unwanted data. This means that the BetweenGap element can be used to detect the TextField element.

To describe the location of the block corresponding to the ANY TEXT field, create a block of type Text, name it TextField and specify the TextField element as the source element.


Sample 1. Step 20: Describing the YOUR PHOTO IN FANCY DRESS field

Show/Hide Hidden Text

As has been noted in Step 6, not all the parts of the photo on images 1 and 6 were recognized as image objects of type Picture.

to get a full photo, the program needs to find all the types of Image Object located in the photo area.

For the sake of convenience, group all the photo elements in one compound Photo element. This will also limit the number of formulated hypotheses.

Show me…

tutorial28

The Group element " Photo " will include:

·a PhotoPicture element of type Object Collection corresponding to the photo;

·a PhotoHeader element of type Static Text corresponding to the name YOUR PHOTO IN FANCY DRESS;

·four separators around the photo which are required for finding the PhotoPicture element.

As the text of the name (namely, YOUR PHOTO IN FANCY DRESS) occurs nowhere else in this document, we added the corresponding element first and will search for the separators relative to this element.

Since the name YOUR PHOTO IN FANCY DRESS is unique on the document, add it to the Group element and use it to look for the separators.

To create an element corresponding to the field name:

1.Create an element of type Static Text and name it PhotoHeader.

2.The properties of the element are set similarly to the other field names as described above.

Try matching the FlexiLayout with the images. You will see that the program reliably detects the name on all the images.

Create Separator elements for the four separators around the photo and give them the following names:

·USeparator - upper separator

·BSeparator - lower separator

·LSeparator - left separator

·RSeparator - right separator

On the Separator tab in the Properties dialog box, specify the orientation of each of the 4 separators (Vertical or Horizontal). Do not change the other properties.

Show me...

tutorial29

Now use the test images to specify the search area for each of the separators.

Upper separator (USeparator element):

·below the photo caption but not farther than 100 dots from its top boundary (Below the PhotoHeader element and Above the PhotoHeader, Offset = -100).

·within the area which is not longer than the length of the caption by more than 80 dots on each side (Left of the right boundary of the PhotoHeader element, Offset = -80, Reference boundary = right and Right of the left boundary of the PhotoHeader element, Offset = -80, Reference boundary = left).

Lower separator (BSeparator element):

·below the name of the NAME field (Below the NameHeader element),

·above bottom of IdentityNumber (Above the IdentityNumber element, ElementBoundary = bottom).

·within the area which is not longer than the length of the name by more than 80 dots on each side (Left of the right boundary of the PhotoHeader element, Offset = -80, Reference boundary = right and Right of the left boundary of the PhotoHeader element, Offset = -80, Reference boundary = left).

Left separator (LSeparator element):

·within the area which is not wider than the distance between the upper and lower separators by more than 50 dots on each side (Below the USeparator element, Offset = -50, and Above the BSeparator element, Offset = -50).

·the separator is located not far from the left boundary of the upper separator, the distance cannot exceed 40 dots (Right of the left boundary of the USeparator element, Offset = -20, Reference boundary = left, and Left of the left boundary of the USeparator element, Offset = -20, Reference boundary = left).

Right separator (RSeparator element):

·within the area which is not wider than the distance between the upper and lower separators by more than 50 dots on each side (Below the USeparator element, Offset = -50, and Above the BSeparator element, Offset = -50).

·the separator is located not far from the right boundary of the upper separator, the distance cannot exceed 40 dots (Right of the right boundary of the USeparator element, Offset = -20, Reference boundary = right, and Left of the right boundary of the USeparator element, Offset = -20, Reference boundary = right).

Now if you try matching the FlexiLayout with the images you will see that the program can detect these areas. In the Tree of Hypotheses, right-click a hypothesis and select Show Search Area in the shortcut menu. If the search criteria are wrong and the program failed to locate the search area properly, you will immediately notice this. You may also see that even the search area of a correct hypothesis needs some adjustment, e.g. it may be too small.

The maximum size of all the separators was detected by trial and error while studying the properties of Separator objects during pre-recognition.

To describe the YOUR PHOTO IN FANCY DRESS field:

1.Create an element of type Object Collection and name it PhotoPicture.

2.On the Relations tab, specify the search area for the PhotoPicture element:

obelow the upper separator (Below the USeparator element)

oabove the lower separator (Above the BSeparator element)

oto the right of the left separator (Right of the LSeparator element)

oto the left of the right separator (Left of the RSeparator element)

Then create the PhotoPicture block and specify the Photo Picture element as the source element.


Sample 1. Step 21: Exporting the FlexiLayout

Before you can use your FlexiLayout in ABBYY FlexiCapture, you must export it into AFL format:

1.Select the Export... command in the File menu.

2.In the Export FlexiLayout dialog box, enter a name for the file and select the folder in which to save the file.

The resulting *.afl file can then be used in ABBYY FlexiCapture.


Sample 1. Step 22: Opening the FlexiLayout in ABBYY FlexiCapture

Show/Hide Hidden Text

The FlexiLayout saved in *.afl format can be opened in ABBYY FlexiCapture:

1.Launch ABBYY FlexiCapture.

2.Create a new project or open an existing project.

3.Create a new Document Definition or open an existing Document Definition in the Document Definition Editor.

note Note.To open an existing Document Definition, go to Project → Document Definitions..., select the required Document Definition from the list of available Document Definitions and click Edit...
Show me...

tutorial32

4.In the Document Definition Editor, open the Section Properties dialog box (View → Properties...).

5.Click the FlexiLayout tab.

6.Click the Load... button.
Show me...

tutorial33

7.In the Open dialog box, select the required *.afl file.

note Note.The required Document Definition blocks will be created automatically based on the FlexiLayout. To view the blocks, select the Match Section command in the Tools menu.


Easiest Recipes

Navigation: Tutorial >

Return to chapter overview

Sample 2. Easiest Recipes

Show/Hide Hidden Text

warning Important!For the sake of simplicity, a one-page document is used in this sample.

This sample illustrates the creation of a FlexiLayout for a document which has more different types of fields compared with the Halloween Registration Form. This sample will not only help you to go through all the steps of FlexiLayout creation, but will also teach you some tricks that can be used to describe the position of objects on the document image.

The FlexiLayout Studio project with the test images and a ready–made FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Recipe.

The FlexiLayout must reliably detect the following fields on all the test pages:

·Recipe Name

·Recipe #

·Ingredients

·Cooking Time

·Cooking Description

Show me the example...

sample2


Sample 2. Step 1: Creating a new project

1.Create a new folder and name it Recipes.

2.Run ABBYY FlexiLayout Studio.

3.Create a new project (File → New Project).

4.Type the name for the project: Sample2 and select a project type: ABBYY FlexiLayout Project Files (*.fsp).

Once the project is created, the Recipes folder will contain:

·Sample2.fsp - the project file

·Sample2Batch – the default folder where the images added to the batch are stored

·Sample2Templates - the default folder where the FlexiLayout is stored.


Sample 2. Step 2: Adding images to the batch

Show/Hide Hidden Text

Once the new project has been created, you must add all the test images to the batch. The test images will be used to debug the FlexiLayout.

1.Click the Batch tab in the main program window.

2.Select the Add Images... command in the File menu or in the shortcut menu.
Show me...

tutorial2

3.In the Open Images dialog box, click the Image Preprocessing Settings... and in the dialog box that opens select the One document per file option.

4.Specify the test image files (sample 2 images can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Recipe\<page number>\Images\bwPage.frdat).

The test images you add to the batch will be displayed in the Batch window.

Show me...

tutorial2a

note Note.When adding images, you can immediately specify how the reference document assembly should be performed. Selecting One document per file, tells the program that each image is a separate document. For more about reference document assembly, see Reference document assembly.


Sample 2. Step 3: Setting the FlexiLayout properties

Show/Hide Hidden Text

By default, the program has named the new FlexiLayout FlexiLayout1 (see the FlexiLayout tab in the FlexiLayout Properties dialog box).

We recommend renaming the FlexiLayout and giving it a meaningful name for the sake of convenience.

To set the FlexiLayout properties (these also include the name of the FlexiLayout):

1.Double-click the name of the FlexiLayout (i.e. FlexiLayout1) or right-click the FlexiLayout and select Properties... in the shortcut menu.

2.In the Name field, type a new name for the FlexiLayout, e.g. Recipe.

3.Specify the pre-recognition parameters:

oFrom the Text languages list, select English as the pre-recognition language (the documents contain text in English).

oSelect Typographic in the Text type group (this is the default setting).

oSelect the Fast pre-recognition mode.

Multi-page parameters – Our document consists of one page. Therefore set Minimum number of pages and Maximum number of pages to 1.

Show me...

note Note.For more about selecting the right parameters, see Sample 1, Step 3.

For one-page documents, you do not need to use predefined compound Header and Footer elements to indicate the beginning and end of the documents. Therefore, you can remove them from the list of FlexiLayout elements.

note Note.You can add Header and Footer elements to your FlexiLayout to indicate the beginning and end of the documents. If neither the Header nor the Footer element is found when matching the FlexiLayout, the program will use the maximum number of pages specified in the FlexiLayout as the number of pages in the document. For this particular document we specified 1 as the maximum number of pages.


Sample 2. Step 4: Pre-recognition

Show/Hide Hidden Text

Before you start creating document elements, you need to know which objects on the document can be used as "signposts" when looking for fields (blocks). These are usually pictures and/or paragraphs that are consistently detected on all the images during pre-recognition.

To start pre-recognition:

1.Select all the images in the batch.

2.Select the Pre-Recognize command in the Batch menu or in the shortcut menu of each image
Show me...

note Note.If you replace images in the batch or add new images, you will need to restart the pre-recognition procedure. If an image has not been pre-recognized, it will be pre-recognized when matching it with its FlexiLayout.


Sample 2. Step 5: Viewing images and pre-recognition results

Pre-recognition shows that all the text objects corresponding to the names of the fields, the inverted text, and the horizontal separators can be reliably detected. The program can use these objects as "signposts" or reference elements when looking for other objects.

Now you can create reference elements. Click the FlexiLayout tab in the main program window.

note Note.For more about viewing images and pre-recognition results, see Sample 1, Step 5 and Step 6.

note Note. For each image in the batch, you can create a reference layout which reflects the desired positions of the blocks on the image. A reference layout can be created manually or based on the FlexiLayout matching results. Reference layouts are used when debugging FlexiLayouts, allowing you to compare the matching results with the expected positions of the blocks on each of the images. See Reference layout for details.


Sample 2. Step 6: Creating a document identifier

Show/Hide Hidden Text

When processing semi-structured documents in ABBYY FlexiCapture, one would normally wish to exclude documents not belonging to the current type. One way to identify a document is to mark at least one element as required.

In this particular case, the document heading will make a good identifier element, since it contains distinct text that can be easily read by the OCR engine.

note Note.An identifier element or set of elements can be described in a predefined Header element (not used in this sample).

The document heading will be used solely to identify the document as belonging to the given type and will not be recognized in ABBYY FlexiCapture. In the FlexiLayout, describe the document heading as an element of type Static Text:

1.Click the FlexiLayout tab in the program main window.

2.Select SearchElements in the FlexiLayout tree.

3.Select the Static Text command in FlexiLayout → Add Elements → Static Text or in the shortcut menu of the element.

4.In the Name field, type a name for the element, e.g. FormHeader.

5.Select Required element on the General tab, because the document heading is a required element.
Show me...

6.Click the Static Text tab.
Show me...

7.In the Search text field, type the text to find.
The batch contains test documents that have different headings: Easiest Recipes or Easy to Cook Recipes. Enter both headings.
The headings are written in one line on all the test images. Therefore, you can type the headings without spaces to speed up looking for single-line static text. Separate the two alternative headings by "|".

8.Set the maximum number of errors that the detected text may contain (either in percentage points or as a number). In this particular case we recommend setting the Max error percentage to 20, allowing 5 errors among the 25 characters of the document heading.

note Note.The maximum number of errors is selected by method of trial and error.


Sample 2. Step 7: Testing the identifier element

Show/Hide Hidden Text

To check that the program can reliably detect the identifier element FormHeader, try matching the FlexiLayout with each image in the batch:

1.Open each image.

2.Select the Match command in the FlexiLayout menu or in the shortcut menu of each image.

If the image and its FlexiLayout have been matched successfully, the hypothesis which the program formulates about the FormHeader element will be marked with [image] in the Tree of Hypotheses. If you click the hypothesis, the program will draw a blue frame around the detected element. You will see the properties of the hypothesis in the Properties window.

Show me...

When you try matching the FlexiLayout with the images you will see that on some of the images the program has found a part of the phrase above the document heading instead of the heading itself. The phrase "Enjoy our collection of easiest recipes from over 50 countries of the world" occurs on almost all the images in the batch. To prevent the program from mistaking this phrase for the document heading, you need to adjust the properties if the identifier element. Since the phrase "Enjoy our collection…" is always located above the document heading, the program must look for an object that has all the properties specified by the element and is located closest to the bottom edge of the image.

To specify additional search constraints:

1.Open the Properties dialog box for the FormHeader element.

2.Click the Advanced tab.

3.In the Advanced pre-search relations field, specify an additional search constraint:Look for an object that is closest to the bottom edge of the image. In the FlexiLayout language:
NearestY: PageRect.Bottom;

note Note.The same constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Page bottom edge.

note Note.The Nearest function tells the program that out of the several hypotheses for the element it should look for the one nearest to a particular other element or point on the image (the distance between element centers is measured). Once the function is executed, only one hypotheses remains. This function does not take into account the quality of the hypotheses, as the choice is made at the stage when hypotheses are still being generated.

Once have matched the FlexiLayout with the images again, you will see that the program has reliably detected the document headings, which are described by the FormHeader element, on all the test images.


Sample 2. Step 8: Specifying the order in which the field Recipe # and the name for the recipe must be detected

Usually fields are detected via their names, but not all the fields on our documents have names. For example, the field containing the name of the recipe has no name. Therefore, a different approach must be used to detect this field.

The most obvious solution which first comes to mind is to tell the program that the recipe name is the object that is closest to the form’s heading. But if you look at test image 6, you will see that on this image the closest field is Recipe #:. Sometimes it is possible to specify additional search constraints which help the program to distinguish between the two fields, but in this particular case it is very difficult to differentiate between the two fields — the recipe name and the Recipe #: field are located very close to each other and have similar structures:

1.The name Recipe #: and the field itself are located on the same level. The field may contain the same characters that may be used in the recipe name.

2.One cannot be sure that the text in the recipe name will always be longer than the name Recipe #: and its field.

Note, however, that pre-recognition consistently detects the name Recipe #: on all the test images. This means that you can tell the program to look for Recipe #: first. Then the program will look for the recipe name: the program must look for an object that is closest to the document heading, but which is NOT Recipe #: (which will have been detected by then).


Sample 2. Step 9: Describing the Recipe #: field

The Recipe #: name is detected reliably on all the test images and does not repeat on each given document. This means that for Recipe #: you require:

1.a Recipe element of type Static Text, which will correspond to the name Recipe #:.

2.a RecipeNumber element of type Character String, which will correspond to the data in the field.

3.a RecipeNumber block, which will correspond to the Recipe #: field.


Sample 2. Step 10: Creating the Recipe element

Show/Hide Hidden Text

To create the Recipe element:

1.Create an element of type Static Text and name it Recipe.
Do not select Required element which is not selected by default. Unlike the document heading, which is used as a document identifier and for this reason was specified as a required element, all the other elements are assumed to be optional. This will allow the program to formulate hypotheses even for those elements for which it fails to find corresponding objects on the images.
Show me...

2.Click the Static Text tab.

3.In the Search text field, type the text to search. Since the field name has only one line on all the test images, you can type it without spaces: Recipe#:.

4.Set the Max error percentage to 20 (since the name of the field consists of only one word, it is unlikely to contain a very large number of errors).

Try matching the FlexiLayout with the test images and make sure that the program successfully finds the field name on all the images.


Sample 2. Step 11: Creating a RecipeNumber element

Show/Hide Hidden Text

We assume that the Recipe # field always contains only one line. Since, unlike the field name, the data in this field are not fixed, you must describe it as an element of type Character String.

To create the RecipeNumber element:

1.Create an element of type Character String and name it RecipeNumber.
Show me...

2.Click the Character String tab.
Show me...

3.Set the alphabet, i.e. all the characters that may be encountered in the recipe numbers. Judging by the test images, the alphabet includes digits and capital letters of the English alphabet. The order of letters and digits is not know beforehand. To set the alphabet, click the Add... button and select the required characters in the Add New Alphabet dialog box.

note Note.The selected characters will be displayed in the Character Set column (Character String tab, Alphabets field).

4.Set the Percentage of alphabet characters to 1. This means that the program will take into account only the characters of this alphabet when looking for the RecipeNumber element.
Show me...

note Note.You can specify several alphabets for one element. In this case, set the Percentage of alphabet characters for each alphabet used in the element.

5.Clear the Allow embedded hypotheses box. This will allow the program to formulate hypotheses which have the maximum length and meet all the search criteria. Otherwise the program may formulate several embedded hypotheses, each consisting of portions of one of the selected alphabets (taking into account the allowed percentage of non-alphabet characters).

6.Set the Percentage of non-alphabet characters to 20%.

note Note.This value can only be selected by trial and error and can be changed when adjusting the FlexiLayout.

7.In the Character count field, specify this fuzzy range: { 0, 8, 10, 16 }. This is an estimation of the length of the string of characters. We assume that the number is always 8 digits long. To be on the safe side, tell the program that the number may have from 8 to 10 digits. Any hypotheses outside this range will be penalized.

note Note.This value can only be selected by trial and error and can be changed when adjusting the FlexiLayout.

8.Click the Relations tab.
Show me...

9.Use the Recipe element as the reference element for the RecipeNumber element. The number of the recipe will always be located to the right of the field name and will be located on the same level with the name. Therefore, you must specify the location of the element relative to the name and to the name’s top and bottom boundaries. Otherwise, the program will formulate a valid hypothesis for any text fragment that consists of characters of the set alphabet, even if it is located higher or lower than the field name.
To sum up: The program must look for the recipe number described by the RecipeNumber element to the right of the field name described by the Recipe element and located on the same level with the Recipe heading.

10.Specify that the RecipeNumber element is located to the right of the right boundary of the Recipe element.
For this, click the Add button and in the dialog box that opens select Recipe in the Reference element field. From the Type drop-down list select Right of, in the Reference boundary drop-down list select Right and leave the value of the Offset field unchanged (the default value is 0). Click the Add Relation button.
Show me...

11.Specify that the RecipeNumber element is located not lower than the Recipe element.
For this, click the Add button and in the dialog box that opens select Recipe in the Reference element field. In the Type drop-down list, select Above and set Offset to -50 (this value can only be selected by trial and error). This will give the program some leeway when detecting the position of the element relative to the top boundary of the field name. Negative Offset values allow you to specify that the bottom element boundary is located below the bottom boundary of the name. Click the Add Relation button.

12.Specify that the RecipeNumber element is located not higher than the Recipe element.
For this, click the Add button and in the dialog box that opens select Recipe in the Reference element field. In the Type drop-down list, select Below and set Offset to -50 (this value can only be selected by trial and error). This will give the program some leeway when detecting the position of the element relative to the top boundary of the field name. Negative Offset values allow you to specify that the top element boundary is located above the top boundary of the name Click the Add Relation button.

note Note.If you select <whole> in the Reference boundary field, positive Offset values allow you to specify only the following locations: to the right of the right-hand boundary of the element, to the left of the left-hand boundary of the element, higher than the top boundary of the element, or lower than the bottom boundary of the element. If you select Top and Bottom in the Reference boundary field, positive Offset values will limit the search zone by the top and bottom boundaries of the element and exclude hypotheses which go beyond the left and right boundaries of the name of the field.

Try matching the FlexiLayout with the test images and make sure that the program successfully finds the field containing the number of the recipe on all the images.


Sample 2. Step 12: Creating the RecipeNumber block

Show/Hide Hidden Text

To enable ABBYY FlexiCapture to recognize the number of the recipe, you must create a block corresponding to the Recipe # field and specify its location.

To create a block corresponding to the Recipe # field:

1.Click the FlexiLayout tab in the program main window.

2.Select Blocks in the FlexiLayout tree.

3.Select Add Block → Text in the FlexiLayout menu or in the shortcut menu.
Show me...

4.In the Properties dialog box, type a name for the block in the Name field, e.g. RecipeNumber.

note Note.The name of the block need not coincide with the name of the element corresponding to the Recipe # field. We recommend giving the block the same name as the field for the sake of convenience.

5.To describe the location of the block, select Source element. Click "…" and specify the RecipeNumber element as the source element.
Show me...


Sample 2. Step 13: Describing the field which contains the name of the recipe

Show/Hide Hidden Text

Describe the recipe name field as the object closest to the bottom boundary of the form’s heading, but exclude those regions which contain the elements Recipe and RecipeNumber (see Step 8).

1.Create an element of type Character String and name it RecipeName. This element will correspond to the name of the recipe.

2.Create a RecipeName block corresponding to the field which contains the name of the recipe.

To create the RecipeName element:

1.Create an element of Create Character String and name it RecipeName.

2.Click the Character String tab.

3.Set the required alphabet. Judging by the test images, the alphabet includes all the letters of the English alphabet, digits and the characters "#", "-", "&", and ".". The order and number of characters are not known in advance.

4.Set the Percentage of alphabet characters to 1.

5.Clear the Allow embedded hypotheses box.

6.Set the Percentage of non-alphabet characters to 0.2 (i.e. 20%).

7.In the Character count field, specify the fuzzy range that estimates the total length of all the character strings. Do not change the default range of {–1, –1, INF, INF}. This means that there are no constraints on the length of the character string.

8.Click the Relations tab.
Tell the program that the name of the recipe is located at least 100 dots lower than the bottom boundary of the form’s heading, i.e. there must be a gap at least 100 dots wide between the heading and the recipe name. If you look at the test images you will see that every line located below the heading meets this criterion. The search area must be narrowed.

9.Click the Advanced tab.
In the Advanced pre-search relations field, specify an additional search constraint:Look for the line closest to the top boundary of the document. In the FlexiLayout language this must be written as follows:
NearestY: 0*dot;
together with the search constraint on the Relations tab this narrows the search area to one line located closest to the document heading.

note Note.The same constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To drop-down list select Page top edge.
Show me...

10.Click the Search Constraints tab.

11.As stated in Step 8, the regions of the elements Recipe and RecipeNumber must be excluded from the search area for RecipeName. Click the Add... button next to the Exclude regions of elements field and in the Select Element to Exclude dialog box, select the Recipe and RecipeNumber elements.
Show me...

Try matching the FlexiLayout with the test images and make sure that the program successfully finds the field which contains the name of the recipe on all the images.

Finally, create the RecipeName block. The RecipeName block is created similarly to the RecipeNumber block. The only exception is that you must specify the RecipeName element as the source element for the RecipeName block.


Sample 2. Step 14: Describing the Ingredients field

Show/Hide Hidden Text

Judging by the test images, the list of ingredients is a text fragment which is always located below the name of the Ingredients field but above the separator located over the name of the Cooking field.

To make the description of the above elements easier and to restrict the number of possible hypotheses, group them into a Group element:

1.Create a Group element and name it RecipeContents.

2.Within the RecipeContents element, create an element of type Static Text and name it IngredientsHeader. This element will correspond to the name Ingredients. Specify the properties of the element as in Step 10 for the Recipe element.

3.Within the RecipeContents element, create an element of type Separator which will correspond to the separator above the name Cooking. On the Separator tab, specify the orientation of the separator: Horizontal. In the element's Properties dialog box, click the Relations tab and specify the search constraints: below the name Ingredients: (i.e. Below the IngredientsHeader element).
If you try matching the FlexiLayout, you will see that sometimes the program treats the lower boundary of an image as a separator.
The problem can be solved by adding another search constraint. In the Advanced pre-search relations field (Properties dialog box, Advanced tab), add this search constraint:Look for the separator closest to the name Ingredients:. In the FlexiLayout language this must be written as follows:
Nearest: SearchElements.RecipeContents.IngredientsHeader;

note Note.The same constraint can also be specified via the program’s graphical user interface. Click the Relations, select Nearest, and in the To drop-down list select Element and specify IngredientsHeader as the Reference element.

4.Match the adjusted FlexiLayout once again.
Show me...

5.You can also add another search constraint for the IngredientsHeader element. In the Advanced pre-search relations field (Properties dialog box, Advanced tab), add this search constraint:Look for the field name in the upper part of the image. In the FlexiLayout language this must be written as follows:
Above: PageRect.top + PageRect.Height/2;

6.Within the RecipeContents element, create an element of type Paragraph and name it Ingredients. This element will correspond to the Ingredients field.
Set the search constraints (element's Properties dialog box, Relations tab: below the Ingredients: heading (Below the IngredientsHeader), but above the separator (Above the Separator element).
Try matching the FlexiLayout with the test images and make sure that the program successfully finds the Ingredients field on all the images.

Finally, create the Ingredients block. The Ingredients block is created similarly to the RecipeNumber block. The only exception is that you must specify the Ingredients element as the source element for the Ingredients block.


Sample 2. Step 15: Describing the field which contains the cooking instructions and the field which contains the cooking time

Create a Group element for the cooking time and cooking instructions:

1.Create a Group element and name it Cooking.

2.The Cooking element must contain the following elements:

oCookingTimeHeader element (of type Static Text) which corresponds to the time units specified in the Cooking Time field (see Step 16 for details).

oCookingTime element (of type Character String), which corresponds to the Cooking Time field (see Step 17 for details).

oInvertedHeader element (of type Object Collection), which corresponds to the name of the Cooking Description field (see Step 19 for details).

ocompound Description element (of type Group), which corresponds to the Cooking Description field (see Step 20 for details).


Sample 2. Step 16: Creating a CookingTimeHeader element

To create the CookingTimeHeader element:

1.Create an element of type Static Text and name it CookingTimeHeader.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: minutes|hour|hours.

4.Set Max error percentage to 10.

5.Click the Advanced tab.

6.The field which contains the cooking time is located below all the other objects on the image. This means that you can set an additional search constraint in the Advanced pre-search relations field:Search for the object closest to the bottom of the page. In the FlexiLayout language this must be written as follows:
NearestY: PageRect.Bottom;

note Note.The same constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To drop-down list select Page bottom edge.


Sample 2. Step 17: Creating a CookingTime element

To create the CookingTime element:

1.Create an element of type Character String and name it CookingTime.

2.Click the Character String tab.

3.Set the required alphabet. Judging by the test images, the alphabet includes only digits.

4.Set the Percentage of alphabet characters to 1.

5.Clear the Allow embedded hypotheses box.

6.Set the Percentage of non-alphabet characters to 10%.

7.In the Character count field, specify this fuzzy range {0, 1, 3, 4}. This interval is an estimation of the length of the string of characters. We assume that the string may be 1 to 3 characters long. Any hypotheses outside this range will be penalized.

8.Click the Relations tab.

9.On the Relations tab, specify that the number indicating the cooking time is always located to the left of the units of time, and that the distance between the digits and the time units cannot exceed 100 dots (i.e. Left of the CookingTimeHeader element, Offset = 0 and Right of the left boundary of the CookingTimeHeader element, Offset = –100, Reference boundary = left).

10.Since the cooking time is always written on the same level as the units of time, add the following search constraints:

oAbove the CookingTimeHeader element, Offset = -20, Reference boundary = bottom

oBelow the CookingTimeHeader element, Offset = -20, Reference boundary = top


Sample 2. Step 18: Creating a CookingTime block

Show/Hide Hidden Text

To create the CookingTime block:

1.Activate the FlexiLayout window in the program main window.

2.Select the Blocks object in the FlexiLayout tree.

3.Select Add Block → Text in the FlexiLayout menu or Add Block → Text in the shortcut menu.

4.In the Properties dialog box, type a name for the block in the Name field, e.g. CookingTime.

5.To describe the location of the block, select Expression.

6.Describe the block as a rectangle created by merging the rectangles around the CookingTimeHeader and CookingTime elements. To give the program some leeway, enlarge the height and width of the resulting rectangle by 3mm.
In the FlexiLayout language this must be written as follows:
Rect outputRect;
outputRect = SearchElements.Cooking.CookingTime.Rect Or SearchElements.Cooking.CookingTimeHeader.Rect;
OutputRegion = outputRect;
OutputRegion.Inflate (3*mm, 3*mm);
Show me...


Sample 2. Step 19: Creating an InvertedHeader element

Show/Hide Hidden Text

The name Cooking is inverted text (i.e. light text against a dark background).

To create the InvertedHeader element:

1.Create an element of type Object Collection and name it InvertedHeader.

2.Click the Object Collection tab.

3.Select the Inverted text option in the Type group.
Show me...

Try matching the FlexiLayout with the test images and make sure that the program successfully finds the inverted text on all the images.


Sample 2. Step 20: Describing the Cooking field

In this step you will tell the program how to look for the field under the name Cooking, which contains cooking instructions and information about the number of servings.

Note that information about the number of servings is given after the word Serves on all the test images. However, on images 2, 3 and 4 the word "serves" is preceded by other words. Describe the field in such a way as to exclude this unwanted text from the block to be recognized.

For easier navigation in the FlexiLayout tree and to reduce the number of hypotheses for the Cooking element, create a Group element and name it Description:

1.Within the Cooking element, create a Group element and name it Description.

2.Within the Description element, create an element of type Static Text and name it Serves. This element will be used to locate the word "Serves" (see Step 21 for details).

3.Within the Description element, create an element of type Character String and name it Portions. This element will be used to locate the number of servings (see Step 22 for details).

4.Within the Description element, create an element of type Paragraph and name it CookingDescription. This element will correspond to the Cooking field (see Step 23 for details).

5.Create a block corresponding to the Cooking field and name it CookingDescription (see Step 24 for details).


Sample 2. Step 21: Creating a Serves element

To create the Serves element:

1.Create an element of type Static Text and name it Serves.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: Serves.

4.Set Max error percentage to 20.

5.Click the Advanced tab.

6.In the Advanced pre-search relations field, specify an additional search constraint:Look for the object closest to the cooking time. In the FlexiLayout language this must be written as follows:
Nearest: SearchElements.Cooking.CookingTimeHeader;

note Note.The same constraint can also be specified via the program’s graphical user interface. Click the Relations, select Nearest, and in the To drop-down list select Element and specify CookingTimeHeader as the Reference element.


Sample 2. Step 22: Creating a Portions element

To create the Portions element:

1.Create an element of type Character String and name it Portions.

2.Click the Character String tab.

3.Set the required alphabet. Judging by the test images, the alphabet includes all the digits and the letters "T", "t", "O", and "o".

4.Set the Percentage of alphabet characters to 1.

5.Clear the Allow embedded hypotheses box.

6.Set the Percentage of non-alphabet characters to 20.

7.In the Character count field, specify this fuzzy range {0, 1, 10, 15}. This interval is an estimation of the length of the character string. We assume that the number of characters may be from 1 to 10. Any hypotheses outside this range will be penalized.

8.Click the Relations tab.

9.Since the number of servings is always located to the right of the word "Serves" and the distance between the right boundary of the word "Serves" and the right boundary of the number cannot exceed 200 dots, specify the following search constraints:

oRight of the Serves element, Offset = 0

oLeft of the Serves element, Offset = -200, Reference boundary = right

10.Since the number of servings is always written on the same level with the word Serves, add the following search constraints:

oAbove the Serves element, Offset = -50

oBelow the Serves element, Offset = -50


Sample 2. Step 23: Describing the Cooking field

To create the CookingDescription element:

1.Create an element of type Paragraph and name it CookingDescription.

2.Click the Relations tab.

3.Since the cooking instructions are always located below the name Cooking but above the word "Serves", specify the following search constraints:

oBelow the InvertedHeader element, Offset = 0

oAbove the Serves element, Offset = 0


Sample 2. Step 24: Creating a CookingDescription block

To create the CookingInstructions block:

1.Click the FlexiLayout tab in the program main window.

2.Select the Blocks object in the FlexiLayout tree.

3.Select Blocks → Add Block → Text in the FlexiLayout menu or in the shortcut menu.

4.In the Properties dialog box, specify the name of the block in the Name field: CookingInstructions.

5.To describe the location of the block, select Expression.

6.You must describe the location of the block so that it includes only the cooking instructions and the number of servings. The block must not include unwanted text (i.e. any text that may precede the word "Serves"). Describe the block as a collection of rectangles around the following elements: CookingDescription, Serves and Servings. This method allows you to specify non-rectangular regions.
In the FlexiLayout language this must be written as follows:
RectArray outputRectArray;
//initializing the variable with the help of an empty constructor
outputRectArray = RectArray();
//adding the rectangles of the hypotheses of three elements
outputRectArray.Add ( SearchElements.Cooking.Description.CookingInstructions.Rect );
outputRectArray.Add( SearchElements.Cooking.Description.Serves.Rect );
outputRectArray.Add( SearchElements.Cooking.Description.Servings.Rect );
OutputRegion = Region( outputRectArray );


Sample 2. Step 25: The FlexiLayout is ready

The resulting FlexiLayout can be saved as an *.afl file and exported into ABBYY FlexiCapture.

For more about exporting FlexiLayouts see Sample 1, Step 21 and Step 22.


Invoices

Navigation: Tutorial >

Return to chapter overview

Sample 3. Invoices

Show/Hide Hidden Text

warning Important!For the sake of simplicity, this sample uses a one-page document. This sample describes the creation of a FlexiLayout for a simple invoice. Compared to the previous samples, this one includes a table.

This sample will guide you through all the steps of FlexiLayout creation and at the same time teach you some tricks you can use to describe the position of objects. Most importantly, it will teach you how to detect image objects which correspond to Table elements.

This sample contains references to the following sections of the help file: Help/Tutorial/Sample1 and Help/Tutorial/Sample2, which describe the creation of FlexiLayouts with blocks and elements of various types (except Tables). Some of the basic operations are described there in greater detail.

The FlexiLayout Studio project with the test images and a ready–made FlexiLayout can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice One-Page.

The sample document is a rather simple but typical invoice. It differs from the previous examples in that it has a table field and some fields of the document may be absent.

Show me the example...

sample3

Below we provide step-by-step instructions for creating a FlexiLayout.

The purpose of a FlexiLayout for this document is to ensure reliable detection of the following fields on all the test images (provided they occur on a document):

·Invoice Number

·Invoice Date

·Delivery Address

·Total Quantity

·Total Amount

·Country

·Invoice Table (only the following columns: Reference, Designation, Quantity, Unit Price, Total)

Show me the example...


Sample 3. Step 1: Preparatory settings

Show/Hide Hidden Text

1.Create a new folder and name it Invoices One-Page.

2.Start ABBYY FlexiLayout Studio.

3.Create a new project and name it Sample3 (for more details see Tutorial 1, Step 1).

4.Add images to the batch (for more details see Tutorial 1, Step 2).

note Note.Test images of Tutorial 3 are stored in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice One-Page\Invoice One-PageBatch\<page number>\Images\bwPage.frdat.

5.Specify FlexiLayout properties (for more details see Tutorial 1, Step 3).

oUnder Text type, select Typographic.

oIn Text languages select English. Note that the program allows you to specify more than one language.

oName the FlexiLayout Invoice.

oSelect the Fast pre-recognition mode, and set Minimum number of pages and Maximum number of pages to 1.
Show me...

note Note.See Tutorial 1, Step 3 for more about selecting the right pre–recognition parameters.

For one-page documents, you do not need to use predefined compound Header and Footer elements to indicate the beginning and end of the documents. Therefore, you can remove them from the list of FlexiLayout elements.

note Note.You can add Header and Footer elements to your FlexiLayout to indicate the beginning and end of the documents. If neither the Header nor the Footer element is found when matching the FlexiLayout, the program will use the maximum number of pages specified in the FlexiLayout as the number of pages in the document. For this particular document we specified 1 as the maximum number of pages.


Sample 3. Step 2: Visual analysis of the images and pre-recognition results

Prior to creating elements, we must decide which objects on the document can serve to detect the data fields. These objects can be selected only from such graphical and/or paragraphs of the image that are reliably detected during the pre-recognition process.

Start pre-recognition by clicking Prerecognize (see Tutorial 1, Step 4 for details).

Reviewing the pre-recognition results reveals that all the text objects corresponding to the names of the data fields (if a field has a name), names of columns, and horizontal separators have been reliably detected. So they may be used to search for other objects on the images.

note Note.For more information on reviewing images and pre-recognition results, see Tutorial 1, Step 5 and Step 6.

Now we can start to create blocks and elements. To do this, activate the FlexiLayout window in the main window of ABBYY FlexiLayout Studio.


Sample 3. Step 3: Blocks

Show/Hide Hidden Text

The main goal of the FlexiLayout creation is a reliable detection of the following blocks (provided they occur on an image):

·Invoice Number

·Invoice Date

·Delivery Address

·Total Quantity

·Total Amount

·Country

·Invoice Table (only the following columns: Reference, Designation, Quantity, Unit Price, Total)

Let us start to create these blocks in order to have their list during FlexiLayout creation.

1.Create a block InvoiceNumber of type Text, which will correspond to the field Invoice Number.

2.Create a block InvoiceDate of type Text, which will correspond to the field Invoice Date.

3.Create a block DeliveryAddress of type Text, which will correspond to the field Delivery Address.

4.Create a block TotalQuantity of type Text, which will correspond to the field Total Quantity.

5.Create a block TotalAmount of type Text, which will correspond to the field Total Amount.

6.Create a block Country of type Text, which will correspond to the field Country.

7.Create a block InvoiceTable of type Table, which will correspond to the field Invoice Table. In the Properties dialog box of the block, click the Columns tab, enter the names of the columns and specify their order, which will later be used in a FlexiCapture Document Definition. Add the column names in the following order: Reference, Designation, Quantity, UnitPrice, and Total. (For more information, see Table Block)
Show me...

note Note.At this stage we only specify the type of a block and its name (and the order of columns for the Table block). We will specify the location of each block later, when all auxiliary elements have been described and debugged. It is very important that the block of type Table be created before the element of type Table which is used to look for the block, as the Table element must keep a reference to the Table block. This requirement makes Table blocks different from blocks of types Text, Barcode, Checkmark , and Picture, which can be created after modifying a FlexiLayout, when all the elements for different blocks have been created (for instance see Tutorial 1, Tutorial 2).

Now that the preparatory settings have been made, we can start to create elements.


Sample 3. Step 4: Analyzing the images to decide in which order elements must be detected

At this step, we are to decide:

·Is there any pattern in the arrangement of the fields on the images?

·Which elements can be used as reference elements for fields’ detection?

·What sequence of search for elements is the best choice? (At each new step we can only refer to the above described elements.)

Let us analyze the available images.

1.You will have noticed that the central part of the document contains a table which occurs on all the images.

note Note.Please note that in FlexiLayout Studio, a table is an image object made up of fragments that consist of rows and columns visually separated by separator lines or by white gaps. (See Table for more details.)

2.Above the table there is a group of fields (which may be named the InvoiceHeader): Invoice Number, Invoice Date, and Delivery Address. Note that the field Invoice Number occurs on all the images and can be used as a identifier field, while the fields Invoice Date and Delivery Address are optional.

3.Below the table there is a group of fields (which may be named the Footer): TotalQuantity, TotalAmount and Country. These fields also do not occur on all the images.

We will start to create our search for elements in the upper part of the document. To detect the upper fields, we will create a logical group uniting all the elements which are used to look for the fields Invoice Number, Invoice Date, and Delivery Address.

1.Create an element of type Group and name it InvoiceHeader.
The fields Invoice Number, Invoice Date, and Delivery Address are always located in the upper left corner. Moreover, their order is always the same: Delivery Address followed by Invoice Number followed by Invoice Date (provided they occur on the image). We will look for them in the same order.

2.To describe search of the keywords for the names of the fields Invoice Number, Invoice Date, and Delivery Address, we will use elements of type Static Text. The InvoiceHeader element must contain the following elements:

okwDeliveryAddress element of the Static Text, which will correspond to the name of the field Delivery Address (for detailed instructions, see Step 5);

okwInvoiceNumber element of the Static Text, which will correspond to the name of the field Invoice Number (for detailed instructions, see Step 6);

okwDate element of the Static Text, which will correspond to the name of the field Invoice Date (for detailed instructions, see Step 7).

3.As for the fields Number and Invoice Date, we are going to search for them in the same row as their corresponding names, to the right of the names.
In the InvoiceHeader element, create the following elements:

oInvoiceNumber element of type Character String, which will correspond to the field Invoice Number (for detailed instructions, see Step 8);

oa Group element grDate to look for the field Invoice Date (for detailed instructions, see Step 9).

In the InvoiceHeader.grDate element, create:

oInvoiceDate element of the Date type, which will correspond to the Invoice Date field in the case of good quality images (for detailed instructions, see Step 9);

oInvoiceDateAsString element of type Character String, which will correspond to the Invoice Date field if the program fails to find the InvoiceDate element (for detailed instructions, see Step 9).

note Note.For more information on finding dates on poor quality images, see the Tips and Tricks section.

4.The field Delivery Address has multiple lines, so we need an element of the Paragraph type to detect it. However, prior to creating this element, we should limit the search area as much as possible. For the right boundary of the search area, we will use element of the White Gap type. Afterwards, we will group all the elements which describe the location of the field Delivery Address into a Group element:

oIn the element InvoiceHeader, create a Group element and name it grAddress (for detailed instructions, see Step 10).

In the grAddress element, create the following elements:

oan auxiliary element wgAddressRight of the White Gap type, bordering on the right the field Delivery Address (for detailed instructions, see Step 11);

oan element DeliveryAddress of the Paragraph type, which will correspond to the field Delivery Address (for detailed instructions, see Step 12).


Sample 3. Step 5: Detecting the name of the Delivery Address field with a kwDeliveryAddress element

Analysis of the test images reveals that the string "DeliveryAddress" may be used as the keywords for the Delivery Address field name. Set the maximum percentage of errors to 20 per cent, i.e. in case of 15 letters string mean no more than 3 errors in the entire string.

note Note.The case of the letters does not affect the search and is only used to make the text more readable. The maximum number of errors is determined by method of trial and error. For more information about the parameters of a Static Text element, see Help/Elements/Element Properties/ Static Text.

To create the kwDeliveryAddress element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwDeliveryAddress.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: "DeliveryAddress".

4.Set the Max error percentage to 20.

5.Click the Advanced tab.

6.Since the Delivery Address field is in the upper third and in the left third of the image, set the following additional search constraint in the Advanced pre-search relations field: Look for the object in the left third of the image. Look for the object in the upper third of the image. In the FlexiLayout language:
Above: PageRect.Top + PageRect.Height/3;
LeftOf: PageRect.Left + PageRect.Width/3;

7.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

note Note.To match the FlexiLayout with all the test images, you can use the shortcut keys:

·Activate the Batch window

·Press Ctrl+A for Select All pages

·Press Ctrl+E for Match FlexiLayout


Sample 3. Step 6: Detecting the name of the Invoice Number field with a the kwInvoiceNumber element

Show/Hide Hidden Text

Analysis of the images reveals that the name of the field Invoice Number occurs on all the images and distinguishes them from other document types. When processing semi-structured documents in ABBYY FlexiCapture, you will want to avoid accidental recognition of documents which do not belong to the selected type. One way to identify a document is to create at least one required element. So we will mark this element as required, i.e. use it as an identifier for this type of document.

Note that on some of the images this name is written as Invoice No., while on others it is written as Credit note no. Our search string must include both these variants, and we will specify each of the strings without spaces. In this case the maximum number of errors will apply to the entire phrase, not to separate words.

To create the kwInvoiceNumber element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceNumber.

2.Select Required element on the General tab (we have decided to make this element a required element).

3.Click the Static Text tab.

4.In the Search text field, enter the text to find: “InvoiceNo.|CreditNoteNo”.

5.Set Max error percentage to 20.

6.Click the Relations tab.

7.On the Relations tab, specify that the keywords of the name of the Invoice Number field can only occur below the name of the field Delivery Address:

oBelow the element InvoiceHeader.kwDeliveryAddress, Offset = 0.
Show me...

8.Click the Advanced tab.

9.Since the Delivery Address field is in the upper third and in the left third of the image, set the following additional search constraint in the Advanced pre-search relations field:
Look for the object in the left third of the image; Look for the object in the upper third of the image. In the FlexiLayout language:
Above: PageRect.Top + PageRect.Height/3;
LeftOf: PageRect.Left + PageRect.Width/3;

10.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.

note Note.In practice, if the wording of a field name differs from image to image, you must be sure to specify all the possible variants of the name, or at least the majority of them. You may want to ask for more test images or contact your customer to learn about the possible variants of the name on the documents of this type.


Sample 3. Step 7: Detecting the name of the Invoice Date field with a kwInvoiceDate element

Show/Hide Hidden Text

Analysis of the test images reveals that the name of the field Invoice Date is a short and very common word “Date.” This means that we have to restrict the search area as much as possible. You will have noticed that the name of the Date field (whenever it occurs on an image) is located very close to the name of the field Invoice Number.

To create the kwInvoiceDate element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceDate.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “Date”.

4.Leave 30 as the value for the Max error percentage (for the sought word of 4 letters it means no more than 1 error).

5.Click the Relations tab.

6.On the Relations tab, specify that the keywords of the name can only occur below the name of the field Invoice Number, but no more than 150 dots below its bottom boundary.

oBelow the element kwInvoiceNumber, Offset = 0, and

oAbove the bottom of the element kwInvoiceNumber, Offset = -150, Reference boundary = Bottom.
Show me...

note Note.To select the best values for offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the objects detected during pre-recognition.

7.Click the Advanced tab.

8.Since the Invoice Date field is in the left half of the image, set the following additional search constraint in the Advanced pre-search relations field:Look for the object in the left half of the image. In the FlexiLayout language:
LeftOf: PageRect.Left + PageRect.Width/2;

9.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.


Sample 3. Step 8: Describing the Invoice Number field with an InvoiceNumber element

Show/Hide Hidden Text

The field Invoice Number is to the right of the name and is located on the same horizontal level. Analysis of the test images reveals that on some of the images the number has been poorly recognized. So we will not restrict the alphabet, but we will restrict the search area and restrict the length of the string to 3-20 characters.

To create the InvoiceNumber element:

1.In the InvoiceHeader element, create an element of type Character String and name it.

note Note.The element and the block which corresponds to the field InvoiceNumber need not have identical names, but this is handy when working with the FlexiLayout.

2.Click the Character String tab.

3.Set the Percentage of non-alphabet characters to 100%, which means that there is no restriction for characters.

4.In the Character count field, specify this fuzzy interval: {-1, 3, 20, INF}, which restricts the number of characters in the string. We assume that the possible values range from 3 to 20. Any hypotheses outside this range will be penalized.

5.Click the Relations tab.

6.Since InvoiceNumber can only occur to the right of the keywords of the name kwInvoiceNumber, but no farther than 550 dots from the right boundary of the name kwInvoiceNumber, set the following search constraints:

oRight of the element kwInvoiceNumber, Offset = 0

oLeft of the element kwInvoiceNumber, Offset = -550, Reference boundary = Right

note Note.Offset values are selected by method of trial and error.

7.Since InvoiceNumber is always located on the same level with the keyword of the name kwInvoiceNumber, set the following search constraints:

oAbove the element kwInvoiceNumber, Offset = -10, Reference boundary = Bottom

oBelow the element kwInvoiceNumber, Offset = -10, Reference boundary = Top
Show me...

8.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

9.To describe the location of the InvoiceNumber block, click its Properties and select the Source element option, then click [image] and select the InvoiceNumber element as the source element.


Sample 3. Step 9: Describing the Invoice Date field with grDate, InvoiceDate, and InvoiceDateAsString elements

Show/Hide Hidden Text

Analysis of the test images reveals that the Invoice Date field is located to the right of its name and on the same horizontal level as the name. We will use a Date element to look for the date. In case there are poor quality images where dates may not be recognized properly so that the search for the Date gives no results, create an additional element of type Character String. To specify the properties common to all these elements, we need to create a compound grDate element.

To create the grDate element:

1.In the InvoiceHeader element, create an element of type Group and name it grDate.

2.Click the Relations tab.

3.Since all the elements used to detect the Invoice Date field may only occur to the right of the keywords of the kwInvoiceDate name and on the same level as the name, set the following search constraints:

oRight of the element kwInvoiceDate, Offset = 0.

oAbove the element kwInvoiceDate, Offset = -10, Element boundary = Bottom.

oBelow the element kwInvoiceDate, Offset = -10, Element boundary = Top.
Show me...

To create the InvoiceDate element:

1.In the InvoiceHeader.grDate element, create an element of type Date and name it InvoiceDate.

2.Click the Date tab.

3.On the Date tab, specify all the possible date formats which may occur on the images. We assume that the date format is Day, month, year, the language is English, and there are no other constraints on the date.
Show me...

4.Click the Advanced tab.

5.Since the Invoice Date field is optional on this document but whenever it occurs, it occurs with its name and is always located next to the name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image only if the kwInvoiceDate element has been detected; Look for the image object closest to the kwInvoiceDate element. In the FlexiLayout language:
If InvoiceHeader.kwInvoiceDate.IsNull Then DontFind;
Nearest: InvoiceHeader.kwInvoiceDate;

note Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Element and specify kwInvoiceDate as the Reference element.

6.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where there is an Invoice Date field.

Test and see that on some of the images the element has not been detected. Analysis of the pre-recognition results reveals that this has happened because of the noise in the area of the field. None of the standard properties of the Date element can be used to remedy the situation, so we have to create an alternative element with less stringent search constraints.

note Note.For more information on finding dates on poor quality images, see the Tips and Tricks section of the Help file.

To create the InvoiceDateAsString element:

1.In the InvoiceHeader.grDate element, create an element of type Character String and name it InvoiceDateAsString.

2.Click the Character String tab.

3.In the Character count field, specify this fuzzy interval: {-1, 8, 14, INF}, which is an estimate of the string length. We assume that the string may be 8 to 14 characters long. Any hypothesis outside this range will be penalized.

4.Set the Max space length to 20, which means that the space may be 20 dots long.

5.For the other properties, leave the default values.

6.Click the Advanced tab.

7.Since we want the program to look for this element only if the InvocieDate element has not been detected, set the following additional search constraint in the Advanced pre-search relations field: Look for the object only if the InvocieDate element has not been detected. In the FlexiLayout language:
If Not InvoiceDate.IsNull Then DontFind;

8.Since the Invoice Date field is optional on this document but whenever it occurs, it is always present with its name and located next to the name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image only if the element kwInvoiceDate has been detected; Look for the image object closest to the kwInvoiceDate element. In the FlexiLayout language:
If InvoiceHeader.kwInvoiceDate.IsNull Then DontFind;
Nearest: InvoiceHeader.kwInvoiceDate;

note Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Element and specify kwInvoiceDate as the Reference element.

9.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where there is an Invoice Date field and generates a null hypothesis for the InvoiceDate element.

10.To describe the location of the InvoiceDate block, select the Source element option, then click [image] and select the InvoiceHeader.grDate element as the source element.

note Note.The region of a Group element is calculated by uniting the regions of all the detected subelements.


Sample 3. Step 10: Creating a grAddress Group element

Show/Hide Hidden Text

We have decided to look for the Delivery Address field by using the following two elements: a White Gap element on the right, and an element of the Paragraph type. To specify the properties common to all these elements, we will create a Group element.

To create the grAddress element:

1.In the InvoiceHeader element, create a Group element and name it grAddress.

2.Click the Relations tab.

3.Since all the elements used to search for the Delivery Address field can only occur below the keywords of the name kwDeliveryAddress and above the keywords of the name kwInvoiceNumber, set the following search constraints:

oBelow the element kwDeliveryAddress, Offset = 0.

oAbove the element kwInvoiceNumber, Offset = 0.
Show me...

4.Click the Advanced tab.

5.Since the Delivery Address field and the white gap bordering it are located in the left two fifths of the page, set the following additional search constraint in the Advanced pre-search relations field:Look for the objects in the left two fifths of the page.In the FlexiLayout language:
LeftOf: PageRect.Left + PageRect.Width*2/5;


Sample 3. Step 11: Detecting the right border of the Delivery Address field with a wgAddressRight element

Show/Hide Hidden Text

To specify the right boundary of the search area of the DeliveryAddress element, we need to describe the corresponding vertical white gap.

To create the wgAddressRight element:

1.In the InvoiceHeader.grAddress element, create an element of type White Gap nd name it wgAddressRight.

2.Click the White Gap tab.

3.In the Orientation group, choose Vertical. Set Min width to 100.

note Note.Prior to setting values for height or width of white gaps, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Values for the noise threshold in the white gap area are selected by trial and error.

4.Set Lower threshold limit: and Threshold coefficient (%): to 10.

note Note.The values of Lower threshold limit, Upper threshold limit, and Threshold coefficient (%) are selected by method of trial and error.
For more information, see White Gap.

5.Leave the default values for the other parameters of the element.
Show me...

6.Click the Relations tab.

7.Since the sought white gap can only be located to the right of the keywords of the name kwDeliveryAddress, set the following search constraint:

·Right of the element kwDeliveryAddress, Offset = 0

8.Click the Advanced tab.

9.Since the Delivery Address field is optional on the images but whenever it occurs it has a name, set the following additional search constraint in the Advanced pre-search relations field: Look for the object only if the kwDeliveryAddress element has been detected.In the FlexiLayout language:
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind;

10.Since the sought white gap is adjacent to the Invoice Number field, set the following additional search constraint in the Advanced pre-search relations field: Look for the object on the image which is nearest to the kwInvoiceNumber element.In the FlexiLayout language:
Nearest: InvoiceHeader.kwInvoiceNumber;

note Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Element and specify kwInvoiceNumber as the Reference element.

11.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where the Delivery Address field occurs.


Sample 3. Step 12: Describing the Delivery Address field with a DeliveryAddress element

To create the DeliveryAddress element:

1.In the InvoiceHeader.grAddress element, create an element of type Paragraph and name it DeliveryAddress.

2.Click the Relations tab.

3.Since the DeliveryAddress field can only occur above the name kwInvoiceNumber, only to the left of the wgAddressRight white gap, and only to the right of the beginning of the name kwDeliveryAddress (with small offset), set the following search constraints:

oAbove the element kwInvoiceNumber, Offset = 0.

oLeft of the element kwInvoiceNumber, Offset = 0.

oRight of the element kwDeliveryAddress, Offset = -50, Reference boundary = Left

note Note.Offset values are selected by method of trial and error.

4.Since in the Group element InvoiceHeader.grAddress we have already specified that the DeliveryAddress field can only be located below the keywords of the name kwDeliveryAddress, we need not duplicate this constraint here.

5.Click the Advanced tab.

6.Since the Delivery Address field is optional on the images but whenever it occurs it has a name, set the following additional search constraint in the Advanced pre-search relations field:Look for the object only if the kwDeliveryAddress element has been detected.In the FlexiLayout language:
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind;

7.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

8.To describe the location of the DeliveryAddress block, select the Source element option, then click [image] and select the DeliveryAddress element as the source element.


Sample 3. Step 13: Further analysis of the images

So far we have described the Invoice Number, Invoice Date, and DeliveryAddress fields.

Let us now decide in which order the other elements must be detected.

Analysis of the arrangement of the fields on the test images reveals that to detect the Country field, we can use the name of this field and an element of type Character String. But in order to detect the Total Quantity and Total Amount fields we will need to use not only the name, which is shared by the two fields, but also additional elements. The names of the corresponding columns of the table may be used for the purpose.

We also need to prepare the ground for the search of the Invoice Table field, which is to be detected by means of an element of type Table.

1.We describe the Header of the table. There are two ways to detect column names.

oThe first one is to specify one or several keywords in the Column Properties dialog box (the Properties dialog box of the Table element → Columns tab). This method is quick but not very flexible.

oThe second way is to use a previously detected element as a reference element to find the location of the column name. This method allows you to take full advantage of the additional settings available for elements. Analysis of the pre-recognition results reveals that the recognition quality is good enough, so we can use the first method (the only snag would be the very short name of the Quantity column name — 20% of errors in a three-letter keyword “Qty” effectively means that no errors allowed). We will use the first method to detect the first two columns, Reference and Designation, and we can use the previously described elements to detect the names of the rest of the columns: Quantity, Unit Price, and Total (as far as we need to create these elements anyway to detect the TotalQuantity and TotalAmount fields).

2.We describe the Footer of the table. It can also be described either by using keywords or by using an auxiliary element. Analysis of the keywords in the footer reveals that on some of the images the keywords also occur in the first row of the table, so we have to use an auxiliary element because of means to restrict the search area.

3.We describe the table search area. After we have described the header and the footer, we need to describe the right boundary of the table (we do not need to describe the left boundary, as there are no other data in this part of the image). Since we cannot use the context to separate the figures in the Total column from the figures in the Sales column, we will need a different approach. We can use the name of the last column, Sales, to restrict the table search area on the right.

note Note.Elements and the order in which they must be detected are selected by trial and error and can be changed during FlexiLayout adjustment.

Prior to describing the remaining fields, we will describe the auxiliary elements.

1.Analysis of interdependencies among the elements reveals that first we have to detect the names of the Quantity, Unit Price, Total, and Sales columns.

2.The header of the table begins with a horizontal separator between the column names and the Invoice Number, Invoice Date, and Delivery Address fields. This separator will help us to restrict the search areas of the column names.

oFor this purpose, create an element of type Separator and name it hsTableHeaderTop (for detailed instructions, see Step 14).
We will look for the column names in their natural order.

oCreate an element of type Group and name it TableHeader (for detailed instructions, see Step 15). This element must include:

§Element kwQuantity of type Static Text, which will correspond to the name of the Quantity column of the table InvoiceTable (for detailed instructions, see Step 16);

§Element kwUnitPrice of type Static Text, which will correspond to the name of the Unit Price column of the table InvoiceTable (for detailed instructions, see Step 17);

§Element kwTotal of type Static Text, which will correspond to the name of the Total column of the table InvoiceTable (for detailed instructions, see Step 18);

§Element kwSales of type Static Text, which will correspond to the name of the Sales column of the table InvoiceTable (for detailed instructions, see Step 19).

3.Let’s continue to describe the lower part of the document. The fields we are interested in are the name of the Total Quantity and the Total Amount fields (which serves as the bottom boundary of the table) and any other captions that can help locate the bottom boundary of the table. We will also describe the name element and the source element for the Country field in this logic group.

4.Create a Group element and name it Footer. This element must include:

oElement kwFooter of type Static Text, which will correspond to the footer of the Invoice Table (for detailed instructions, see Step 21);

oElement kwTotal of type Static Text, which will correspond to the name of the Total Quantity and the Total Amount fields (for detailed instructions, see Step 22);

oElement kwOrigin of type Static Text, which will correspond to the name of the Country field (for detailed instructions, see Step 23);

oElement Country of type Character String, which will correspond to the Country field (for detailed instructions, see Step 24).

Now that all the preparations have been made and the order of creating additional elements has bee described, we can start looking for the remaining fields. Relying on the previously detected names of columns and Footer, we will describe the remaining Total Quantity, Total Amount, and Invoice Table fields.

1.For this purpose, create two elements of type Character String and name them TotalQuantity and TotalAmount. These elements will correspond to the Total Quantity and the Total Amount fields respectively (for detailed instructions, see Step 25).

2.Create an element of type Table and name it InvoiceTable. This element describes the Invoice Table field (for detailed instructions, see Step 26).


Sample 3. Step 14: Detecting the auxiliary horizontal separator with an hsTableHeaderTop element

Show/Hide Hidden Text

To create the hsTableHeaderTop element:

1.Create an element of type Separator and name it hsTableHeaderTop.

2.Click the Separator tab.

3.In the Orientation group, click the Horizontal option.

4.Set the Min length / Max length to 1500 / 2500.

5.Click the Fits entirely within search area option.

6.Set the Space, Max length to 20 and the Orthogonal shift to 20.

note Note.Prior to setting the values for the length of the separator, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Separator error thresholds are selected by method of trial and error.

7.Leave the default values for the other parameters of the element.
Show me...

8.Click the Relations tab.

9.Since the separator can only occur below the keywords of the names kwInvoiceDate and kwInvoiceNumber, set the following search constraint:

oBelow the element InvoiceHeader.kwInvoiceDate, Offset = 0;

oBelow the element InvoiceHeader.kwInvoiceNumber, Offset = 0;

10.Click the Advanced tab.

11.Since the sought separator is located at the top of the described search area, set the following additional search constraint in the Advanced pre-search relations field:Look for an object on the image nearest to its top boundary.In the FlexiLayout language:
NearestY: PageRect.Top;

note Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Page top edge.

12.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.


Sample 3. Step 15: Analyzing the search constraints for column names with a TableHeader element of type Group

Analysis of the test images reveals that the column names are located directly below the previously detected horizontal separator. To specify the search constraints common to all the column names, we need to create a Group element — TableHeader.

To create the TableHeader element:

1.Create a Group element and name it TableHeader.

2.Click the Advanced tab.

3.You will have noticed that if the hsTableHeaderTop separator has been detected on an image, the column names are located below the separator, but no lower than 100 dots from it. Otherwise, they are located in the top three fifths of the page. So set the following additional search constraint in the Advanced pre-search relations field: If the hsTableHeaderTop element has been detected, look for the objects of the image below the separator but no lower than 100 dots from it. Otherwise, look for the objects of the image in the top three fifths of the page. In the FlexiLayout language:
If Not (hsTableHeaderTop.IsNull) Then
{
Below: hsTableHeaderTop, 0 * dot;
Above: hsTableHeaderTop.Bottom, -100 * dot;
} Else
{
Above: PageRect.Top + PageRect.Height*3/5;
}


Sample 3. Step 16: Detecting the name of the Quantity column with a kwQuantity element

Analysis of the pre-recognition results reveals that even though the name is a very short keyword “Qty,” we can detect the name by using an element of type Static Text. Set the maximum error percentage to 35; this allows one wrong character in a three-letter word.

To create the kwQuantity element:

1.In the TableHeader element, create an element of type Static Text nd name it kwQuantity.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “Qty”.

4.Set the Max error percentage to 35.

5.Click the Advanced tab.

6.Since the name of the Quantity column is located to the right of the leftmost third of the image, set the following additional search constraint in the Advanced pre-search relations field:Look for the object to the right of the leftmost third of the page.In the FlexiLayout language:
RightOf: PageRect.Left + PageRect.Width/3;

7.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.


Sample 3. Step 17: Detecting the name of the Unit Price column with a kwUnitPrice element

To describe the element which will be used to detect the keywords in the Unit Price column name, we will take advantage of the fact that the Unit Price column is always located to the right of the Quantity column.

To create the kwUnitPrice element:

1.In the TableHeader element, create an element of type Static Text and name it kwUnitPrice.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “UnitPrice”.

4.Click the Advanced tab.

5.Since the name of the Unit Price column is located to the right of the name of the Quantity column, set the following additional search constraint in the Advanced pre-search relations field:If the kwQuantity element has been detected, look for the kwUnitPrice element to the right of it.In the FlexiLayout language:
If Not (TableHeader.kwQuantity.IsNull) Then
RightOf: TableHeader.kwQuantity, 0 * dot;

6.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.


Sample 3. Step 18: Detecting the name of the Total column with a kwTotal element

To describe the element which will be used to look for the keywords in the name of the Total column, we will take advantage of the fact that the Total column is always located to the right of the Unit Price column.

To create the kwTotal element:

1.In the TableHeader element, create an element of type Static Text and name it kwTotal.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “TotalChf”.

4.Click the Advanced tab.

5.Since the name of the Total column is located to the right of the name of the Unit Price column (if the latter occurs on the document), set the following additional search constraint in the Advanced pre-search relations field:If the kwUnitPrice element has been detected, look for the kwTotal element to the right of it.In the FlexiLayout language:
If Not (TableHeader.kwUnitPrice.IsNull) Then
RightOf: TableHeader.kwUnitPrice, 0 * dot;

6.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.


Sample 3. Step 19: Creating a InvertedHeader element

Though we do not need the data from the Sales column, we have to detect its name in order to restrict the search area for the right boundary of the table.

To create the kwSales element:

1.In the TableHeader element, create an element of type Static Text and name it kwSales.

2.Click the Static Text tab.

3.In the Search text field, specify the value for the sought text: “Sales”.

4.Click the Advanced tab.

5.Since the name of the Sales column is located to the right of the name of the Total column (if the latter occurs on the document), set the following additional search constraint in the Advanced pre-search relations field:If the kwTotal element has been detected, look for the kwSales element to the right of it.In the FlexiLayout language:
If Not (TableHeader.kwTotal.IsNull) Then
RightOf: TableHeader.kwTotal, 0 * dot;

6.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images.


Sample 3. Step 20: Describing the Footer group with a Footer element of type Group

Analysis of the test images reveals that the footer of the table, the Country, Total Quantity, and Total Amount fields and their names are located in the lower part of the image, under the table header. To keep the first row of the table, where the keywords for the footer may also occur, out of the search area, we will lower the top boundary of the search area. To specify some common search constraints, we need to create a Group element.

To create the Footer element:

1.Create a Group element and name it Footer.

2.Click the Relations tab.

3.Since the footer of the Invoice Table and the Country, Total Quantity, and Total Amount fields can only be located below the separator hsTableHeaderTop with some offset, set the following search constraint:

oBelow the element hsTableHeaderTop, Offset = 300.


Sample 3. Step 21: Describing the footer of the table with a kwFooter element

Analysis of the test images reveals that the footer of the table can begin with the keywords ”Carried Over,” “Total Chf,” ”Goods total excl. tax,” ”Discount,” and ”SPECIAL DISCOUNT.” Let us list all these variants in a search text for the element of type Static Text.

To create the kwFooter element:

1.In the Footer element, create an element of type Static Text and name it kwFooter.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “Discount|TotalCHF|SPECIALDISCOUNT|Carriedover|Goodstotalexcl.tax”.

4.Click the Advanced tab.

5.The sought keywords are located in the left half of the image. If the program detects several of the keywords, we will only be interested in the topmost keyword. So set the following additional search constraint in the Advanced pre-search relations field: Look for the object in the left half of the page; Look for the object nearest to the top edge of the page. In the FlexiLayout language:
LeftOf: PageRect.Left + PageRect.Width/2;
NearestY: PageRect.Top;

6.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

note Note.If the wording of a field name may differ from image to image, be sure to list all the possible variants of the name, or at least the majority of them. You may want to ask for more test images or contact your customer to learn about the possible variants of field names on the documents of this type.


Sample 3. Step 22: Describing the name of the Total fields with a kwTotal element

You will have noticed that the name of the Total Quantity and Total Amount fields may be represented by the keywords ”TotalChf” or ”Carried Over” and is located in the lower left part of the page.

To create the kwTotal element:

1.In the Footer element, create an element of type Static Text and name it kwTotal.

2.Click the Static Text tab.

3.In the Search text field, specify the values for the sought text: “TotalChf|CarriedOver”.

4.Set Max error percentage to 30.

5.Click the Advanced tab.

6.Since the name is located in the left half of the page and the sought string is nearest to the top edge of the page, set the following additional search constraint in the Advanced pre-search relations field:Look for the object in the left half of the page; Look for the object nearest to the top edge of the page.In the FlexiLayout language:
LeftOf: PageRect.Left + PageRect.Width/2;
NearestY: PageRect.Top;

7.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.


Sample 3. Step 23: Detecting the name of the Country field with a kwOrigin element

We will use an element of type Static Text and the keyword “OriginOfGoods:” to detect the name of the Country field.

To create the kwOrigin element:

1.In the Footer element, create an element of type Static Text and name it kwOrigin.

2.Click the Static Text tab.

3.In the Search text field, enter the text to find: “OriginOfGoods:”.

4.Click the Relations tab.

5.Since the Country field can only be located below the footer of the table, set the following search constraint:

oBelow the element Footer.kwFooter, Offset = 0.

6.Click the Advanced tab.

7.Since the Country field is located in the left half of the image, set the following additional search constraint in the Advanced pre-search relations: Look for the object in the left half of the page. In the FlexiLayout language
LeftOf: PageRect.Left + PageRect.Width/2;

8.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.


Sample 3. Step 24: Describing the Country field with a Country element

Show/Hide Hidden Text

We will use an element of type Character String to detect the Country field. The element must be located on the same horizontal level with the name of this field and will be used only if the name has been detected.

To create the Country element:

1.In the Footer element, create an element of type Character String and name it Country.

2.Click the Character String tab.

3.Select all Latin characters as the alphabet and set the Percentage of non-alphabet characters to 20.

4.In the Character count field, specify this fuzzy interval: [-1, 2, 25, 2147483647]. This is an estimation of the length of the character string. We assume that the possible values may range from 2 to 25. Any hypotheses outside this range will be penalized.
Show me...

5.Leave the default values for the other parameters of the element.

6.Click the Relations tab.

7.Since the Country field can only be located to the right of the keywords of the name kwOrigin but no farther than 500 dots from its right boundary, set the following search constraints:

oRight of the element kwOrigin, Offset = 10.

oLeft of the element kwOrigin, Offset = -500, Reference boundary = Right.

8.Since the Country element is always located on the same level with the keywords of the name kwOrigin, set the following search constraints:

oAbove the element kwOrigin, Offset = -10, Reference boundary = Bottom.

oBelow the element kwOrigin, Offset = -10, Reference boundary = Top.

note Note.Prior to setting the values for the offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Offset values are selected by trial and error.

9.Click the Advanced tab.

10.The Country field is optional on this document but whenever it occurs, it is always located next to its name. So set the following additional search constraint constraint in the Advanced pre-search relations field:Look for the object on the image only if the kwOrigin element has been detected.In the FlexiLayout language:
If Footer.kwOrigin.IsNull Then DontFind;

11.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

12.To describe the location of the Country block, select the Source element option, then click [image] and select the Country element as the source element.


Sample 3. Step 25: Detecting the TotalQuantity and TotalAmount fields with a TotalQuantity and TotalAmount elements

Analysis of the test images reveals that the Total Quantity and Total Amount fields only occur together with the name Footer.kwTotal and are located on the same level. We will use elements of type Character String to detect the Total Quantity and the Total Amount fields. To specify the search constraints common to these elements, we need to create a Group element — grTotal.

To create the Group element grTotal:

1.In the Footer element, create a Group element and name it grTotal.

2.Select the Optional element because we decided to stop the search of the subelements in case of name absence.

note Note.For some details see Help article Tips and tricks\The "Optional" property of a Group element.

3.Click the Advanced tab.

4.Since the Total Quantity and the Total Amount fields only occur on the image together with the name Footer.kwTotal, set the following additional search constraint in the Advanced pre-search relations field:If the Footer.kwTotal element has not been detected, do not look for the object on the image. In the FlexiLayout language:
If Footer.kwTotal.IsNull Then DontFind;

The Total Quantity field is located at the intersection of the Total row and the Quantity column. The first constraint was already specified at the Group element level. To specify the second constraint, we will use the previously detected column name as a reference element.

To create the TotalQuantity element:

1.In the grTotal element, create an element of type Character String and name it TotalQuantity.

2.Click the Character String tab.

3.In the Character count field, specify this fuzzy interval: {-1, 1, 10, INF}. This is an estimation of the length of the character string. We assume that the possible values may range from 1 to 10. Any hypotheses outside this range will be penalized.

4.Leave the default values for the other parameters of the element.

5.Click the Relations tab.

6.Since the Total Quantity field is always located on the same level with the keywords of the name Footer.kwTotal or slightly lower, set the following search constraints:

oAbove the element Footer.kwTotal, Offset = -200, Reference boundary = Bottom

oBelow the element Footer.kwTotal, Offset = -20, Reference boundary = Top

note Note.Prior to setting the values for the offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Offset values are selected by trial and error.

7.Click the Advanced tab.

8.Since the Total Quantity field is optional on the images but whenever it occurs it occurs together with the Quantity column and below its name, set the following additional search constraint in the Advanced pre-search relations field:Look for the object on the image only if the TableHeader.kwQuantity element has been detected; Look no farther than 50 dots to the left or to the right of the respective boundaries of the column name. In the FlexiLayout language:
If Not (TableHeader.kwQuantity.IsNull) Then
{
LeftOf: TableHeader.kwQuantity.Right, -50 * dot;
RightOf: TableHeader.kwQuantity.Left, -50 * dot;
}
Else DontFind;

9.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

10.To describe the location of the TotalQuantity block, select the Source element option, then click "…" and select the TotalQuantity element as the source element.

The Total Amount field is located at the intersection of the Total row (the footer of the table) and the Total column. The first constraint was already specified at the Group element level. To specify the second constraint, we will use the previously detected column names as reference elements.

To create the TotalAmount element:

1.In the grTotal element, crate an element of type Character String and name it TotalAmount.

2.Click the Character String tab.

3.In the Character count field, specify this fuzzy interval: [-1, 1, 20, 2147483647]. This is an estimation of the length of the character string. We assume that the possible values may range from 1 to 20. Any hypotheses outside this range will be penalized.

4.Leave the default values for the other parameters of the element.

5.Click the Relations tab.

6.Since the Total Amount field is always located on the same level with the keywords of the name Footer.kwTotal, set the following search constraints:

oAbove the element Footer.kwTotal, Offset = -20, Reference boundary = Bottom.

oBelow the element Footer.kwTotal, Offset = -20, Reference boundary = Top.

7.Click the Advanced tab.

8.Since the Total Amount field can only be located immediately below (may be with a small shift) the name of the Total column and only between the Unit Price and Sales columns, set the following additional search constraint in the Advanced pre-search relations field:If the TableHeader.kwTotal element has been detected, look for the object no farther than 70 dots to the right of the right boundary of the TableHeader.kwTotal element and no farther than 50 dots to the left from the left boundary of the TableHeader.kwTotal element; or, if the TableHeader.kwUnitPrice and TableHeader.kwSales elements are detected, look for the object no farther than 40 dots to the right of the left boundary of the TableHeader.kwSales element and to the right of the right boundary of the TableHeader.kwUnitPrice element; otherwise do not look for the object.In the FlexiLayout language:
If Not (TableHeader.kwTotal.IsNull) Then
{
LeftOf: TableHeader.kwTotal.Right, -70 * dot;
RightOf: TableHeader.kwTotal.Left, -50 * dot;
}
Else
If Not (TableHeader.kwUnitPrice.IsNull) and Not (TableHeader.kwSales.IsNull) Then
{
LeftOf: TableHeader.kwSales.Left, -40 * dot;
RightOf: TableHeader.kwUnitPrice, 0 * dot;
}
Else DontFind;

note Note.Prior to setting the values for the offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Offset values are selected by trial and error.

9.Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.

10.To describe the location of the TotalAmount block, select the Source element option, then click [image] and select the TotalAmount element as the source element.


Sample 3. Step 26: Detecting the Table element with an InvoiceTable element

Show/Hide Hidden Text

Now that all the preparations are completed, we can search for the Invoice Table field. First, we describe an element of type Table:

1.We describe the Header of the table. We decided (for detailed instructions, see Step 13) to describe the names of the Reference and the Designation columns by keywords (Table element → Properties dialog box → Columns tab → dialog box of column Properties), while the names of the Quantity, Unit Price, and Total columns will be detected with the help of the previously described auxiliary elements.

2.We describe the Footer of the table. To describe the footer, we decided to use the previously described element which uses keywords and phrases to detect the beginning of the footer (for detailed instructions, see Step 13).

3.We describe the search area of the table. We will use the Sales column name to restrict the search area on the right.

To create the InvoiceTable element:

1.Create an element of type Table and name it InvoiceTable.

2.Click the Columns tab.

3.Click Select and specify the previously described InvoiceTable block as the block to be detected by the InvoiceTable element (for detailed instructions, see Step 2).

4.Select the Reference column and click Properties.... We will use the keyword Reference to look for this column name, so leave the default values.

5.Select the Designation column and click Properties.... We will use the keyword Designation to look for this column name, so leave the default values.

6.Select the Quantity column and click Properties.... We will use the previously detected element TableHeader.kwQuantity to find this column name. Select Use found element as column name option and click [image] to select the TableHeader.kwQuantity element.
Show me...

7.Select the UnitPrice column and click Properties.... We will use the previously detected element TableHeader.kwUnitPrice to find this column name. Select Use found element as column name option and click [image] to select the TableHeader.kwUnitPrice element.
Show me...

8.Select the Total column and click Properties.... We will use the previously detected element TableHeader.kwTotal to find this column name. Select Use found element as column name option and click [image] to select the TableHeader.kwTotal element.

9.Click the Order tab.

10.There can be other columns between the sought ones (for instance, Unit), but the sought columns are always located in the following order: Reference, Designation, Quantity, Unit Price, Total. Select the Rules for column order option, then click Add... and specify the following column order: Reference << Designation << Quantity << Unit Price << Total.
Show me...

Show me...

11.Click the Header tab. We need the header but we are not going to add any search constraints, so leave the default values
Show me...

12.Click the Footer tab. We will use the previously detected element Footer.kwFooter to detect the footer. Select Use found element as footer option and click [image] to select the Footer.kwFooter element.
Show me...

13.Click the Rows tab.

14.Since some columns in the table may have entries consisting of multiple lines, we have to specify master column to detect the rows. Select the Use master columns to detect rows option. Specify the Total column as the primary master column, as this column always contains data and a single row of the table corresponds to each entry. In case this column is not detected on a document, specify the Quantity and Unit Price columns as secondary and tertiary master columns respectively. Click [image] and specify this order of master columns.
Show me...

15.Click the Relations tab. Since the sought columns are located to the left of the beginning of the name of the Sales column (with a small gap), set the following search constraint:

oLeft of the element TableHeader.kwSales,

oOffset = -40, Reference boundary = Left.

note Note.When selecting values for offsets, you may want to analyze the geometrical properties (i.e. size and boundaries) of the reference and the sought objects detected during pre-recognition. Otherwise these values are selected by method of trial and error.

16.Match the FlexiLayout with the test images. You see that the program has successfully detected the table element on all the images where it occurs. But on some of the images, the Quantity column also includes unwanted artifacts from the previous column. To separate the useful data from noise, let’s specify the type of content which may occur in the column.

17.Open the Properties dialog box of the InvoiceTable element. Click the Columns tab, open the Properties dialog box for the Quantity column and select the Check content type option. Select Number in the Type of column content drop-down list.
Show me...

18.Try matching the FlexiLayout with the test images and make sure that the Quantity column does not contain any unwanted data.

19.To describe the location of the InvoiceTable block, select the Source element option, then click [image] and specify the InvoiceTable element as the source element.


Sample 3. Step 27: Exporting the FlexiLayout into ABBYY FlexiCapture

The resulting FlexiLayout can be saved as an *.afl file and exported into ABBYY FlexiCapture.

For more about exporting FlexiLayouts see Sample 1, Step 21 and Step 22.


Multi-Page Invoice

Navigation: Tutorial >

Return to chapter overview

Sample 4. Multi-Page Invoice

warning Important!A multi-page document is used in this sample.

The sample document described in this section is a typical multi-page invoice. Unlike the sample documents described in the earlier sections, it has more than one page and contains a table that stretches over several pages.

note Note.ABBYY FlexiLayout Studio allows you to create FlexiLayouts for multi-page documents. Multi-page documents are treated as whole units and search for elements is not limited to individual pages. For details, see Multi-Page FlexiLayout.

The Invoice sample document will be used to illustrate some non-standard approaches to locating elements. You will learn how to detect image objects that correspond to the beginning and the end of a multi-page document and how to detect multi-page elements (in this case, a multi-page table). For details, see Header and Footer.

A FlexiLayout for the Invoice sample document should reliably detect the following fields on all the test images:

·Invoice Number

·Invoice Date

·Delivery Address

·Total Amount

·Invoice Table (Reference, Designation, Unit, Quantity, Unit Price, and Total columns)

·Company


Sample 4. Step 1: Preparatory settings

Show/Hide Hidden Text

1.Run ABBYY FlexiLayout Studio.

2.Create a new project (File → New Project).

3.Type this name for your project: Invoices and select a project type: ABBYY FlexiLayout Project Files (*.fsp).

4.Add the images to the batch (see. Sample 1. Step 2 for detailed instructions).

note Note.The test images for Sample 4 can be found in %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice\InvoicesBatch\<page number>\Images\bwPage.frdat.

5.For each document in the batch, you can create a reference assembly which shows how the pages should be separated into documents. A reference assembly can be created either manually or automatically, when adding the images to the batch. A reference assembly allows you to compare the actually assembled documents with the correct "ideals". For details, see Reference document assembly.
To correctly assemble pages into documents, you first have to analyze them to see which pages go into to which document and in what order. In the Batch window, the pages that belong to the same batch must strictly follow one another (page 1, page 2, page 3, etc.).

note Note.If the pages have been added to a batch in a random order and cannot be assembled into documents, they should be renumbered. To renumber the pages, use your mouse to drag and drop each page into the desired location in the Batch window. The program will automatically renumber the rearranged pages.

oIn the Batch window, select the pages relating to the same document.

oRight-click the selection and select Assemble to Reference Documents....

oIn the Assemble to Reference Documents dialog box, select One document. The program will group all the selected pages into one document.

oSelect First page of document matches Header. This option means that the Header element must be matched with the first page of the document.

oSelect Last page of document matches Footer. This option means that the Footer element must be matched with the last page of the document.

oClick OK. The reference layout will be displayed in Reference layout mode: the beginning and end of the document are marked with green markers.

note Note.If the pages have been assembled into a document incorrectly, you can cancel the operation by selecting Disassemble Reference Documents.

6.Specify the properties of your FlexiLayout:

oName: Invoice.

oText type: select Typographic and Matrix printer text types.

oText languages: select English, as the sample documents are in English.

oMode: select Fast recognition mode.

oMinimum number of pages: 1, as the sample documents may include a minimum of one pages.

oMaximum number of pages: 3, as the sample documents may include a maximum of 3 pages.

Show me...

note Note.For detailed instructions on selecting pre-recognition parameters, see Sample 1. Step 3.


Sample 4. Step 2: Viewing the images and pre-recognition results

Before you start creating your FlexiLayout, you must consider which of the image objects can be used to identify the beginning and the end of the document and to find the required data fields. You can rely only on those graphical and/or text objects which are consistently detected on the images during pre-recognition.

note Note.Special Header and Footer elements can be used to detect the beginning and the end of a document. The may consist of one or more elements that unambiguously identify the document's beginning and end respectively.

To launch the pre-recognition process:

1.Select all the images in the batch.

2.Select the Prerecognize command (Batch menu or the shortcut menu of the image).

note Note.For more information about the pre-recognition process, see. Sample 1. Step 4.

Once you examine the pre-recognition results, you will see that all the text objects corresponding to the field names, column names and horizontal separators are detected reliably and can be used as starting points to look for other objects on the images.

note Note.For more information about viewing images and pre-recognition results, see Sample 1. Step 5 and Sample 1. Step 6.

Now you can create and set up reference elements and search constraints for blocks corresponding to data fields. Activate the FlexiLayout window and go to the next step.


Sample 4. Step 3: Blocks

Our FlexiLayout should reliably detect the following blocks (provided they are present on a given image):

·Invoice Number

·Invoice Date

·Delivery Address

·Total Amount

·Invoice Table (Reference, Designation, Unit, Quantity, UnitPrice, and Total columns)

·Company

For convenience, create a list of all the required blocks:

1.For the Invoice Number field, create a block of type Text and name it InvoiceNumber.

2.For the Invoice Date field, create a block of type Text and name it InvoiceDate.

3.For the Delivery Address field, create a block of type Text and name it DeliveryAddress.

4.For the Total Amount field, create a block of type Text and name it TotalAmount.

5.For the Company field, create a block of type Text and name it Company.

6.For the Invoice Table field, create a block of type Table and name it InvoiceTable.
In the block's Properties dialog box, click the Columns tab and add the names of the columns in the following order: Reference, Designation, Unit, Quantity, UnitPrice, Total.

note Note.The provided column names and their order will correspond to this block in the FlexiCapture Document Definition.

note Note.For more about creating Table blocks, see Sample 3. Step 3.

You have specified the properties of your FlexiLayout and can now create the required elements.


Sample 4. Step 4: Analyzing the images to determine the order in which the elements should be detected

At this stage, you have to establish the following:

·Is there any pattern or method in the arrangement of the fields on the images?

·Which elements can be relied on to look for the data fields?

·In what order should we look for the elements? (This is important, because at each subsequent step we can only rely on the elements of the previous step.)

As we are dealing with a multi-page document, we must first establish which objects can be used to identify the first and last pages of the document. These objects can be described by means of special compound Header and Footer elements.

·The Header element must match only the first page of the document.

If a project also contains documents of other types, this elements will also be used as an identifier (i.e. a unique characteristic identifying this document type).

·The Footer element must match the last page of the document only. We recommend creating required subelements in this group to prevent the Footer element from being matched with any other document page.

Once you have analyzed the images, you will notice that:

1.On the first page, there is a group of fields that consists of InvoiceNumber, InvoiceDate, DeliveryAddress. The name of the InvoiceNumber field always goes at the beginning of each document, whereas the InvoiceDate and DeliveryAddress are not always present.

oThe InvoiceNumber and InvoiceDate fields can be located either to the right of their corresponding names or below them.

oFor DeliveryAddress, we should also look either to the right or below the corresponding name, having limited the search area. Additionally, we will need an element to restrict the search area from below.

oSince on some of the images these fields have no values, you can speed up the matching process by specifying the following condition: do not look for the value of a field if the field's name have not been detected.

2.We can use this group of fields as an identifier for our document. We will describe these fields as part of a compound Header element named InvoiceHeader.

3.The last page of the document has the words TOTAL AMOUNT MUST, Carried over, Total CHF, TOTAL below the table. However, these words may also occur elsewhere on the document (e.g. in the name or in the body of the table). To find these words, we will need to use additional reference elements (e.g. table column names). These reference elements will help us restrict the search area.

4.The elements describing the last page of the document will be part of a compound Footer element named InvoiceFooter.

5.For the Footer element to match only the last page of the document, it must contain a required element. As the words identifying the last page (see 3 above) occur on each last page of each document, we will make the element that describes them a required element.

6.The table (name it InvoiceTable) starts on the first page and ends on the last one. Additionally, the table is always preceded by the column names on the first page. To identify the end of the table (on the last page), we will use an auxiliary element (e.g. the required element from the InvoiceFooter group).

note Note.The multitude of all pages of a document is called a multi-page canvas. A multi-page canvas is formed by joining all the pages of a document, top-down, without any gaps, the left boundary of all the pages lying on the same axis, which goes through the point (0, 0). The order in which the pages are joined together is determined by the order of the pages in the batch, therefore, we can only specify the start of the table (its header on the first page) and end of the table (its footer on the last page). The program will search for the table in the entire document, i.e. on the entire multi-page canvas.

7.We will look for the name of the company in the Company field always on the first page and always in the first upper third of the page.

8.The name of the Total Amount field is always located on the last page, below the table. The value of the field is located either to the right of the name or below it.


Sample 4. Step 5: Document header and InvoiceHeader group

In the InvoiceHeader group, we will describe the elements that will help us identify the first page of the document.

1.To find the keywords contained in the names of the Invoice Number, Delivery Address, and Invoice Date fields, create the following elements of type Static Text:

okwInvoiceNumber element. See Step 5.1 for detailed instructions.

okwDeliveryAddress element. See Step 5.2 for detailed instructions.

okwInvoiceDate element. See Step 5.3 for detailed instructions.

2.We will search for the Invoice Number and Invoice Date fields to the right and below the corresponding name, using the following elements:

oInvoiceNumber of type Character String. See Step 5.4 for detailed instructions.

oInvoiceDate of the Date type (for good quality images) and InvoiceDateAsString of type Character String (if the search for the InvoiceDate element produced no results) merged into a grDate element of type Group. See Step 5.5 for detailed instructions.

note Note.For more information about searching for dates on poor quality images, see Tips and Tricks.

3.To find the Delivery Address field, which has multiple lines, use a DeliveryAddress of type Paragraph (see Step 5.6 for detailed instructions). The search area should be specified as strictly as possible.
We will use a wgAddressAbove element of the White Gap type to restrict the search area from below (see Step 5.6 for detailed instructions).
Next will group all these elements that serve to detect the Delivery Address field into one group named grAddress:


Sample 4. Step 5.1: Name of Invoice Number field, kwInvoiceNumber element

Show/Hide Hidden Text

Once you have examined the images, you will notice that:

·The name of the Invoice Number field is present on all the images and it is the name that can be used to differentiate them from other documents. For this reason, we will make the name of the Invoice Number field a required element, i.e. it will be used as an identifier for this document type. For details, see Required, optional, and prohibited elements.

·The name may contain one of the following phrases: Invoice no., Credit note No, Invoice Number:, Invoice Number.
We will list all the possible variants in the search string. Type each phrase without spaces to make the maximum number of errors to apply to the entire phrase and not to separate words.

·We are now interested only in the field located on the first page of each document, in the first part of the first page (some of the first pages contain static text which is similar to the name but located at the bottom of the page).

To create a kwInvoiceNumber element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceNumber.

2.Select Required element on the General tab (earlier we decided to make this element required).

3.Click the Static Text tab.

4.In the Search text field, type the search text: InvoiceNo.|CreditNoteNo|InvoiceNumber:|InvoiceNumber

5.Set Max error percentage to 20.

6.Click the Search Constraints tab and use absolute coordinates to specify the rectangular search area on the first page:

oSelect Absolute search area constraints

oIn the Pages field, select Range from the drop-down list

oIn the Range field, type 1

oIn the Region field, specify the coordinates of the rectangle [1, 1, 2475, 1878]

oOnce you have specified the properties of the search area, click Add.... The search area will appear in the Search areas list
Show me...

7.Click the Advanced tab.

8.In the Advanced pre-search relations field, specify additional constraints:
WholeWordMode: true;// Only whole text objects will be treated as possible hypotheses
MaxGapInLine: 50dt;// The maximum distance between neighboring words

9.By specifying an additional check in the Advanced post-search relations field, you can influence the quality of the generated hypotheses. For example:If the element has been detected, calculate the difference between the reference width and the width of the region of the detected element and check if it belongs to the fuzzy interval. In the FlexiLayout language, this condition can be written as follows:
If not IsNull then
{ FuzzyQuality: 600dt - width, {-70000,0,0,70000}*dt;
}
//This condition means that the greater the difference, the greater the penalty

note Note.To specify the locations of objects and the distances among them, a two-dimensional coordinate system is used. The (0, 0) point, where the vertical and horizontal axes intersect, is located in the top left corner of the image. The abscissa axis is directed left to right, the ordinate axis is directed top to bottom.

10.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

note Note.To exclude an element, select it in the tree of elements and then select Disable from the FlexiLayout menu.


Sample 4. Step 5.2: Name of Delivery Address field, kwDeliveryAddress element

Show/Hide Hidden Text

Once you have examined the images, you will notice that:

·The field in question is always located on the first page, in the first part of the page. Therefore, you can limit the search area to the first page and use absolute coordinates to specify a rectangular area.

·We will use the AddressHeaders.txt file to search for the text.

note Note.Both the GUI and the FlexiLayout language allow you to use databases and text files to specify text lines to be found on an image. Text files can use either ANSI or Unicode encoding. Letter case does not affect the search and only serves to make the text more readable. Each search string must be placed on a separate line. Empty lines are ignored.

·You can set the maximum error percentage to 20, which in our case means no more than 3 errors in each phrase.

note Note.The optimal number of errors can only be arrived at through trial and error. For details about the Static Text elements, see Static Text.

To create a kwDeliveryAddress element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwDeliveryAddress.

2.Click the Static Text tab.

3.Select Search text from file and provide the path to the AddressHeaders.txt file (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice\Dict).
A text file is accessed by its name, which can be either absolute or relative. Relative names are specified relative to the FlexiCapture project folder (the folder that contains the *.fcproj file) or the FlexiLayout Studio project folder (the folder that contains the images).
Show me...

4.Set Max error percentage to 20.

5.Click the Search Constraints tab and use absolute coordinates to specify the rectangular search area on the first page:

oSelect Absolute search area constraints

oIn the Pages field, select Range from the drop-down list

oIn the Range field, type 1

oIn the Region field, specify the coordinates of the rectangle [1, 1, 2475, 1878]

oOnce you have specified the properties of the search area, click Add.... The search area will appear in the Search areas list

6.Click the Advanced tab and in the Advanced pre-search relations specify
WholeWordMode: true;// Only whole text objects will be treated as possible hypotheses

7.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.


Sample 4. Step 5.3: Name of Invoice Date field, kwInvoiceDate element

Show/Hide Hidden Text

Once you have examined the images, you will notice that:

·The name of the Invoice Date field is a short and very common word Date.
This means that we have to narrow down the search area as much as possible.

·The name of the Date field (if this field is present on a given image) is located very close to the name of the Invoice Number field.

To create a kwInvoiceDate element:

1.In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceDate.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: Date.

4.Set Max error percentage to 30 (which means that only one error can be made in our word which has four letters).

5.Click the Relations tab.

6.On the Relations tab click the Add button and add relations specifying that the keywords may not be more than 30 dots above the upper boundary of the name of the Invoice Number field and not more than 700 dots below its lower boundary:

oBelow the upper boundary of the region of kwInvoiceNumber, Offset = -30, Reference boundary = Top.

oAbove the lower boundary of the region of kwInvoiceNumber, Offset = -700, Reference boundary = Bottom.

note Note.When selecting Offset values, you may wish to examine the geometrical properties (boundaries and sizes) of the reference and search image objects in pre-recognition results mode. You can use the Measure Rectangle tool to measure distances. Offset values can only be selected by method of trial and error.

7.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

Try matching the FlexiLayout. You will notice that:

·On the first page of some of the documents, several hypotheses have been generated for kwInvoiceDate and sometimes the wrong hypotheses has been selected. To correct the error, we need to adjust the properties of the element.

·The field we are interested in is closest to the upper edge of the page.

To specify additional search constraints:

1.Open the Properties dialog box for the kwInvoiceDate element.

2.Click the Relations tab.

3.Select Nearest and then select Page top edge from the To drop-down list.
Show me...

Match the FlexiLayout again to make sure that the name of the Invoice Date field can be reliably detected.


Sample 4. Step 5.4: Invoice Number field, InvoiceNumber element

Show/Hide Hidden Text

On some of the documents, the Invoice Number field is located to the right of the field name whereas on other documents it is located below the name (in documents 1 and 2 the field data are placed directly beneath the name).

To create an InvoiceNumber element:

1.In the InvoiceHeader element, create an element of type Character String and name it InvoiceNumber.

note Note.The name of the element need not be the same as the name of the block corresponding to the InvoiceNumber field. However, having identical names is convenient when working with a FlexiLayout.

2.Click the Character String tab.

3.Specify the alphabet:
-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

4.Set Percentage of non-alphabet characters to 30%.

5.In the Character count field, specify the fuzzy interval {-1, 3, 20, INF} for the length of the character string, assuming that possible values fall into the region of 3 to 20 characters. Any hypothesis outside this interval will be penalized.

6.On some of the images, the search area for the Invoice Number field contains the already detected kwInvoiceDate element. Exclude this element from the search area, so that the program does not include this text in its hypotheses for the Invoice Number field:

oOn the Search Constraints tab, click the Add... button next to the Exclude regions of elements field.

oSelect kwInvoiceDate from the list of elements.

oClick OK. The string SearchElements.InvoiceHeader.kwInvoiceDate will appear in theExclude regions of elements field.
Show me...

7.Click the Advanced tab.

8.In Advanced pre-search relations, specify additional conditions: if the name kwInvoiceNumber is not found, do not search for the InvoiceNumber field, otherwise specify the search area as an array of rectangles: one rectangle to the right of the name and another rectangle below the name with a small offset. In the FlexiLayout language, this condition can be written as follows:
if kwInvoiceNumber.IsNull then Dontfind();
else
{ WholeWordMOde: true;
MaxGapInLine: 30dt;
RectArray DataRegion;
Let r1= Rect (kwInvoiceNumber.Rect.Right, kwInvoiceNumber.Rect.Top -20dt, kwInvoiceNumber.Rect.Right + 650dt, kwInvoiceNumber.Rect.Bottom + 50dt);
// Limits the search area by a rectangle to the right of the name of the InvoiceNumber field.
Let r2 = Rect (kwInvoiceNumber.Rect.Left - 100dt, kwInvoiceNumber.Rect.Bottom, kwInvoiceNumber.Rect.Right + 100dt, kwInvoiceNumber.Rect.Bottom + 100dt);
// Limits the search area by a rectangle beneath the name of the InvoiceNumber field.
DataRegion = RectArray (r1);
DataRegion.Add (r2);
RestrictSearchArea (DataRegion);
}

9.The search area for the field is limited to two rectangles, one to the right of the field name and one beneath it. If the field data are located to the right of the field name, there is often some other text beneath the field (on the test images, this is most commonly the name and data of the Date field). Since this extraneous text will be included into the search area for the Invoice Number field, the program will generate a hypothesis for this text. To influence the quality of this hypothesis, specify additional checks in the Advanced post-search relations field: the lower the text beneath the field name, the bigger the penalty. In the FlexiLayout language, this condition can be written as follows:
if not IsNull then
{ FuzzyQuality: Top - kwInvoiceNumber.Rect.Top, {-30000,0,0,10000}*dt;
}
// The greater the distance between the name and upper boundary of the field, the bigger the penalty for the corresponding hypothesis. In this particular case, the hypothesis for the element whose upper boundary coincides with the upper boundary of the name will have the highest quality.

10.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

11.Specify the location of the InvoiceNumber block as a rectangular region of the InvoiceNumber element enlarged by 5 dots vertically and horizontally. To do this, select Expression and type the following expression:
Rect outputRect;
outputRect = InvoiceHeader.InvoiceNumber.Rect;
IsNull = InvoiceHeader.InvoiceNumber.IsNull;
// Treats the block region as detected if the InvoiceNumber element has been detected.
OutputRegion = outputRect;
OutputRegion.Inflate (5dt, 5dt);


Sample 4. Step 5.5: Invoice Date field, grDate, InvoiceDate, and InvoiceDateAsString elements

Show/Hide Hidden Text

Once you have examined the images, you will notice that:

·On some of the documents, the Invoice Date field is located to the right of the field name and on others it is located beneath the name. Therefore, we will limit the search area to rectangles to the right and beneath the name.

·We will use a Date element to search for the date. Additionally, we will specify the following condition: if the field name is not detected, do not search for the field data.

·Quite often, dates may be recognized unreliably. This may be due to scanning defects, invalid date formats, etc. Therefore, we will specify an additional Character String element in case the Date element fails to find any date.

To specify the settings common to all the elements, we will create an element of type Group.

To create a grDate element of type Group:

1.In the InvoiceHeader element, create an element of type Group and name it grDate.

2.Click the Advanced tab and specify additional search constraints: limit the search area to the array of rectangles consisting of one rectangle to the right of the field name and rectangle below the field name with some offset. In the FlexiLayout language this constraint can be written as follows:
RectArray DataRegion;
Let r1= Rect (kwInvoiceDate.Rect.Right, kwInvoiceDate.Rect.Top -20dt, kwInvoiceDate.Rect.Right + 650dt, kwInvoiceDate.Rect.Bottom + 50dt);
Let r2 = Rect (kwInvoiceDate.Rect.Left - 150dt, kwInvoiceDate.Rect.Bottom, kwInvoiceDate.Rect.Right + 100dt, kwInvoiceDate.Rect.Bottom + 100dt);

DataRegion = RectArray (r1);
DataRegion.Add (r2);
RestrictSearchArea (DataRegion);

To create an InvoiceDate element:

1.In the InvoiceHeader.grDate element, create an element of type Date and name it InvoiceDate.

2.Click the Date tab.

3.Specify all the possible date formats for the InvoiceDate element:
Show me...

4.On some of the images, the search area of the Invoice Date field will include the already detected kwInvoiceNumber and InvoiceNumber elements. To prevent the program from considering the values of these elements as hypotheses for the Invoice Date field, exclude these elements from the search area:

oClick the Add... button next to the Exclude regions of elements field.

oSelect kwInvoiceNumber from the list of elements.

oClick OK. The string SearchElements.InvoiceHeader.kwInvoiceNumber will appear in the Exclude regions of elements field.

Repeat the above actions for the element SearchElements.InvoiceHeader.InvoiceNumber.

5.Click the Advanced tab.

6.The Invoice Date field is not a required element. However, if a document contains a date (in the Invoice Date field), there is always the corresponding field name on the document (described earlier by the kwInvoiceDate element). Therefore, you can specify an additional search condition in Advanced pre-search relations:Search for the image object only if the kwInvoiceDate has been detected. In the FlexiLayout language, this condition can be written as follows:
If InvoiceHeader.kwInvoiceDate.IsNull
Then DontFind();

7.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

For poor quality images, when recognition results do not fit any of the standard parameters of the Date element, we will add an alternative element which will use more lax conditions to search for the Invoice Date field.

To create an InvoiceDateAsString element:

1.In the InvoiceHeader.grDate element, create an element of type Character String and name it InvoiceDateAsString.

2.Click the Character String tab.

3.Specify the alphabet:
,-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz

4.Set the percentage of non-alphabet characters to 30%.

5.In the Character count field, specify the fuzzy interval {-1, 8, 14, INF}for the length of the character string, assuming that possible values fall into the region of 8 to 14 characters. Any hypothesis outside this interval will be penalized.

6.Set Max space length to 20. This limits the maximum length of space in the text string to 20 dots.

7.For the other element properties, keep the default settings.

8.Click the Advanced tab.

9.Since we are going to search for the InvoiceDateAsString element only if the InvoiceDate is not detected on the image, specify the following condition in the Advanced pre-search relations field:Search for the image object only if the InvoiceDate element is not detected.In the FlexiLayout language, this condition can be written as follows:
If Not InvoiceDate.IsNull Then DontFind;

10.Specify an additional condition for InvoiceDate similar to the one above:Search for the image object only if thekwInvoiceDate element has been detected. Search for an image object closest to thekwInvoiceDate element. In the FlexiLayout language, this condition can be written as follows:
If InvoiceHeader.kwInvoiceDate.IsNull Then DontFind;
Nearest: InvoiceHeader.kwInvoiceDate;

11.Specify the location of the InvoiceDate block as the rectangular region of the detected InvoiceDate or InvoiceDateAsString element increased by 5 dots vertically and horizontally. To do this, select the Expression option and type the following expression:
Rect outputRect;
if not InvoiceHeader.grDate.InvoiceDate.IsNull then
outputRect = InvoiceHeader.grDate.InvoiceDate.Rect;
else
{ outputRect = InvoiceHeader.grDate.InvoiceDateAsString.Rect;
IsNull = InvoiceHeader.grDate.InvoiceDateAsString.IsNull;
}
OutputRegion = outputRect;
OutputRegion.Inflate (5dt, 5dt);


Sample 4. Step 5.6: Delivery Address field, grAddress, wgAddressAbove, and DeliveryAddress elements

Show/Hide Hidden Text

We have decided to search for the Delivery Address field:

·to the right of and below the field name

·using the White Gap element to limit the search area from below

·using a Paragraph element

To specify the properties common to all these elements, we will create a Group element.

To create a group grAddress element:

1.In the InvoiceHeader element create an element of type Group and name it grAddress.

2.Click the Relations tab and specify the following search constraints for the elements of the group:

·Above the kwDeliveryAddress element, Offset = -400

·Left of the right boundary of the kwDeliveryAddress element, Offset = -800, Reference boundary = Right.

·Right of the left boundary of the kwDeliveryAddress element, Offset = -50, Reference boundary = Left.

·Below the upper boundary of the kwDeliveryAddress element, Offset = -20, Reference boundary = Top.

Show me...

To limit the search area for the DeliveryAddress element from below, we will specify a horizontal White Gap.

To create a wgAddressAbove element:

1.In the InvoiceHeader.grAddress element, create an element of type White Gap and name it wgAddressAbove.

2.Click the White Gap tab.

3.Under Orientation, select Horizontal. Set Min height to 55.

note Note.When selecting values for the heights/widths of white gaps, you may wish to consider the geometry (i.e. boundaries and sizes) of the adjacent image objects in pre-recognition results mode.

4.We are going to look for a white gap inside a paragraph, therefore under Search among objects of type, select only Text.

5.Under Rubbish, specify the following values:

oLower threshold limit – 20;

oUpper threshold limit – 80;

oThreshold coefficient (%) – 10.
Show me...

note Note.The values for the properties Lower threshold limit, Upper threshold limit, and Threshold coefficient (%) can only be selected by method of trial and error. We recommend starting with the default values. If the default values do not work, altering them until the white gap is detected on all the test images.

6.Do not specify any additional search constraints and retain the default values for the other options.

7.Click the Relations tab.

8.Since the white gap can be located only beneath the keywords of the name kwDeliveryAddress, specify the following search constraints:

oBelow the kwDeliveryAddress element, Offset = 20

Offset is required in order to prevent the program from finding white gaps in other areas on the image, e.g. between the field name and the text. Click the Advanced tab.

9.Since the Delivery Address field is not present on all of the images, but when it does occur it is always accompanied with its name, specify the following additional condition in the Advanced pre-search relations field:Search for the image object only if the kwDeliveryAddress element is detected. In the FlexiLayout language, this condition can be written as follows:
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind;

10.Match the FlexiLayout to see if the wgAddressAbove element is detected on all images.

11.Since the program sometimes finds more than one white gap in the specified search area and cannot always select the right one, we need to impose additional search constraints. If you examine the images, you will notice that the white gap we are interested in is the topmost gap in the given search area. Therefore, in the Advanced pre-search relations field, specify the following additional condition:Search for an image object closest to the upper boundary of the first page. In the FlexiLayout language, this condition can be written as follows:
NearestY: Page(1).RectGlobal.Top;

12.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

To create a DeliveryAddress element:

1.In the InvoiceHeader.grAddress element, create an element of type Paragraph and name it DeliveryAddress.

2.Click the Relations tab.

3.Since DeliveryAddress can be located only above the white gap wgAddressAbove, specify the following search constraint:

oAbove the wgAddressAbove element, Offset = 0.

4.Since the search area for the DeliveryAddress element has already been specified at the level of the InvoiceHeader.grAddress group, we need not specify it once again here.

5.Click the Advanced tab.

6.Since the name of the DeliveryAddress field is also located inside the search area, we need to exclude it in order to obtain only the value of DeliveryAddress. Additionally, there are separators and noise in the search area which are also best excluded. For the above reasons, we cannot just exclude the region of the kwDeliveryAddress element. It would be more appropriate to take the region of the kwDeliveryAddress element, enlarge this region so that it encompasses all the noise, and then exclude the resulting rectangle. To do this, specify the following search constraints in the Advanced pre-search relations field:
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind;
Else
// Draws a rectangle around the field name (with some offset for the boundaries)
{ Let Left = InvoiceHeader.kwDeliveryAddress.Rect.Left - 100dt;
Let Top = InvoiceHeader.kwDeliveryAddress.Rect.Top - 100dt;
Let Right = InvoiceHeader.kwDeliveryAddress.Rect.Right + 20dt;
Let Bottom = InvoiceHeader.kwDeliveryAddress.Rect.Bottom;
// Exclude the resulting rectangle from the search area of the field
ExcludeRect (Left, Top, Right, Bottom);
}

7.Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

8.Specify the location of the DeliveryAddress block as the rectangular region of the detected DeliveryAddress element, simplified for better visual perception and expanded by 5 dots vertically and horizontally. To do this, select the Expression option and type the following expression:
Rect outputRect;
OutputRegion = InvoiceHeader.grAddress.DeliveryAddress.SimplifiedRegion;
IsNull = InvoiceHeader.grAddress.DeliveryAddress.IsNull;
OutputRegion.Inflate (5dt, 5dt);


Sample 4. Step 6: Document Footer, InvoiceFooter group

In the InvoiceFooter group we will specify the elements that will enable the program to identify the last page of the document:

·The last page of the document always has the keywords "TOTALAMOUNTMUST", "Carriedover", "TotalCHF", "Total".

·To search for this text, we will create two elements. In the first element, specify "TOTALAMOUNTMUST", "Carriedover", and "TotalCHF". Create a second element below the first one in the tree of elements and specify only "Total" in this second element (the program will search for this element only if the first element has not been detected). This will reduce the number of hypotheses generated for the element and speed up the FlexiLayout matching process.

·These words are always located below the column names Description and Product Total on the same page.

To search for the keywords in the Product Total and Description column, we will create elements of type Static Text:

·ExtraTag element: see detailed instructions in Step 6.1.

·AddTag element: see detailed instructions in Step 6.2.

We will also use Static Text elements to search for the keywords "TOTALAMOUNTMUST", "Carriedover", "TotalCHF", and "Total":

·LongFooter element: see detailed instructions in Step 6.3.

·ShortFooter element (to search for the keyword "Total"): see detailed instructions in Step 6.4.

To make Footer match only the last page of the document, it must contain a required element. Since the keywords that identify the last page of the document can be found on every last page of every document, in the InvoiceFooter group, create a required element of type Paragraph and name it InvoiceFooter. Specify the search area for this element as the rectangular region of the detected LongFooter or ShortFooter element, slightly expanded vertically and horizontally (for detailed instructions, see Step 6.5).


Sample 4. Step 6.1: Product Total column name, ExtraTag element

To create an ExtraTag element:

1.In the InvoiceFooter element, create an optional element of type Static Text and name it ExtraTag.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: PRODUCTTOTAL.

4.Do not impose any additional constraints and leave default values for the other options.


Sample 4. Step 6.2: Description column name, AddTag element

To create an AddTag element:

1.In the InvoiceFooter element, create an optional element of type Static Text and name it AddTag.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: Designation | Description.

4.In Advanced pre-search relations specify additional constraints:

WholeWordMode: true;
// Only whole words must be considered as hypotheses.
MaxGapInLine: 10dt;
// This is the maximum distance between adjacent characters.


Sample 4. Step 6.3: The final part of the document, LongFooter element

Show/Hide Hidden Text

To create a LongFooter element:

1.In the InvoiceFooter element, create an optional element of type Static Text and name it LongFooter.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: TOTALAMOUNTMUST|Carriedover|TotalCHF.

4.Since the search text is always located below the name of the Description column, click the Relations tab and specify the following relation:

oBelow the AddTag element, Offset = 100;

5.Since on some of the documents (e.g. on documents 3 and 9) the program finds several text variants and selects the wrong one, we must impose additional constraints. Once you have analyzed the images, you will notice that the text we are interested in is the topmost text in the given search area (we want to find the text that is closest to the table order, because it can then be used as the Footer of the table). On the Relations tab, specify additional search constraints: Search for a string closest to the upper boundary of the document:

oSelect the Nearest option.

oIn the To field, select Y coordinate from the drop-down list.

oIn the Y field, type 0.

Show me...


Sample 4. Step 6.4: The final part of the document, ShortFooter element

To create a ShortFooter element:

1.In the InvoiceFooter element, create an optional element of type Static Text and name it ShortFooter.

2.Click the Static Text tab.

3.In the Search text field, type the text to search: Total.

4.Click the Search Constraints tab and exclude the already detected ExtraTag element from the search area of the ShortFooter element. This will prevent the program from finding the word "Total" in the name of the table:

oClick the Add... button next to the Exclude regions of elements field.

oSelect ExtraTag from the list of elements.

oClick OK. The SearchElements.InvoiceFooter.ExtraTag string will appear in the Exclude regions of elements field.

5.Since the search text is always located below the name of the Description column, click the Relations tab and specify the following relation:

oBelow the AddTag element, Offset = 100;

6.Earlier we decided that we will search for the ShortFooter element only if LongFooter has not been detected. To implement this condition, specify the following in Advanced pre-search relations:Do not search for the element if LongFooter has not been detected. In the FlexiLayout language, this condition can be written as follows:

If not LongFooter.IsNull then Dontfind();


Sample 4. Step 6.5; The final part of the document, Paragraph element

To create a Paragraph element:

1.In the InvoiceFooter element, create a required element of type Paragraph and name it Paragraph.

2.Click the Advanced tab and in the Advanced pre-search relations field, specify additional search conditions:
Do not search for the element if neither, LongFooter nor ShortFooter has been detected. If LongFooter has been detected, specify the search area as the rectangular region of this element expanded by 10 dots vertically and horizontally. If ShortFooter has been detected, specify the search area as the rectangular region of this element expanded by 10 dots vertically and horizontally. In the FlexiLayout language, this condition can be written as follows:

If LongFooter.IsNull and ShortFooter.IsNull then Dontfind();
// Do not search for the element if none of the elements are detected
else
{ if not LongFooter.IsNull then
// If LongFooter is detected, the search area is defined based on its region
{ LeftOf: LongFooter.Rect.Right + 10dt;
RightOf: LongFooter.Rect.Left - 10dt;
Below: LongFooter.Rect.Top - 10dt;
Above: LongFooter.Rect.Bottom + 10dt;
}
else if not ShortFooter.IsNull then
// If ShortFooter is detected, the search area is defined as the region of ShortFooter
{ LeftOf: ShortFooter.Rect.Right + 10dt;
RightOf: ShortFooter.Rect.Left - 10dt;
Below: ShortFooter.Rect.Top - 10dt;
Above: ShortFooter.Rect.Bottom + 10dt;
}
}

Try matching the FlexiLayout and make sure that the pages are correctly separated into documents as defined by the Header and Footer elements. Once the FlexiLayout is matched with all the pages, the documents should be assembled as specified in the reference assembly created when we started work on this FlexiLayout.

note Note.To apply the FlexiLayout to all test images, use keyboard shortcuts:

·Activate the Batch window

·Press Ctrl+A to select all the pages.

·Press Ctrl+E to analyze all the selected pages.

note Note.In the case of a multi-page document, be sure to apply the FlexiLayout to all the pages of the document, not just to some of the pages. Otherwise, the program may fail to apply the FlexiLayout to some of the documents.


Sample 4. Step 7: Table column names, TableHeader group

We will use a Table element to search for the Invoice Table field. However, some preparations have to be done: we have to detect the column names first. In this sample, auxiliary elements are used to search for column names.

Therefore, before we start searching for the fields, we need to create a number of elements.

To described the column names, create a TableHeader group, which will include the descriptions of all the column names. Also, limit the search area to the first page.

To create a TableHeader element:

1.In the tree of elements, create an element of type Group and name it TableHeader.

2.Click the Search Constraints tab and specify the search area for the element:

oSelect the Absolute search area constraints option.

oIn the Pages field, select Range from the drop-down list.

oIn the Range field, type 1.

oIn the Region field, keep the default value.

oClick the Add... button.

We will use Static Text elements to search for the column names.

In the TableHeader group, create the following elements:

1.kwDesignation element: see detailed instructions in Step 7.1,

2.ExtraQtyTag element: see detailed instructions in Step 7.2,

3.kwQuantity element: see detailed instructions in Step 7.3,

4.kwUnitPrice element: see detailed instructions in Step 7.4,

5.kwTotal element: see detailed instructions in Step 7.5,

6.kwReference element: see detailed instructions in Step 7.6,

7.kwSales element: see detailed instructions in Step 7.7,

8.kwUnit element: see detailed instructions in Step 7.8.


Sample 4. Step 7.1: Name of Designation column, kwDesignation element

Once you have analyzed the pre-recognition results, you will notice that there are only two variants of the name Designation and Description. Since we specified the search area at the level of the group, we need not specify it here.

To create a kwDesignation element:

1.In the TableHeader element, create an element of type Static Text and name it kwDesignation.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: Designation|Description.

4.Keep the default values for the other options.

5.Match the FlexiLayout to make sure that the element is detected on the images.


Sample 4. Step 7.2: Name of ExtraQuantity column, ExtraQtyTag element

Show/Hide Hidden Text

Now we need to detected the name Quantity, which appears on the documents as "Qty", "Quantity", "ORDERED", or "QtyNet". However, there is one more name in the table which may also contain the word "Quantity". This name also contains unique text. Therefore, we will first described the ExtraQtyTag and then exclude it from the search area of the name Quantity.

On all the documents, the name of the ExtraQtyTag column is exactly the same. Even though the quality of the images is fairly good, set the maximum error percentage to 35%. For a seven- or eight-letter word this means that two characters may be incorrect.

Additionally, since all the names are placed on the same level, specify an additional search constraint relative to the already detected name of the Designation column.

To create an ExtraQtyTag element:

1.In the TableHeader element, create an element of type Static Text and name it ExtraQtyTag.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: "Quantity *BK.ORD".

4.Set Max error percentage to 35.

5.Since the ExtraQuantity field contains multiple lines, select the options Take spaces into account andPermit multiple lines.

6.We will not penalize hypotheses carried over to the next line: set Line break penalty to 1.

7.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints:

oAbove the lower boundary of the kwDesignation element, Offset = -50, Reference boundary = Bottom,

oBelow the upper boundary of the kwDesignation element, Offset = -50, Reference boundary = Top.
Show me...

8.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. Click the Advanced tab and specify this condition in Advanced pre-search relations. In the FlexiLayout language, this condition can be written as follows:
If kwDesignation.IsNull then Dontfind();

9.In Advanced pre-search relations, also specify additional constraints:
WholeWordMode: true;// Only whole words will be considered as hypotheses

note Note.This constrain can also be specified via the GUI by selecting Whole words only on the Static Text tab.

10.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.3: Name of Quantity column, kwQuantity element

We will rely on the already detected kwDesignation and ExtraQtyTag elements to describe this name.

To create a kwQuantity element:

1.In the TableHeader element, create an element of type Static Text and name it kwQuantity.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: Qty|Quantity|ORDERED|QtyNet.

4.Set Max error percentage to 35.

5.Click the Search Constraints tab and exclude the already detected element SearchElements.TableHeader.ExtraQtyTag from the search area.

6.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

7.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

8.In Advanced pre-search relations, specify additional search constraints:
WholeWordMode: true;// Only whole words will be considered as hypotheses.
MaxGapInLine: 20dt;// This is the maximum distance between adjacent characters.

9.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.4: Name of UnitPrice column, kwUnitPrice element

Show/Hide Hidden Text

Once you have analyzed the images you will notice that the name of the Unit Price column can be described by the following search text: "UnitPrice", "Price", and "RATE", and the name Unit appears as "Unit". To prevent the program from detecting the word "Unit" in the name of the Unit Price column, we will first describe Unit Price, because it contains unique text, and then we will use an additional relation do describe Unit.

When creating an element to search for the keywords of the name of the Unit Price column, take into account the fact that the Unit Price column is always located to the right of the Quantity column.

To create a kwUnitPrice element:

1.In the TableHeader element, create an element of type Static Text and name it kwUnitPrice.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: UnitPrice|Price|RATE.

4.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

5.On the Relations tab, specify the following condition: search for an element closest to the X coordinate with value = 0.
Show me...

6.Click the Advanced tab.

7.Since the name of the Unit Price column is located to the right of the name of the kwQuantity column, specify the following additional conditions in Advanced pre-search relations:If the kwQuantity element has been detected, search for the image object to the right of the kwQuantity element. In the FlexiLayout language, this condition can be written as follows:
If Not (TableHeader.kwQuantity.IsNull) Then
RightOf: TableHeader.kwQuantity, 0 * dot;

8.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

9.We can influence the quality of generated hypotheses by specifying additional checks in the Advanced post-search relations field. In this case, we may specify the following check:If the element has been detected, calculate the difference between the reference width and the width of the detected element and see if it belongs to the given fuzzy interval. In the FlexiLayout language, this condition can be written as follows:
If not IsNull then
{ FuzzyQuality: 400dt - width, {-50000,0,0, 50000}*dt;
}
//This check means that the greater the difference, the greater the penalty coefficient

10.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.5: Name of Total column, kwTotal element

Show/Hide Hidden Text

You will notice that the Total column on all the images is located to the right of the Unit Price column. Therefore, we can search for the Total column relative to the Unit Price column.

To create a kwTotal element:

1.In the TableHeader element, create an element of type Static Text and name it kwTotal.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: TotalChf|Total|Extension|AMOUNT|PRODUCTTOTAL.

4.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

5.On the Relations tab, specify the following condition: search for an element closest to the X coordinate with value=6000.
Show me...

6.Click the Advanced tab.

7.Since the name of the Total column is located to the right of the name of the kwUnitPrice column (if the latter is present on the image), specify an additional condition in Advanced pre-search relations: If the element kwUnitPrice is detected, search for kwUnitPrice. In the FlexiLayout language, this condition can be written as follows:
If Not (TableHeader.kwUnitPrice.IsNull) Then
RightOf: TableHeader.kwUnitPrice, 0 * dot;

8.To optimize the search process, specify an additional condition: Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

9.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.6: Name of Reference column, kwReference element

You will notice that on the documents this name appears as "Reference", "ID", "Item", or "CODE".

To create a kwReference element:

1.In the TableHeader element, create an element of type Static Text and name it kwReference.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: Reference|ID|Item|CODE.

4.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

5.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

6.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.7: Name of Sales column, kwSales element

Even we do not need the Sales column per se, it can be used to limit the table on the right.

To create a kwSales element:

1.In the TableHeader element, create an element of type Static Text and name it kwSales.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: Sales

4.To specify that the name we are searching is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

5.Click the Advanced tab.

6.Since the name of the Sales column is located to the right of the kwTotal column (if the latter is present on the image), specify an additional condition in Advanced pre-search relations:
If the kwTotal element is detected, search for the image object to the right of the kwTotal element. In the FlexiLayout language, this condition can be written as follows:
If Not (TableHeader.kwTotal.IsNull) Then
RightOf: TableHeader.kwTotal, 0 * dot;

7.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

8.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 7.8: Name of Unit column, kwUnit element

When creating an element to search for the keywords of the name of the Unit column, we will rely on the already detected column UnitPrice and specify an additional relation:Search for the name of the Unit column to the left of the left boundary of the name of the UnitPrice column.

To create a kwUnit element:

1.In the TableHeader element, create an element of type Static Text and name it kwUnit.

2.Click the Static Text tab.

3.In the Search text field, specify the text to search: Unit.

4.To specify that the name we are searching for is located on the same level with the name Designation, click the Relations tab and specify the following additional constraints. See Step 7.2 for details.

5.To specify that the name is located to the left of the left boundary of the name of the UnitPrice column, specify the following additional constraint on the Relations tab:

oLeft of the left boundary of the kwUnitPrice element Offset = 20, Reference boundary = Left.

6.To optimize the search process, specify an additional condition:Do not search for the name if the name Designation has not been detected. See Step 7.2 for details.

7.Match the FlexiLayout to make sure that the element is detected on the first page of the document.


Sample 4. Step 8: Table element, InvoiceTable element

Show/Hide Hidden Text

Now that all the preparations have been made we can search for the Invoice Table field by creating a Table element:

1.Header of the table. As decided earlier, we will specify column names using already detected auxiliary elements.

2.Footer of the table. To specify the Footer, we decided to use an already detected required element Paragraph from the InvoiceFooter group, which identifies the beginning of the final part. We described this element as the closest to the bottom of the table.

3.Search area for the table. We can limit the search area on the right using the name of the last Sales column, which we do not need for any other purposes.

To create an InvoiceTable element:

1.In the SearchElements tree, create and element of type Table and name it InvoiceTable.

2.Click the Columns tab

3.Click Select to select the previously created (see Step 3) InvoiceTable block as the block to search

4.Specify the search parameters for the table columns:

oIn the list of columns, select Reference and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwReference element. To use it, select Use found element as column name, then click [image] and select TableHeader.kwReference.

oIn the list of columns, select Designation and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwDesignation element.

oIn the list of columns, select Unit and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwUnit element.

oIn the list of columns, select Quantity and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwQuantity element.

oIn the list of columns, select UnitPrice and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwUnitPrice element.

oIn the list of columns, select Total and click the Properties... button.
For the name of this column, we will use the previously detected TableHeader.kwTotal element.

5.Click the Order tab.

6.Since the columns we are looking for may be separated from one another by other columns (e.g. ExtraQtyTag), but their order is always fixed (first Designation, next Unit Price, next Total), select Rules for column order, click Add..., and add the columns in the following order: Designation << Unit Price << Total.
Show me...

7.Click the Header tab. We need the Header of the table, but we do not need to impose any additional constraints, so keep the default values.

8.Click the Footer tab. We will use the previously detected element InvoiceFooter.Paragraph for the final part of the table. Select the Use found element as footer option, click [image] and then select the InvoiceFooter.Paragraph element.
Show me...

9.Click the Rows tab.

10.Since the cells in some of the columns may contain multiple lines, we need to specify master columns for line separation. Select Use master columns to detect rows.
First specify the Total column, as this column always contains data and for each table record this column has one line of data. In case this column is no detected on the image, specify the Unit Price and Quantity columns as the next line separation option. Use the [image] button to select these columns.
Show me...

11.Select the Relations tab. Since the table columns we are interested in are located to the left of the name of the Sales column, add the following search constraints:

oLeft of the TableHeader.kwSales element, Offset = 0;

note Note.For poor quality images (e.g. there is noise between the body and footer of the table, or there is no header or footer) you may specify upper and lower table limits. In this case, we can use the kwDesignation element as an upper limit and the Paragraph element as the lower limit. On the Relations tab, add the following search constraints:

oBelow the upper boundary of the kwDesignation element, Offset = -50, Reference boundary = Top;

oAbove the Paragraph element, Offset = -50; Reference boundary = Bottom.

12.Match the FlexiLayout with the test images.
You will notice that the program correctly detects the table element on all the images, but on some of the images the Quantity column includes redundant text from the preceding column.
To separate the good data in the Quantity column from irrelevant data, we will specify the type of content for this column.

13.Open the Properties dialog box of the table element InvoiceTable.
Click the Columns tab, open the Properties... dialog box of the Quantity column, and select the Check content type option. In Type of column content, select Number.
Show me...

14.Now if you match the FlexiLayout on the images, you will see that the Quantity contains only digits, which is what we need.

15.Similarly, specify the Currency content for the UnitPrice and Total columns.

16.To specify the location of the InvoiceTable block, select the Source element option. Click [image] and specify InvoiceTable as the source element.


Sample 4. Step 9: TotalAmount field, SumGroup Group element

Once you have analyzed the test documents, you will notice that the Total Amount field occurs only together with the field name on the last page below the table. Additionally, the field itself is either on the same level as the field name or below the name. Since the field contains only one line, we will create a Character String element to search for it.

To specify the settings common to the field and its name, we will use a Group element.

To create a SumGroup element:

1.Create an element of type Group and name it SumGroup.

2.Click the Advanced tab and in the Advanced pre-search relations field, specify additional search constraints for all the elements in the group:Search for the object below the last detected table. In the FlexiLayout language, this constraint can be written as follows:
If not InvoiceTable.LastSubTable.Body.IsNull then
Below: InvoiceTable.LastSubTable.Body.Rect.Bottom;

To search for the keywords in the TotalAmount field, use a SumGroup.kwTotal element of type Static Text. See Step 9.1 for detailed instructions.

To search for the one-line TotalAmount field, use a SumGroup. TotalAmount element of type Character String. See Step 9.2 for detailed instructions.


Sample 4. Step 9.1: Total Amount name, kwTotal element

Show/Hide Hidden Text

This field name occurs on the images as "Total Chf", "Carried Over", or "Total". It is located below the table (this constraint has already been specifies for the SumGroup element) and always occurs on the last page.

To create a kwTotal element:

1.In the SumGroup element, create an element of type Static Text and name it kwTotal.

2.Click the Static Text. tab.

3.In the Search text field, specify the text to search: TotalChf|CarriedOver|Total.

4.Set Max error percentage to 20.

5.Click the Search Constraints tab and limit the search area to the last page:

oSelect Absolute search area constraints

oIn the Pages field, select Last from the drop-down list

oDo not select any other options

oClick the Add button. The search area will appear in the Search areas list
Show me...

6.Click the Advanced tab.

7.Among the many detected elements that contain the specified text, we must select the one that is located closest to the bottom boundary of the table. This location allows us to influence the quality of the hypotheses. In Advanced post-search relations specify additional parameters for the hypothesis:If a non-null hypothesis has been generated, calculate the distance between the upper boundary of the detected element and the bottom boundary of the last table detected in the document. Then check if this distance belongs to the specified fuzzy interval.In the FlexiLayout language, this condition can be written as follows:
If not IsNull then
{ FuzzyQuality: Top - InvoiceTable.LastSubTable.Body.Rect.Bottom, {0,0,0, 50000}*dt;
}
//This check means that the greater the distance between the boundaries, the greater the penalty coefficient


Sample 4. Step 9.2: Total Amount field, TotalAmount element

We will search for the TotalAmount field both to the right of and below its name.

To create a TotalAmount field:

1.In the SumGroup element, create an element of type Character String and name it TotalAmount.

2.Click the Character String tab.

3.Specify the alphabet:
',-.0123456789OSZosz

4.Set Percentage of non-alphabet characters to 30%.

5.In the Character count field, specify the following fuzzy interval {-1, 1, 20, INF}, which assesses the string length. We assume that all the possible values will fall into the interval of 1 to 20 characters. Any hypothesis outside this interval will be penalized

6.Do not impose any additional constraints and keep the default settings.

7.Click the Search Constraints tab and exclude the region of the hypothesis for the kwTotal element from the search area.

8.Click the Advanced tab.

9.In Advanced pre-search relations specify additional search conditions:If the kwTotal name has been detected, specify the search area as an array of rectangles: one rectangle to the right of the field name and one rectangle below the field name with some offset. Otherwise, do not search for the image object.In the FlexiLayout language, this condition can be written as follows:
If not kwTotal.IsNull Then
// If the field name kwTotal has been detected
{
WholeWordMOde: true;
MaxGapInLine: 30dt;
RectArray DataRegion;
Let r1= Rect (kwTotal.Rect.Right, kwTotal.Rect.Top -20dt, kwTotal.Rect.Right + 1800dt, kwTotal.Rect.Bottom + 50dt);
// Limits the search area to a rectangle to the right of the field name.
Let r2 = Rect (kwTotal.Rect.Left - 100dt, kwTotal.Rect.Bottom, kwTotal.Rect.Right + 100dt, kwTotal.Rect.Bottom + 200dt);
// Limits the search area to a rectangle below the field name.
DataRegion = RectArray (r1);
DataRegion.Add (r2);
RestrictSearchArea (DataRegion);
}
else Dontfind();
// Otherwise, do not search for the object.

10.The search area of the field value is limited to two rectangles, one to the right of and the other below the field name. If the field value is located to the right of the field name, there is some text below the field name on most of the images. Since on most of the images this redundant text is included into the search area of the TotalAmount field, the program will create a hypothesis for this text. To influence the quality of this hypothesis (i.e. to lower its quality), in Advanced post-search relations specify an additional check:The lower the field value below the field name, the greater the penalty.In the FlexiLayout language, this check can be written as follows:
If not IsNull then
{FuzzyQuality: 400dt - width, {-50000,0,0, 50000}*dt;
//Hypotheses for elements with region 400 dots wide will have the maximum quality
if width < 50dt then Quality: 0;
// Elements less than 50 dots are not considered
if Top > kwTotal.Rect.Top then
{ FuzzyQuality: Top - kwTotal.Rect.Top, {0,0,0, 20000}*dt;
}
}
//This check means that the higher the difference, the greater the penalty.

note Note.A 2D coordinate system is used to describe the locations of objects on the page and distances between them. The (0, 0) point is located in the top left corner of the image. The horizontal axis is directed left to right, the vertical axis is directed top down.

11.Match the FlexiLayout on the images to make sure that the program can reliably detect the element on all the images where it occurs.

12.Specify the location of the TotalAmount block as the rectangular region of the TotalAmount element expanded by 5 dots vertically and horizontally. To do this, select Expression and specify the following expression:
Rect outputRect;
outputRect = SumGroup.TotalAmount.Rect;
IsNull = SumGroup.TotalAmount.IsNull;
OutputRegion = outputRect;
OutputRegion.Inflate (5dt, 5dt);


Sample 4. Step 10: Company field, CompanyGroup Group element, Company element

Show/Hide Hidden Text

Once you have analyzed the images, you will notice that the Company field is always located in the first third of the first page of each document.

To search for the Company field, use an element of type Static Text which is part of a CompanyGroup element of type Group.

To create a CompanyGroup element, create an element of type Group and name it CompanyGroup. Keep the default settings.

To create a Company element:

1.In the CompanyGroup element, create an element of type Static Text and name it Company.

2.Click the Static Text tab.

3.Select Search text from file and specify the path to the Companies.txt file (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice\Dict).
Show me...

4.Click the Advanced tab.

5.In Advanced pre-search relations, specify an additional search constraint:Search for the image object in the first third of the first page of the document. In the FlexiLayout language, this constraint can be written as follows:
Above: Page(1).RectGlobal.Top + Page(1).RectGlobal.Height/3;

6.Match the FlexiLayout to make sure that it reliably detects the element on all the images where it occurs.

7.When you review the matching results, you will notice that the program failed to find the name of the company on some of the documents. This is because on some of the documents the text is written on two lines, whereas we specified one-line text in the properties of the element. To correct this, make the following changes

oOpen the Companies.txt file and specify the company name as YOUR SERVICE with spaces. This means that the program should look for a phrase which need not be written on one line.

oOpen the Properties dialog box of the Company element and click the Static Text tab.

oSelect Permit multiple lines to specify that the phrase can be written on more than one line.

oSet Line break penalty to 1. This will retain the quality of the generated hypothesis even if the text is written on more than one line. A smaller value would mean that the hypothesis should be penalized.

8.Match the FlexiLayout to maker sure that the program reliably detects the element on the test images.

9.Specify the location of the Company block as the rectangular region of the Company element expanded by 5 dots vertically and horizontally. To do this, select Expression and specify the following expression:
Rect outputRect;
outputRect = CompanyGroup.Company.Rect;
IsNull = CompanyGroup.Company.IsNull;
OutputRegion = outputRect;
OutputRegion.Inflate (5dt, 5dt);


Sample 4. Step 11: Exporting the FlexiLayout and adding it to a Document Definition in ABBYY FlexiCapture

You can export your FlexiLayout into an *.afl file and add it to a Document Definition in ABBYY FlexiCapture.

note Note.For detailed instructions, see Sample 1, Step 21 and Step 22.


support.htm

Navigation: »No topics above this level«

Return to chapter overview

Technical support

Should you have any questions regarding the way in which ABBYY FlexiLayout Studio works, first of all consult the documentation supplied with the software (Help). You may also browse the technical support section on our website www.abbyy.com. You may find the answer to your question there.

Our technical support service experts will need the following information to answer your question competently:

·your first and last name

·your organization name

·your telephone number (or fax, or e-mail)

·the serial number of your FlexiCapture package

·build number (see Help → About → Build)

·general description of your problem and the full error message text (if there was one)

·your computer and processor type

·the version of your Windows operating system

You may supply us with any other information you consider important.

You can get some information automatically by clicking the System Info... button in the About ABBYY FlexiLayout Studio 12 dialog box (menu Help).

warning Important!Only registered users are eligible for free technical support. You can register your copy of the application on our website .

ABBYY Offices


glossary_main_body.htm

A

ABBYY FlexiLayout™ Studio

ABBYY FlexiLayout Studio is an application for creating formalized descriptions (FlexiLayouts) of semi-structured documents. The descriptions are then used by a documents processing application to capture data from the described documents.

layout alternative

A set of elements which describes a document subtype.

B

block

An area on a document image which outlines the possible location of a field.

building a FlexiLayout

When you build a FlexiLayout, FlexiLayout Studio checks the properties and relations you specified in the FlexiLayout for correctness.

C

classifier

A project in FlexiLayout Studio intended for the preliminary identification of the pages and selecting the appropriate FlexiLayout or layout alternative for them.

D

document class

A set of documents or pages that share several common characteristics.

dot (dt)

An abbreviation of document unit, equals 1/300 of an inch. A unit of measurement used to measure distances on an image. Does not depend on resolution. For a 300 dpi image, a distance of 1 dot equals 1 pixel.

note Note. ABBYY FlexiLayout Studio allows you to select a unit of measurement to be used for all search constraints specified in the Properties dialog boxes of the elements. See Units of measurement for details. When specifying search constraints in the FlexiLayout language (the Advanced tab of the Properties dialog box), other units of measurement can also be used: cm, mm, inch, pt (see Coordinates and units of measurement). All these units of measurement also do not depend on the resolution of your images, allowing you to match one and the same FlexiLayout with images scanned at different resolutions.

E

element

A description of an image object which contains information about the type of the object, its properties, search area and location in relation to other objects.

F

flexible description

A formalized description of the document structure, designed to help detect fields. File format – *.afl.

H

hypothesis

An assumption made by the program that the object(s) detected on the image correspond(s) to the element of the FlexiLayout, i.e. meet(s) the search constraints and properties specified for the element.

M

matching a FlexiLayout with an image

A process of looking for the elements and blocks on the image described in the FlexiLayout.

multi-page sheet

The multitude of all pages in a document. a multi-page sheet is created by joining the pages of a document top down, without gaps or joints, with the left edge of all pages located on the same axis that goes through the point (0,0). The sequence of the pages in the sheet depends on their order in the batch.

Two coordinate systems are used – global (goes through the entire document) and local (bound to a particular page. The only difference between the global and local coordinate systems is that the global system has parallel shifts, each page having its own shift.

N

null hypothesis

A hypothesis formulated by the program if it fails to find any objects corresponding to an optional element. The quality of the null hypothesis is set by the user when specifying the element’s properties.

O

optional element

An element that need not be present on the image. If the program fails to find an optional element, it will formulate a null hypothesis and continue matching the FlexiLayout. The quality of the null hypothesis is set by the user.

P

pre-recognition

The preliminary recognition of the image performed by the program during which it tries to detect elementary objects on the image.

prohibited element

An element which may not occur on the image. A chain of hypotheses that contains a prohibited element is discarded.

R

reference element

An element that is used for detecting other elements and marking up blocks.

reference layout

Manually selected blocks on the image to be used as a "model" layout.

region

An area on an image which consists of several rectangles. The bottom of one rectangle is part of the top of another rectangle.

required element

An element that must be present on the image. If the program fails to find a required element, it stops matching the FlexiLayout.

S

search area

An area on a document image where the program will look for objects described by the corresponding FlexiLayout element. Search areas are specified by the user in the Properties dialog box.


Copyrights_guide

© 2019 ABBYY Production LLC. All rights reserved.

ABBYY, the ABBYY logo, FlexiCapture, FlexiLayout, FormReader, FineReader are either registered trademarks or trademarks of ABBYY Software Ltd.

© 1984-2011 Adobe Systems Incorporated and its licensors. All rights reserved.
Protected by U.S. Patents 5,929,866; 5,943,063; 6,289,364; 6,563,502; 6,639,593; 6,754,382; Patents Pending.
Adobe, the Adobe logo, Acrobat, the Adobe PDF logo, Distiller and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Portions of this computer program are copyright © 2008 Celartem, Inc. All rights reserved.
Portions of this computer program are copyright © 2011 Caminova, Inc. All rights reserved.
Portions of this computer program are copyright © 2013 Cuminas, Inc. All rights reserved.
DjVu is protected by U.S. Patent No. 6,058,214. Foreign Patents Pending.
Powered by AT&T Labs Technology.

PixTools © 1994-2007 EMC Corporation. All rights reserved.

WIBU, CodeMeter, SmartShelter, SmartBind are registered trademarks of Wibu-Systems.

Portions of this software are copyright © 2012 University of New South Wales. All rights reserved.

© 2001-2006 Michael David Adams
© 1999-2000 Image Power, Inc.
© 1999-2000 The University of British Columbia

This software is based in part on the work of the Independent JPEG Group.

© 1991-2013 Unicode, Inc. All rights reserved.

The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc.

Portions of this software are copyright © 1996-2002, 2006 The FreeType Project (www.freetype.org). All rights reserved.

© ParaType, 2003

EMC2, EMC, Captiva, ISIS and PixTools are registered trademarks, and QuickScan is a trademark of EMC Corporation.

Kodak is a registered trademark of Eastman Kodak Company.

.NET, Access, Active Directory, ActiveX, Aero, Excel, Hyper-V, InfoPath, Internet Explorer, JScript, Microsoft, Office, Outlook, PowerPoint, SharePoint, Silverlight, SQL Azure, SQL Server, Visual Basic, Visual C++, Visual C#, Visual Studio, Windows, Windows Azure, Windows Power Shell, Windows Server, Windows Vista, Word are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.

All other trademarks are the property of their respective owners.


Navigation: »No topics above this level«

Return to chapter overview

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


Select Element to Exclude dialog box

Select Element to Exclude dialog box

Property | Description
Tree of elements | Selects an element in the tree of elements whose region will be excluded from the search area.
Repeating instance | Selects an instance for a Repeating Group element. For details, see Using instances of a Repeating Group as reference, excluded or source elements.


Navigation: »No topics above this level«

Return to chapter overview

Glossary


Navigation: »No topics above this level«

Return to chapter overview

Glossary

Glossary

A B C D E H M N O P R S


Region hypothesis

Navigation: »No topics above this level«

Return to chapter overview

Region hypothesis

A hypothesis generated for a Region element has no specific methods or properties. The non-specific methods and properties are described in the Hypotheses for all types of elements section.


Barcode hypothesis

Barcode hypothesis

Parameter | Description
String Value() | The value of the recognized barcode


Currency hypothesis

Parameter | Description
Rect CurrencyNameRect() | The rectangle which contains the name of the currency. Empty if no currency name has been found.
Rect FractionalPartRect() | The rectangle which contains digits following the separator Empty if there is no fractional part.
Rect IntegerPartRect() | The rectangle which contains digits before the separator. Always not empty.
Real Value() | The found numerical value.
String CurrencyName() | The found currency name. Returns an empty string if the currency name is not found.


Date hypothesis

Parameter | Description
Int Day() | The value of the day in the date.
Int Month() | The value of the month in the date.
Int Year() | The value of the year in the date.
String Value() | The value of the recognized text on the image within the region of the hypothesis.


Phone hypothesis

Parameter | Description
Rect PrefixRect() | rectangle which contains the phone prefix. Empty if the prefix is not found.
String Prefix () | The found phone prefix. Returns an empty string if the prefix is not found.
String Value() | The value of the recognized text in the region of the hypothesis.


Static Text hypothesis

Parameter | Description
Distance LineHeight( Int n ) | The height of the rectangle of the text line with the index n.
Distance LineWidth( Int n ) | The width of the rectangle of the text line with the index n.
Int KeywordCount( ) | Returns the number of keywords in the string specified in SearchText which corresponds to a found string.
Int LineCount() | The number of lines in the text of the hypothesis.
Rect LineRect( Int n ) | The rectangle of the text line with the index n. note Note.The rectangles obtained through this function are sorted in accordance with their positions on the page, top down. The rectangles with smaller indexes are located higher up on the page (the index changes from 0 to LineCount() - 1)
String Keyword( Int index ) | Retrieves a keyword by its index in the string specified in SearchText which corresponds to a found string. Indexing starts from zero.
String Value() | The value of the recognized text on the image within the region of the hypothesis.
XCoordinate LineLeft( Int n ) | The X-coordinate of the left-most point of the rectangle of the text line with the index n.
XCoordinate LineRight( Int n ) | The X-coordinate of the right-most point of the rectangle of the text line with the index n.
XCoordinate LineXCenter( Int n ) | The X-coordinate of the center of the rectangle of the text line with the index n.
YCoordinate LineBottom( Int n ) | The Y-coordinate of the bottom point of the rectangle of the text line with the index n.
YCoordinate LineTop( Int n ) | The Y-coordinate of the top-most point of the rectangle of the text line with the index n.
YCoordinate LineYCenter( Int n ) | The Y-coordinate of the center of the rectangle of the text line with the index n.


Table Column hypothesis

From the hypothesis of the table element you can gain read-only access to the detected columns. To call a detected table, use the method Column( TableBlockColumn ). See the description of the hypothesis of the table element.

Parameter | Description
Distance Width() | The width of the column
Logic HasLeftSeparator() | Shows whether the column has a black separator on the left
Logic HasRightSeparator() | Shows whether the column has a black separator on the right
Logic HasLeftSeparatorInHeader() | Shows whether the column name has a black separator on the left
Logic HasRightSeparatorInHeader() | Shows whether the column name has a black separator on the right
String Name() | Column name
XCoordinate Left() | The left boundary of the column
XCoordinate Right() | The right boundary of the column


ID_BATCH_DELETE_PAGE_DATA

Delete Page Data


ID_SET_MATCHED_CLASS_AS_REFERENCE

Set Matched Result as Reference


ID_WINDOW_CLASSIFIER_LOG

Log


IDC_SHOW_ELEMENTS_BROWSER

Show element references browser


IDD_DELETE_PAGE_DATA--__CAPTION__

Select Data to Delete


IDD_DELETE_PAGE_DATA--IDC_DELETE_ETALON_LAYOUT

Reference layout


IDD_DELETE_PAGE_DATA--IDC_DELETE_EXTRACTED_IMAGE_OBJECTS

Extracted image objects


IDD_DELETE_PAGE_DATA--IDC_DELETE_MATCHED_LAYOUT

Matched layout


IDD_DELETE_PAGE_DATA--IDC_DELETE_TRAINING_LAYOUT

Training layout


IDD_SH_ABOUT--__CAPTION__

About ABBYY FlexiLayout Studio 12


IDD_SH_ABOUT--IDC_SYSINFO

System Info...


IDD_SH_ADD_ABSOLUTE_SEARCH_AREA--IDC_PAGES_STATIC

Pages


IDD_SH_ADD_ABSOLUTE_SEARCH_AREA--IDC_RANGE_STATIC

Range


IDD_SH_ADD_ABSOLUTE_SEARCH_AREA--IDC_SEARCH_REGION_STATIC

Region


IDD_SH_ADD_CURRENCY_NAME--__CAPTION__

Add Currency Name


IDD_SH_ADD_FIXED_COLUMN_SET--__CAPTION__

Add Fixed Column Order


IDD_SH_ADD_FIXED_COLUMN_SET--IDC_FIXED_COLUMN_SET_ALL_TABLE_COLUMNS

List1


IDD_SH_ADD_FIXED_COLUMN_SET--IDC_FIXED_COLUMN_SET_SELECTED_TABLE_COLUMNS

List2


IDD_SH_ADD_FIXED_COLUMN_SET--IDC_ORDER_NAME

Order name


IDD_SH_ADD_IMAGES_FROM_FOLDER--__CAPTION__

Add Images from Folder...


IDD_SH_ADD_IMAGES_FROM_FOLDER--IDC_ADD_RECURSIVE

Add images from subfolders


IDD_SH_ADD_IMAGES_FROM_FOLDER--IDC_IMAGE_PREPROCESSING

Image Preprocessing Settings...


IDD_SH_ADD_IMAGES_FROM_FOLDER--IDC_IMPORT_FROM_BATCHES

Import pages from FLS projects


IDD_SH_ADD_IMAGES_FROM_FOLDER--IDC_PAGE_REFERENCE_SETTINGS

Import Pages from FLS Project...


IDD_SH_ADD_PHONE_CODE_BRACKETS--__CAPTION__

Add Phone Code Brackets


IDD_SH_ADD_PHONE_CODE_BRACKETS--IDC_STATIC_RESTRANS_AUTO_165

Opening symbol


IDD_SH_ADD_PHONE_CODE_BRACKETS--IDC_STATIC_RESTRANS_AUTO_166

Closing symbol


IDD_SH_ADD_PHONE_PREFIX_KEYWORD--__CAPTION__

Add Phone Prefix


IDD_SH_ADD_RELATION--__CAPTION__

Add Relation


IDD_SH_ADD_RELATION--IDC_STATIC_RESTRANS_AUTO_60

Relation


IDD_SH_ADD_RELATION--IDC_STATIC_RESTRANS_AUTO_61

Reference element


IDD_SH_ADD_RELATION--IDC_STATIC_RESTRANS_AUTO_62

Element boundary


IDD_SH_ADD_RELATION--IDC_STATIC_RESTRANS_AUTO_63

Offset


IDD_SH_ADVANCED_PRERECOGNITION_SETTINGS_DIALOG--IDC_STATIC_RESTRANS_AUTO_436

Named entity recognition


IDD_SH_ALPHABET_PARTS--IDC_STATIC_RESTRANS_AUTO_77

Percentage of alphabet characters


IDD_SH_ALPHABET_PARTS--IDC_STATIC_RESTRANS_AUTO_80

Code page


IDD_SH_ASSEMBLING_SETTINGS--__CAPTION__

Assemble to Reference Documents


IDD_SH_ASSEMBLING_SETTINGS--IDC_CHECK_FIRST_PAGE_AS_HEADER

First page of document matches Header


IDD_SH_ASSEMBLING_SETTINGS--IDC_RADIO_GROUP_PAGES

Group by page count


IDD_SH_ASSEMBLING_SETTINGS--IDC_RADIO_ONE_DOC

One document


IDD_SH_ASSEMBLING_SETTINGS--IDOK

OK


IDD_SH_CHOOSE_ELEMENT_PARAMETERS--__CAPTION__

Choose Trained Element Parameters


IDD_SH_CHOOSE_ELEMENT_PARAMETERS--IDC_STATIC_RESTRANS_AUTO_316

Show


IDD_SH_CHOOSE_ELEMENT_PARAMETERS--IDOK

Apply Changes


IDD_SH_CHOOSE_ELEMENT_RELATIONS_CREATED--__CAPTION__

Choose Trained Element Relations


IDD_SH_CHOOSE_ELEMENT_RELATIONS_CREATED--IDC_GO_TO_PAGE

Go to Page...


IDD_SH_CHOOSE_ELEMENT_RELATIONS_CREATED--IDOK

Save Changes


IDD_SH_CHOOSE_ELEMENTS_TO_CREATE_RELATIONS--__CAPTION__

Select Element


IDD_SH_CHOOSE_RELATION_OFFSETS--__CAPTION__

Choose Trained Relations Offsets


IDD_SH_CHOOSE_RELATION_OFFSETS--IDOK

Apply Changes


IDD_SH_CREATE_NEW_BACKUP--__CAPTION__

Create New Backup


IDD_SH_CREATE_NEW_PROJECT--__CAPTION__

Create New Project


IDD_SH_EDIT_RELATION--IDC_CHOOSE_RELATION_BY_PICTURE

Choose...


IDD_SH_EDIT_RELATION--IDC_RELATION_GROUP

Relation


IDD_SH_EDIT_RELATION--IDC_SHOW_RELATION_PICTURE

Use preview to adjust relation


IDD_SH_EDIT_RELATION--IDC_STATIC_RESTRANS_AUTO_333

Type


IDD_SH_EDIT_RELATION--IDC_STATIC_RESTRANS_AUTO_334

Reference boundary


IDD_SH_EDIT_RELATION--IDOK

Save Changes


IDD_SH_ELEMENT_BROWSER_SEARCH--IDC_CASE_SENSITIVE

aBc


IDD_SH_ELEMENT_CHOICE--__CAPTION__

Select Element


IDD_SH_ELEMENT_CHOICE--IDC_INSTANCE_ID_STATIC

Repeating instance


IDD_SH_ELEMENT_CHOICE--IDOK

OK


IDD_SH_ELEMENT_TYPE_CHOICE--__CAPTION__

Select Element Type


IDD_SH_EXPORT_IMAGES_TO_FOLDER--__CAPTION__

Export Images to Folder...


IDD_SH_EXPORT_IMAGES_TO_FOLDER--IDC_EXPORT_OPTIONS

Export options...


IDD_SH_EXPORT_PAGE_IMAGE_DETAILS--IDC_REWRITE_EXISTING

Rewrite existing files


IDD_SH_EXT_FILE_DIALOG--IDC_IMAGE_PREPROCESSING

Image Preprocessing Settings...


IDD_SH_GLOBAL_FIND_REPLACE--__CAPTION__

Find in Advanced Code


IDD_SH_GLOBAL_FIND_REPLACE--IDC_EXTERNAL_VARIABLES_CHECK

External fields


IDD_SH_GLOBAL_FIND_REPLACE--IDC_FIND

Find All


IDD_SH_GLOBAL_FIND_REPLACE--IDC_MATCH_CASE

Match case


IDD_SH_GLOBAL_FIND_REPLACE--IDC_PRESEARCH_CHECK

Advanced pre-search relations


IDD_SH_GLOBAL_FIND_REPLACE--IDC_PRESEARCH_FOR_ALL_CHECK

Advanced pre-search relations for all instances


IDD_SH_GLOBAL_FIND_REPLACE--IDC_REGION_EXPRESSION_CHECK

Region expression


IDD_SH_GLOBAL_FIND_REPLACE--IDC_REPLACE

Replace All


IDD_SH_GLOBAL_FIND_REPLACE--IDC_STATIC_RESTRANS_AUTO_186

Find what


IDD_SH_GLOBAL_FIND_REPLACE--IDC_STATIC_RESTRANS_AUTO_187

Replace with


IDD_SH_GLOBAL_FIND_REPLACE--IDC_STATIC_RESTRANS_AUTO_188

Results


IDD_SH_HEADER_FOOTER--IDC_CHECK_LAST_PAGE_AS_FOOTER

Last page of document matches Footer


IDD_SH_IMAGE_PREPROCESING--__CAPTION__

Image Preprocessing Settings


IDD_SH_IMAGE_PREPROCESING--IDC_ALWAYS_TRUST_PDF_TEXT

Prefer PDF text layer if available


IDD_SH_IMAGE_PREPROCESING--IDC_ASSEMBLE_REFERENCE_DOCUMENTS

Assemble to reference documents


IDD_SH_IMAGE_PREPROCESING--IDC_AUTO_MODE_TRUST_PDF_TEXT

Auto (FlexiLayout Studio will choose between PDF text layer and OCR)


IDD_SH_IMAGE_PREPROCESING--IDC_CH_USE_BASE_IE

Basic image processing


IDD_SH_IMAGE_PREPROCESING--IDC_CH_USE_IE_PROFILE

Use image enhancement profile


IDD_SH_IMAGE_PREPROCESING--IDC_CH_USE_SPECIAL_PHOTO_PROFILE

Use special profile for photos


IDD_SH_IMAGE_PREPROCESING--IDC_CHECK_ALLOW_LIBRE_OFFICE

Allow the use of LibreOffice®


IDD_SH_IMAGE_PREPROCESING--IDC_CHECK_ALLOW_MICROSOFT_OFFICE

Allow the use of Microsoft® Office


IDD_SH_IMAGE_PREPROCESING--IDC_CONVERT_IMAGES_TO_BW

Convert color and gray images to black and white


IDD_SH_IMAGE_PREPROCESING--IDC_CORRECT_SKEW_BY_SEPARATORS

Use separators to correct skew


IDD_SH_IMAGE_PREPROCESING--IDC_CORRECT_SKEW_BY_SQUARES

Use black squares to correct skew


IDD_SH_IMAGE_PREPROCESING--IDC_CORRECT_SKEW_BY_TEXT

Use text to correct skew


IDD_SH_IMAGE_PREPROCESING--IDC_INSTANT_IE_SETTINGS

Settings...


IDD_SH_IMAGE_PREPROCESING--IDC_MS_OFFICE_AUTHENTICATION

Authentication...


IDD_SH_IMAGE_PREPROCESING--IDC_NEVER_TRUST_PDF_TEXT

Use OCR only


IDD_SH_IMAGE_PREPROCESING--IDC_RADIO_BY_PAGES_COUNT

Group by page count


IDD_SH_IMAGE_PREPROCESING--IDC_RADIO_DOC_PER_FILE

One document per file


IDD_SH_IMAGE_PREPROCESING--IDC_RECOGNIZE_IMAGES_ON_ADDING

Pre-recognize images on adding


IDD_SH_IMPORT_PARAMS_DIALOG--IDC_PAGE_REFERENCE_SETTINGS

Page Import Settings...


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_CORRECT_SKEW_BY_ANCHORS

Use black squares to correct skew


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_CORRECT_SKEW_BY_SEPARATORS

Use separators to correct skew


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_CORRECT_SKEW_BY_TEXT

Use text to correct skew


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_IMAGE_PREPROCESSING_CONVERT_BW

Convert color and gray images to black-and-white


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_IMAGE_PREPROCESSING_DESPCKLE

Despeckle images


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_IMAGE_PREPROCESSING_ROTATE_MODE

Rotate images by


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_CHECK_TREAT_IMAGE_AS_PHOTO

Correct resolution of photos


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_IE_AUTOCROP

Autocrop


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_IE_IDC_REDUCE_ISO_NOISE

Reduce ISO noise


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_IE_WHITEN_BG

Whiten background


IDD_SH_INSTANT_IMAGE_ENCHANCEMENT--IDC_REMOVE_ALL_COLOR_MARKS

Remove all color marks


IDD_SH_MEASURE_TOOL_WINDOW--__CAPTION__

Measure Tool


IDD_SH_MEASURE_TOOL_WINDOW--IDC_CLIPBOARD_COPY_CHECK

Automatically copy results to Clipboard


IDD_SH_PAGE_REFERENCE_SETTINGS--__CAPTION__

Page Import Settings


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_CREATE_NEW_BATCHES

Create new batches


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_CREATE_NEW_CLASS

Always create new alternative/class


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_CUSTOM_PREFIX

Custom prefix


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_IMPORT_TO_CURRENT_BATCH

Import all pages to current batch


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_KEEP_REFERENCE_CLASS

Maintain page reference alternative/class (will be set to <None> if unchecked)


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_PREFIX_PROJECT_NAME

Project name


IDD_SH_PAGE_REFERENCE_SETTINGS--IDC_USE_EXISTING_CLASS

Use alternative/class of the same name if exist


IDD_SH_PROJECT_IMAGE_ENHANCEMENT_PROFILES--__CAPTION__

Image Enhancement Profiles


IDD_SH_PROJECT_IMAGE_ENHANCEMENT_PROFILES--IDC_IMPORT_PROFILES

Import...


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_ADD_FOOTER

Footer


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_ADD_HEADER

Header


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_AND_ELEMENT

Group


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_AREA

Region


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_BARCODE

Barcode


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_CURRENCY

Currency


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_DATE

Date


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_FIRSTFOUND_ELEMENT

First Found


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_IMAGEOBJECT

Object Collection


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_KEYVALUE

Labeled Field


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_LETTER_CHAINE

Character String


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_NER

Named Entity


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_REPEATABLEGROUP

Repeating Group


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_SEPARATOR

Separator


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_STATIC_TEXT

Static Text


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_TABLE

Table


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_TELEPHONE

Phone


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_TEXT_CHAIN

Paragraph


IDR_ADD_ELEMENT_SUBMENU--ID_TEMPLATE_ELEMENTS_NEW_WHITE_GAP

White Gap


IDR_BATCH_VIEW_CLASSIFIER--ID_CREATE_FLEXILAYOUT_NAME

Create Class by Source Folder


IDR_BATCH_VIEW_CLASSIFIER--ID_SET_MATCHED_CLASS_AS_REFERENCE

Set Classification Result as Reference


IDR_BATCH_VIEW_CLASSIFIER--ID_TRAIN_AUTOCLASSIFIER

Train Auto-Classifier on Training Set


IDR_BATCH_VIEW_FLEXILAYOUT--ID_ASSEMBLE_TO_DOCUMENTS

Assemble to Reference Documents...


IDR_BATCH_VIEW_FLEXILAYOUT--ID_BATCH_DELETE_PAGE_DATA

Delete Page Data...


IDR_BATCH_VIEW_FLEXILAYOUT--ID_BATCH_SAVE_MATCHED_LAYOUT_STUB

Copy Matched Layout to Reference


IDR_BATCH_VIEW_FLEXILAYOUT--ID_CHANGE_HEADER_FOOTER

Change Reference Header/Footer...


IDR_BATCH_VIEW_FLEXILAYOUT--ID_CORRECT_PAGE_ORIENTATION

Correct Orientation


IDR_BATCH_VIEW_FLEXILAYOUT--ID_DISASSEMBLE_DOCUMENTS

Disassemble Reference Documents


IDR_BATCH_VIEW_FLEXILAYOUT--ID_EDIT_CLEAR

Delete Pages


IDR_BATCH_VIEW_FLEXILAYOUT--ID_FLEXILAYOUT_NAME_FIRST

Clear Alternative


IDR_BATCH_VIEW_FLEXILAYOUT--ID_IMPORT_IMAGES_FROM_PROJECT

Import Pages from FLS Project...


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MARK_SELECTED_PAGES

Add Selected Pages to Training Set


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MATCH_CURRENT_LAYOUT

Match Selected Alternative


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MATCH_DOCUMENT

Match Reference Document


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MATCH_FOOTER

Test Footer


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MATCH_HEADER

Test Header


IDR_BATCH_VIEW_FLEXILAYOUT--ID_MOVE_SELECTED_PAGES

Move Pages to Batch...


IDR_BATCH_VIEW_FLEXILAYOUT--ID_SET_REFERENCE_FLEXILAYOUT_NAME

Set Reference FlexiLayout Alternative


IDR_BATCH_VIEW_FLEXILAYOUT--ID_UNMARK_SELECTED_PAGES

Remove Selected Pages from Training Set


IDR_BATCH_VIEW_FLEXILAYOUT--ID_USE_FOR_TRAINING_SELECTED

Replace Training Set with Selected Pages


IDR_BATCH_VIEW_FLEXILAYOUT--IDC_EXPORT_PAGE_IMAGES

Export Pages to Files...


IDR_BATCH_VIEW_FLEXILAYOUT--IDC_EXTRACT_IMAGE_OBJECTS

Pre-Recognize


IDR_BATCH_VIEW_FLEXILAYOUT--IDC_OPTIONS

Properties...


IDR_BATCH_VIEW_FLEXILAYOUT_TRAINING--ID_SET_REFERENCE_FLEXILAYOUT_NAME

Set Reference FlexiLayout Alternative


IDR_BATCH_VIEW_FOR_BATCH--ID_FILE_OPEN_AND_ADD_IMAGES

Add Images...


IDR_CLASSIFICATION_LOG_LOCAL--ID_CLASS_LOG_DISPLAY_HYPOTHESES

Display Hypotheses


IDR_CLASSIFICATION_LOG_LOCAL--ID_EDIT_COPY

Copy Selected Text


IDR_CLASSIFICATION_LOG_LOCAL--IDC_CLEAR_OUTPUT_LOG

Clear Log


IDR_CLASSIFICATION_LOG_LOCAL--IDC_EXPORT_LOG

Export Log


IDR_CLASSIFICATION_NODE_LOCAL--ID_IMPORT_ID_ELEMENT

Import ID...


IDR_CLASSIFICATION_NODE_LOCAL--ID_TEMPLATE_BUILD

Build Classifier


IDR_CLASSIFICATION_NODE_LOCAL--IDC_ADD_CLASSIFICATION_NODE

Add Rule


IDR_CLASSIFICATION_RESULT_LOCAL--IDC_ADD_CLASSIFICATION_RESULT

Add Class


IDR_CLASSIFICATION_RESULT_LOCAL--IDC_DETAILED_STATISTICS

Show Statistics...


IDR_CLASSIFICATION_TREE_LOCAL--ID_TEMPLATE_BUILD

Build Classifier


IDR_CLASSIFICATION_TREE_LOCAL--IDC_OPTIONS

Properties...


IDR_EXPRESSION_ELEMENTS_LIST--ID_REGULAR_ANY_LETTER

Any Letter


IDR_EXPRESSION_ELEMENTS_LIST--ID_REGULAR_CHAR_FROMSET

Character From Set


IDR_HYPOTHESES_LOCAL--IDC_HYPOTHESES_COLLAPSE_ALL

Collapse All


IDR_HYPOTHESES_LOCAL--IDC_HYPOTHESES_EXPAND_ALL

Expand All


IDR_HYPOTHESES_LOCAL--IDC_HYPOTHESES_GO_LEVEL_UP

Go One Level Up


IDR_HYPOTHESES_LOCAL--IDC_HYPOTHESES_SHOW_DETAILS

Show Details


IDR_HYPOTHESES_LOCAL--IDC_HYPOTHESES_TOGGLE_EXPAND_ACTIVE

Expand Active


IDR_HYPOTHESES_LOCAL--IDC_OPTIONS

Element Properties...


IDR_HYPOTHESES_LOCAL--IDC_SHOW_SEARCH_AREA

Show Search Area


IDR_IMAGE_VIEW_CLASSIFIER--ID_EDIT_CLEAR

Delete Pages


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_ADD_HORIZONTAL_SEPARATOR

Add Horizontal Separator


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_ADD_VERTICAL_SEPARATOR

Add Vertical Separator


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_BATCH_GOTO_PAGE

Go to Page...


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_DELETE_SEPARATOR

Delete Separator


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_FLEXILAYOUT_NAME_FIRST

Clear Alternative


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_HIDE_ALL_OBJECTS

Hide All Objects


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_CORRECT_ORIENTATION

Correct Orientation


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_DESPECKLE_PAGE

Despeckle


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_FLIP_HOR_AXIS_PAGE

Flip Horizontally


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_FLIP_VERT_AXIS_PAGE

Flip Vertically


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_INVERT_PAGE

Invert


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_ROTATE_PAGE_90

Rotate Clockwise


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_ROTATE_PAGE_180

Rotate Upside Down


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_OPERATION_ROTATE_PAGE_270

Rotate Counter Clockwise


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_25

25%


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_50

50%


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_100

100%


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_200

200%


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_PAGE_HEIGHT

Fit Height


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_PAGE_WIDTH

Fit Width


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_WHOLE_PAGE

Fit Page


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_ZOOM_IN

Zoom In


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_IMAGE_SCALE_ZOOM_OUT

Zoom Out


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_MATCH_DOCUMENT

Match Reference Document


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_MATCH_ELEMENT

Test Element


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_PAGE_SAVE_MATCHED_LAYOUT

Copy Matched Layout to Reference


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SET_REFERENCE_FLEXILAYOUT_NAME

Set Reference FlexiLayout Alternative


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_ALL_OBJECTS

Show All Objects


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_BARCODE_OBJECTS

Barcodes


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_IMAGE_OBJECTS

Raw Objects


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_PAGE_REFERENCE_CLASS

Show Reference Alternative in Tree


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_RECOGNITION_LINE_OBJECTS

Recognized Lines


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_SEPARATOR_OBJECTS

Separators


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_SHOW_TEXT_OBJECTS

Recognized Words


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_BOX_ADD_PART

Add Region Part


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_BOX_DELETE_PART

Cut Region Part


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_CREATE_BLOCK

Create Block


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_CREATE_BOX

Draw Location


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_CREATE_ELEMENT

Create Element


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_DELETE_BOX

Delete Region


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_HAND

Scroll


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_MEASURE_RECT

Measure Rectangle


IDR_IMAGE_VIEW_FLEXILAYOUT--ID_TOOL_SELECT_BOX

Select


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_EXTRACT_IMAGE_OBJECTS

Pre-Recognize


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_OPTIONS

Properties...


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_SHOW_BOX_NAMES

Show Captions of Regions on Image


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_SHOW_INACTIVE_BOX_NAME

Show Captions of Inactive Regions


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_SHOW_PRERECOGNITION_AREA

Show Pre-Recognition Area


IDR_IMAGE_VIEW_FLEXILAYOUT--IDC_SHOW_SEARCH_AREA

Show Search Area


IDR_IMAGE_VIEW_FLEXILAYOUT--IDD_HIDE_ACTIVE_BOXES

Hide Active Blocks or Elements


IDR_IMAGE_VIEW_TABLE_BLOCK_LOCAL--ID_LOCAL_TABLE_BLOCK_CLEAR

Delete Column


IDR_MAINFRAME--ID_ADD_HORIZONTAL_SEPARATOR

Add Horizontal Separator


IDR_MAINFRAME--ID_ADD_VERTICAL_SEPARATOR

Add Vertical Separator


IDR_MAINFRAME--ID_ASSEMBLE_TO_DOCUMENTS

Assemble to Reference Documents...


IDR_MAINFRAME--ID_BACKUP_MANAGER

Backup Manager...


IDR_MAINFRAME--ID_BATCH_ADD_EDIT_DELETE

Batches...


IDR_MAINFRAME--ID_BATCH_DELETE_PAGE_DATA

Delete Page Data


IDR_MAINFRAME--ID_BATCH_DELETE_PAGES

Delete Pages


IDR_MAINFRAME--ID_BATCH_GOTO_PAGE

Go to Page...


IDR_MAINFRAME--ID_BATCH_SAVE_MATCHED_LAYOUT

Copy Matched Layout to Reference


IDR_MAINFRAME--ID_CHANGE_HEADER_FOOTER

Change Reference Header/Footer...


IDR_MAINFRAME--ID_CLOSE_PROJECT

Close Project


IDR_MAINFRAME--ID_CONVERT_ELEMENT_STUB

Convert Element to ...


IDR_MAINFRAME--ID_CORRECT_PAGE_ORIENTATION

Correct Orientation


IDR_MAINFRAME--ID_CREATE_TREE_BACKUP

Create Backup...


IDR_MAINFRAME--ID_DELETE_SEPARATOR

Delete Separator


IDR_MAINFRAME--ID_DISASSEMBLE_DOCUMENTS

Disassemble Reference Documents


IDR_MAINFRAME--ID_EDIT_CLEAR

Delete


IDR_MAINFRAME--ID_EDIT_COPY

Copy


IDR_MAINFRAME--ID_EDIT_CUT

Cut


IDR_MAINFRAME--ID_EDIT_PASTE

Paste


IDR_MAINFRAME--ID_EDIT_SELECT_ALL

Select All


IDR_MAINFRAME--ID_FILE_EXPORT_TEMPLATE

Export...


IDR_MAINFRAME--ID_FILE_OPEN_AND_ADD_IMAGES

Add Images...


IDR_MAINFRAME--ID_FILE_OPEN_AND_ADD_IMAGES_FROM_FOLDER

Add Images from Folder...


IDR_MAINFRAME--ID_GLOBAL_FIND

Find in Code...


IDR_MAINFRAME--ID_HELP_CONTENTS

Help Topics


IDR_MAINFRAME--ID_HELP_PURCHASE_INFO

How to Buy ABBYY Products


IDR_MAINFRAME--ID_HELP_SENDFEEDBACK

Send Feedback...


IDR_MAINFRAME--ID_HELP_TECHNICAL_SUPPORT

Technical Support


IDR_MAINFRAME--ID_HIDE_ALL_OBJECTS

Hide All Objects


IDR_MAINFRAME--ID_IMAGE_CORRECT_ORIENTATION

Correct Orientation


IDR_MAINFRAME--ID_IMAGE_OPERATION_DESPECKLE_PAGE

Despeckle


IDR_MAINFRAME--ID_IMAGE_OPERATION_FLIP_HOR_AXIS_PAGE

Flip Horizontally


IDR_MAINFRAME--ID_IMAGE_OPERATION_FLIP_VERT_AXIS_PAGE

Flip Vertically


IDR_MAINFRAME--ID_IMAGE_OPERATION_INVERT_PAGE

Invert


IDR_MAINFRAME--ID_IMAGE_OPERATION_ROTATE_PAGE_90

Rotate Clockwise


IDR_MAINFRAME--ID_IMAGE_OPERATION_ROTATE_PAGE_180

Rotate Upside Down


IDR_MAINFRAME--ID_IMAGE_OPERATION_ROTATE_PAGE_270

Rotate Counter Clockwise


IDR_MAINFRAME--ID_IMAGE_SCALE_25

25%


IDR_MAINFRAME--ID_IMAGE_SCALE_50

50%


IDR_MAINFRAME--ID_IMAGE_SCALE_100

100%


IDR_MAINFRAME--ID_IMAGE_SCALE_200

200%


IDR_MAINFRAME--ID_IMAGE_SCALE_PAGE_HEIGHT

Fit to Height


IDR_MAINFRAME--ID_IMAGE_SCALE_PAGE_WIDTH

Fit to Width


IDR_MAINFRAME--ID_IMAGE_SCALE_WHOLE_PAGE

Best Fit


IDR_MAINFRAME--ID_IMAGE_SCALE_ZOOM_IN

Zoom In


IDR_MAINFRAME--ID_IMAGE_SCALE_ZOOM_OUT

Zoom Out


IDR_MAINFRAME--ID_IMPORT_ALTERNATIVE_ELEMENTS

Import Alternative Elements...


IDR_MAINFRAME--ID_IMPORT_IMAGES_FROM_PROJECT

Import Pages from FLS Project...


IDR_MAINFRAME--ID_MATCH_ON_NAVIGATION

Match on Navigation


IDR_MAINFRAME--ID_MATCH_TEMPLATE

Match


IDR_MAINFRAME--ID_MOVE_SELECTED_PAGES

Move Selected Pages to Another Batch


IDR_MAINFRAME--ID_NEW_PROJECT

New Project...


IDR_MAINFRAME--ID_NEXT_DOCUMENT

Next Document


IDR_MAINFRAME--ID_NEXT_PAGE

Next Page


IDR_MAINFRAME--ID_OPEN_PROJECT

Open Project...


IDR_MAINFRAME--ID_PAGE_SAVE_MATCHED_LAYOUT

Copy Matched Layout to Reference


IDR_MAINFRAME--ID_PREV_DOCUMENT

Previous Document


IDR_MAINFRAME--ID_PREVIOUS_PAGE

Previous Page


IDR_MAINFRAME--ID_PROJECT_PROPERTIES

Project Settings...


IDR_MAINFRAME--ID_SAVE

Save


IDR_MAINFRAME--ID_SAVE_AS

Save Project as...


IDR_MAINFRAME--ID_SHOW_ALL_OBJECTS

Show All Objects


IDR_MAINFRAME--ID_SHOW_BARCODE_OBJECTS

Barcodes


IDR_MAINFRAME--ID_SHOW_FUZZY_EDITOR

Fuzzy Interval Editor...


IDR_MAINFRAME--ID_SHOW_IMAGE_OBJECTS

Raw Objects


IDR_MAINFRAME--ID_SHOW_RECOGNITION_LINE_OBJECTS

Recognized Lines


IDR_MAINFRAME--ID_SHOW_SEPARATOR_OBJECTS

Separators


IDR_MAINFRAME--ID_SHOW_TEXT_OBJECTS

Recognized Words


IDR_MAINFRAME--ID_TEMPLATE_DRAFT_ADD_FIELDS_GROUP

Add Group Field


IDR_MAINFRAME--ID_TEMPLATE_OBJECT_DISABLE

Disable Element


IDR_MAINFRAME--ID_TOOL_BOX_ADD_PART

Add Region Part


IDR_MAINFRAME--ID_TOOL_BOX_DELETE_PART

Cut Region Part


IDR_MAINFRAME--ID_TOOL_CREATE_BLOCK

Create Block


IDR_MAINFRAME--ID_TOOL_CREATE_BOX

Draw Location


IDR_MAINFRAME--ID_TOOL_CREATE_ELEMENT

Create Element


IDR_MAINFRAME--ID_TOOL_DELETE_BOX

Delete Region


IDR_MAINFRAME--ID_TOOL_HAND

Scroll


IDR_MAINFRAME--ID_TOOL_MEASURE_RECT

Measure Rectangle


IDR_MAINFRAME--ID_TOOL_SELECT_BOX

Select


IDR_MAINFRAME--ID_TRAINING_ACTIVATE

Training Mode


IDR_MAINFRAME--ID_VIEW_STATUSBAR

Status Bar


IDR_MAINFRAME--ID_WINDOW_BATCH

Batch


IDR_MAINFRAME--ID_WINDOW_CLASSIFIER_LOG

Log


IDR_MAINFRAME--ID_WINDOW_HYPOTHESIS

Hypotheses


IDR_MAINFRAME--ID_WINDOW_PAGE

Image


IDR_MAINFRAME--ID_WINDOW_PROPERTIES

Properties


IDR_MAINFRAME--ID_WINDOW_TEMPLATE

FlexiLayout / Classifier


IDR_MAINFRAME--IDC_APP_EXIT

Exit


IDR_MAINFRAME--IDC_EXTRACT_IMAGE_OBJECTS

Pre-Recognize


IDR_MAINFRAME--IDC_HELP_ABOUT

About


IDR_MAINFRAME--IDC_HELP_TUTORIAL

Tutorial


IDR_MAINFRAME--IDC_PAGE_OPTIONS

Page Properties...


IDR_MAINFRAME--IDC_SHOW_ELEMENTS_BROWSER

Reference browser


IDR_MAINFRAME--IDC_USER_OPTIONS

Options...


IDR_MAINFRAME--IDD_HIDE_ACTIVE_BOXES

Hide Active Blocks or Elements


IDR_MAINFRAME_ELEMENTS_TREE--ID_IMPORT_ALTERNATIVE_ELEMENTS

Import Alternative Elements...


IDR_MAINFRAME_ELEMENTS_TREE--ID_IMPORT_ID_ELEMENT

Import ID...


IDR_MAINFRAME_ELEMENTS_TREE--ID_MATCH_ELEMENT

Test Element


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_BARCODE

Barcode


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_CHECKMARK

Checkmark


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_CHECKMARK_GROUP

Checkmark Group


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_GROUP

Group


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_PICTURE

Picture


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_REPEATABLE_GROUP

Repeating Group


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_TABLE

Table


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_TEXT

Text


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BLOCKS_NEW_UNRECOGNIZABLE

Non-Recognized


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_BUILD

Build


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_OBJECT_DISABLE

Disable Element


IDR_MAINFRAME_ELEMENTS_TREE--ID_TEMPLATE_SAVE

Save


IDR_MAINFRAME_ELEMENTS_TREE--IDC_ADD_CLASSIFICATION_NODE

Add Feature


IDR_MAINFRAME_ELEMENTS_TREE--IDC_TEMPLATE_PROPERTIES

Properties...


IDR_MAINFRAME_ELEMENTS_TREE_FLEXILAYOUT--ID_MATCH_ELEMENT

Test Element


IDR_MAINFRAME_ELEMENTS_TREE_FLEXILAYOUT--ID_MATCH_TEMPLATE

Match


IDR_MAINFRAME_ELEMENTS_TREE_FLEXILAYOUT--ID_TEMPLATE_OBJECT_DISABLE

Disable Element


IDR_PROPERTIES_VIEW_LOCAL--ID_EDIT_COPY

Copy Value


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_ADD_ELEMENT_STUB

Add Element


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_EDIT_CLEAR

Delete


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_EDIT_RENAME

Rename


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_GLOBAL_FIND

Find in Code


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_IMPORT_ALTERNATIVE_ELEMENTS

Import Alternative Elements...


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_TEMPLATE_DELETE_CHILDS

Delete All Child Elements


IDR_TEMPLATE_ALTERNATIVE_LOCAL--ID_TRAIN_ALTERNATIVE_BY_BLOCKS_LAYOUT

Train Alternative


IDR_TEMPLATE_ALTERNATIVE_LOCAL--IDC_OPTIONS

Properties...


IDR_TEMPLATE_BLOCK_LOCAL--ID_EDIT_CLEAR

Delete


IDR_TEMPLATE_BLOCK_LOCAL--ID_EDIT_COPY

Copy


IDR_TEMPLATE_BLOCK_LOCAL--ID_EDIT_CUT

Cut


IDR_TEMPLATE_BLOCK_LOCAL--ID_EDIT_PASTE

Paste


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_BARCODE

Barcode


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_CHECKMARK

Checkmark


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_GROUP

Group


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_PICTURE

Picture


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_TABLE

Table


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_TEXT

Text


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BLOCKS_NEW_UNRECOGNIZABLE

Non-Recognized


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_BUILD

Build FlexiLayout


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_OBJECT_DISABLE

Disable


IDR_TEMPLATE_BLOCK_LOCAL--ID_TEMPLATE_SAVE

Save FlexiLayout


IDR_TEMPLATE_BLOCK_LOCAL--IDC_BLOCKS_MATCHING_STATISTICS

Show Matching Statistics


IDR_TEMPLATE_BLOCK_LOCAL--IDC_OPTIONS

Properties...


IDR_TEMPLATE_BLOCK_LOCAL--IDC_SHOW_ELEMENTS_BROWSER

Show Block References


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_CHECKMARK

Checkmark


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_CHECKMARK_GROUP

Checkmark Group


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_GROUP

Group


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_PICTURE

Picture


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_REPEATABLE_GROUP

Repeating Group


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_TABLE

Table


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_TEXT

Text


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BLOCKS_NEW_UNRECOGNIZABLE

Non-Recognized


IDR_TEMPLATE_BLOCKS_LOCAL--ID_TEMPLATE_BUILD

Build FlexiLayout


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_EDIT_CLEAR

Delete


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_EDIT_COPY

Copy


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_EDIT_CUT

Cut


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_EDIT_PASTE

Paste


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_EDIT_RENAME

Rename


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_GLOBAL_FIND

Find in Code


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_MATCH_ELEMENT

Test Element


IDR_TEMPLATE_ELEMENTS_LOCAL--ID_TEMPLATE_OBJECT_DISABLE

Disable


IDR_TEMPLATE_ELEMENTS_LOCAL--IDC_OPTIONS

Properties...


IDR_TEMPLATE_ELEMENTS_LOCAL--IDC_SHOW_ELEMENTS_BROWSER

Show Element References


IDR_TEMPLATE_LOCAL--ID_ADD_ALL_PAGES_TO_CLASSIFIER_TRAINING_SET

Add All Pages to Training Set


IDR_TEMPLATE_LOCAL--ID_EDIT_PASTE

Paste


IDR_TEMPLATE_LOCAL--ID_EDIT_RENAME

Rename


IDR_TEMPLATE_LOCAL--ID_IMPORT_ALTERNATIVE

Import FlexiLayout Alternatives...


IDR_TEMPLATE_LOCAL--ID_REMOVE_ALL_PAGES_FROM_CLASSIFIER_TRAINING_SET

Remove All Pages from Training Set


IDR_TEMPLATE_LOCAL--ID_SELECT_ALTERNATIVE_LAYOUT_STUB

Pin FlexiLayout Alternative


IDR_TEMPLATE_LOCAL--ID_TEMPLATE_ADD_LAYOUT

Add FlexiLayout Alternative


IDR_TEMPLATE_LOCAL--ID_TEMPLATE_BUILD

Build FlexiLayout


IDR_TEMPLATE_LOCAL--ID_TEMPLATE_SAVE

Save FlexiLayout


IDR_TEMPLATE_LOCAL--IDC_OPTIONS

Properties...


IDR_TRAIN_ALTERNATIVE_SUBMENU--ID_TRAIN_ALTERNATIVE_BY_BLOCKS_AND_TEST

Train and Test Alternative


IDR_TRAINING_FIELDS_LOCAL--ID_DELETE_ALL

Delete All Fields


IDR_TRAINING_FIELDS_LOCAL--ID_EDIT_CLEAR

Delete


IDR_TRAINING_FIELDS_LOCAL--ID_EDIT_RENAME

Rename


IDR_TRAINING_FIELDS_LOCAL--ID_INITIALIZE_FIELDS_BY_BLOCKS

Initialize Fields By Blocks


IDR_TRAINING_FIELDS_LOCAL--ID_SET_ELEMENT_REQUIRED

Required


IDR_TRAINING_FIELDS_LOCAL--ID_TEMPLATE_DRAFT_ADD_FIELD

Add Field


IDR_TRAINING_FIELDS_LOCAL--ID_TEMPLATE_DRAFT_ADD_FIELDS_GROUP

Add Group


IDR_TRAINING_FIELDS_LOCAL--IDC_NOTFOUND

Not Present


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_ADD_AUTOREFERENCES

Add Autoreferences


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_ADD_IDENTIFIERS

Create Identifiers


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_DELETE_ALL

Delete All Static Elements


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_EDIT_CLEAR

Delete


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_EDIT_RENAME

Rename


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_SET_ELEMENT_REQUIRED

Required


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_TEMPLATE_DRAFT_ADD_BARCODE

Add Barcode


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_TEMPLATE_DRAFT_ADD_REF

Add AnchorText


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--ID_TEMPLATE_DRAFT_ADD_SEPARATOR

Add Separator


IDR_TRAINING_STAIC_ELEMENTS_LOCAL--IDC_NOTFOUND

Not Present


Important

warning Important!


IPP_SH_ADVANCED_CONSTRAINTS--__CAPTION__

Advanced


IPP_SH_ADVANCED_CONSTRAINTS--IDC_ELEMENT_TEXT

Code


IPP_SH_ADVANCED_CONSTRAINTS--IDC_STATIC_EXTERNAL_VARS

External fields


IPP_SH_ADVANCED_CONSTRAINTS--IDC_STATIC_POSTSEARCH

Advanced post-search relations


IPP_SH_ADVANCED_CONSTRAINTS--IDC_STATIC_PRESEARCH

Advanced pre-search relations


IPP_SH_AUTOCLASSIFIER_PARAMS--__CAPTION__

Classification


IPP_SH_AUTOCLASSIFIER_PARAMS--IDC_INITIALIZE_TREE_BY_AUTOCLASSIFIER

Run


IPP_SH_AUTOCLASSIFIER_PARAMS--IDC_SHOULD_CREATE_ID_ON_TREE_INIT

Autocreate Features


IPP_SH_AUTOCLASSIFIER_PARAMS--IDC_SHOULD_TRAIN_AUTOCLASSIFIER_ON_TREE_INIT

Train Autoclassifier


IPP_SH_BARCODE_GENERAL--__CAPTION__

Barcode


IPP_SH_BARCODE_GENERAL--IDC_DOWNTOTOP

Bottom-to-Top


IPP_SH_BARCODE_GENERAL--IDC_LEFTTORIGHT

Left-to-Right


IPP_SH_BARCODE_GENERAL--IDC_RIGHTTOLEFT

Right-to-Left


IPP_SH_BARCODE_GENERAL--IDC_STATIC_RESTRANS_AUTO_115

Barcode type


IPP_SH_BARCODE_GENERAL--IDC_TOPTODOWN

Top-to-Bottom


IPP_SH_BLOCK--IDC_CHECK_HAS_REPEATABLE_INSTANCES

Has repeating instances


IPP_SH_BLOCK--IDC_CHECK_REGION_EXPRESSION

Check


IPP_SH_BLOCK--IDC_NUMERATION_STATIC

Instance sort order


IPP_SH_BLOCK--IDC_STATIC_RESTRANS_AUTO_83

Name


IPP_SH_BLOCK--IDC_STATIC_RESTRANS_AUTO_84

Comment


IPP_SH_BLOCK--IDC_USE_REGION_EXPRESSION

Expression


IPP_SH_BLOCK--IDC_USE_SOURCE_ELEMENT

Source element


IPP_SH_CLASSIFICATION_GENERAL--__CAPTION__

Rule


IPP_SH_CLASSIFICATION_GENERAL--IDC_GLOBALLY_REL_CHECK

Uniquely in project


IPP_SH_CLASSIFICATION_GENERAL--IDC_LOCALLY_REL_CHECK

Uniquely on its tree level


IPP_SH_CLASSIFICATION_GENERAL--IDC_STATIC_RESTRANS_AUTO_237

Uniqueness


IPP_SH_CLASSIFICATION_GENERAL--IDC_STATIC_RESTRANS_AUTO_239

Corresponding class


IPP_SH_CLASSIFICATION_GENERAL--IDC_UNRELIABLE_CHECK

Non-uniquely


IPP_SH_CLASSIFICATION_RESULT--IDC_ADD_SIMILAR_LAYOUTS

Add classes to this classification result


IPP_SH_CLASSIFICATION_RESULT--IDC_CHECK_CLASSIFICATION_BY_TREE

Improve auto-classification result using rule tree


IPP_SH_CLASSIFICATION_RESULT--IDC_EDIT_SIMILAR_LAYOUTS

Edit


IPP_SH_CLASSIFICATION_TREE--__CAPTION__

General


IPP_SH_COLOR_OPTIONS--__CAPTION__

Colors


IPP_SH_COLOR_OPTIONS--IDC_RESET_TEXT_COLOR

Reset


IPP_SH_COLOR_OPTIONS--IDC_RESET_TEXT_COLOR_ALL

Reset All


IPP_SH_COLOR_OPTIONS--IDC_SHOW_IMAGE_BW

Show image in black and white


IPP_SH_CONSTANTS--__CAPTION__

Constants


IPP_SH_CONSTANTS--IDC_ADD_CONST

Add...


IPP_SH_CONSTANTS--IDC_DELETE_CONST

Delete


IPP_SH_CONSTANTS--IDC_EDIT_CONST

Edit...


IPP_SH_CURRENCY_GENERAL--__CAPTION__

Currency


IPP_SH_CURRENCY_GENERAL--IDC_ADD_NAME

Add...


IPP_SH_CURRENCY_GENERAL--IDC_CHECK_LEFTNAME

Left of value


IPP_SH_CURRENCY_GENERAL--IDC_CHECK_RIGHTNAME

Right of value


IPP_SH_CURRENCY_GENERAL--IDC_CURRENCY_POS

Currency name position


IPP_SH_CURRENCY_GENERAL--IDC_DELETE_NAME

Delete


IPP_SH_CURRENCY_GENERAL--IDC_EDIT_NAME

Edit...


IPP_SH_CURRENCY_GENERAL--IDC_OMISSION_QUALITY_STATIC

Missing name penalty


IPP_SH_CURRENCY_GENERAL--IDC_OMIT_FRACTAL_PART

Allow missing fractional part


IPP_SH_CURRENCY_GENERAL--IDC_OMIT_SEPARATOR

Allow missing separator


IPP_SH_CURRENCY_GENERAL--IDC_POSSIBLE_SEPARTORS_STATIC

Fractional part separators


IPP_SH_CURRENCY_GENERAL--IDC_STATIC_RESTRANS_AUTO_153

Currency names


IPP_SH_CURRENCY_GENERAL--IDC_STATIC_RESTRANS_AUTO_154

Minimum value


IPP_SH_CURRENCY_GENERAL--IDC_STATIC_RESTRANS_AUTO_155

Maximum value


IPP_SH_DATE_GENERAL--__CAPTION__

Date


IPP_SH_DATE_GENERAL--IDC_DAYMONTHYEAR

Day, month, year


IPP_SH_DATE_GENERAL--IDC_DAYWITHOUTZERO

Single digit


IPP_SH_DATE_GENERAL--IDC_DAYWITHZERO

Two digits


IPP_SH_DATE_GENERAL--IDC_DIGITSNOZERO

Single digit


IPP_SH_DATE_GENERAL--IDC_DIGITSWITHOUTZERO

Two digits


IPP_SH_DATE_GENERAL--IDC_MAX_DATE

DateTimePicker2


IPP_SH_DATE_GENERAL--IDC_MIN_DATE

DateTimePicker1


IPP_SH_DATE_GENERAL--IDC_MONTHDAYYEAR

Month, day, year


IPP_SH_DATE_GENERAL--IDC_STATIC_RESTRANS_AUTO_123

Languages


IPP_SH_DATE_GENERAL--IDC_STATIC_RESTRANS_AUTO_124

Separators


IPP_SH_DATE_GENERAL--IDC_STATIC_RESTRANS_AUTO_130

Max space length


IPP_SH_DATE_GENERAL--IDC_WORD

Word


IPP_SH_DATE_GENERAL--IDC_YEARDAYMONTH

Year, day, month


IPP_SH_DATE_GENERAL--IDC_YEARFOURDIGIT

Four digits


IPP_SH_DATE_GENERAL--IDC_YEARMONTHDAY

Year, month, day


IPP_SH_DATE_GENERAL--IDC_YEARTWODIGIT

Two digits


IPP_SH_ELEMENT_GENERAL--__CAPTION__

General


IPP_SH_ELEMENT_GENERAL--IDC_DONTFIND_CAPTION

Do not find element if


IPP_SH_ELEMENT_GENERAL--IDC_MAX_HYP_COUNT_STATIC

Number of surviving hypotheses


IPP_SH_ELEMENT_GENERAL--IDC_NULL_QUALITY_STATIC

Null hypothesis quality


IPP_SH_ELEMENT_GENERAL--IDC_STATIC_FOUND_SUBELEMENTS

Min number of found subelements


IPP_SH_ELEMENT_GENERAL--IDC_STATIC_RESTRANS_AUTO_131

Name


IPP_SH_ELEMENT_GENERAL--IDC_STATIC_RESTRANS_AUTO_132

Full name


IPP_SH_ELEMENT_GENERAL--IDC_STATIC_RESTRANS_AUTO_133

Comment


IPP_SH_ERRORS--__CAPTION__

Errors


IPP_SH_IMAGE--__CAPTION__

Image


IPP_SH_IMAGEOBJECT_GENERAL--__CAPTION__

Object Collection


IPP_SH_IMAGEOBJECT_GENERAL--IDC_STATIC_RESTRANS_AUTO_111

Min height


IPP_SH_IMAGEOBJECT_GENERAL--IDC_STATIC_RESTRANS_AUTO_114

Max width


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_BARCODE

Barcode


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_CHECKMARK

Checkmark


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_INVERTED

Inverted text


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_PICTURE

Picture


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_PUNCTUATIONMARK

Punctuation mark


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_SEPARATOR

Separator


IPP_SH_IMAGEOBJECT_GENERAL--IDC_TYPE_TEXT

Text


IPP_SH_KEY_VALUE_CURR_EXT--IDC_STATIC_RESTRANS_AUTO_216

Currency names


IPP_SH_KEY_VALUE_FV_EXT--IDC_ERRORS_PERCENT_STATIC

Max error percentage


IPP_SH_KEY_VALUE_FV_EXT--IDC_STATIC_RESTRANS_AUTO_208

Max space length


IPP_SH_KEY_VALUE_KEY_PARAMS--__CAPTION__

Label


IPP_SH_KEY_VALUE_KEY_PARAMS--IDC_CHECK_CONSIDER_SPACES

Take spaces into account


IPP_SH_KEY_VALUE_KEY_PARAMS--IDC_ERRORS_PERCENT_STATIC

Max error percentage


IPP_SH_KEY_VALUE_NUM_EXT--IDC_DETECT_SIGN

Take sign into account


IPP_SH_KEY_VALUE_NUM_EXT--IDC_STATIC_RESTRANS_AUTO_210

Value interval


IPP_SH_KEY_VALUE_NUM_EXT--IDC_STATIC_RESTRANS_AUTO_214

Signs and Separators


IPP_SH_KEY_VALUE_PHONE_EXT--IDC_STATIC_RESTRANS_AUTO_217

Min number of digits


IPP_SH_KEY_VALUE_PHONE_EXT--IDC_STATIC_RESTRANS_AUTO_218

Max number of digits


IPP_SH_KEY_VALUE_POSITION--__CAPTION__

Field Position


IPP_SH_KEY_VALUE_POSITION--IDC_CHECK_DETECT_GAP

Detect indent size


IPP_SH_KEY_VALUE_POSITION--IDC_MIN_GAP_WIDTH_STATIC

Minimum space


IPP_SH_KEY_VALUE_POSITION--IDC_STATIC_RESTRANS_AUTO_223

Field position


IPP_SH_KEY_VALUE_POSITION--IDC_STATIC_RESTRANS_AUTO_224

Field alignment


IPP_SH_KEY_VALUE_POSITION--IDC_STATIC_RESTRANS_AUTO_225

Search area width


IPP_SH_KEY_VALUE_POSITION--IDC_STATIC_RESTRANS_AUTO_226

Search area height


IPP_SH_KEY_VALUE_VALUE_PARAMS--__CAPTION__

Field


IPP_SH_KEY_VALUE_VALUE_PARAMS--IDC_STATIC_RESTRANS_AUTO_228

Field content


IPP_SH_LETTERCHAIN_GENERAL--__CAPTION__

Character String


IPP_SH_LETTERCHAIN_GENERAL--IDC_ADD_ALPHABET_PART

Add...


IPP_SH_LETTERCHAIN_GENERAL--IDC_ALLOW_INTERSECTED_ALPHABET_PARTS

Allow embedded hypotheses


IPP_SH_LETTERCHAIN_GENERAL--IDC_DELETE_ALPHABET_PART

Delete


IPP_SH_LETTERCHAIN_GENERAL--IDC_EDIT_ALPHABET_PART

Edit...


IPP_SH_LETTERCHAIN_GENERAL--IDC_MANUAL_WORDS_CHECK

Detect words by interword space


IPP_SH_LETTERCHAIN_GENERAL--IDC_MIN_GAP_STATIC

Min interword space


IPP_SH_LETTERCHAIN_GENERAL--IDC_RADIO_ALPHABETS

Alphabets


IPP_SH_LETTERCHAIN_GENERAL--IDC_RADIO_REGULAR_EXPRESSION

Regular expression


IPP_SH_LETTERCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_72

Percentage of non-alphabet characters


IPP_SH_LETTERCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_74

Max space length


IPP_SH_LETTERCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_75

Character count


IPP_SH_LETTERCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_76

Word count


IPP_SH_LETTERCHAIN_GENERAL--IDC_WHOLE_WORDS_CHECK

Whole words only


IPP_SH_NER_GENERAL--CAPTION

Named Entity Recognition


IPP_SH_NUMBER--IDC_CAN_BE_FRACTIONAL

Can be fractional


IPP_SH_ORIENTATION_AND_UNITS_OPTIONS--__CAPTION__

Orientation And Units


IPP_SH_ORIENTATION_AND_UNITS_OPTIONS--IDC_CLOCKWISE_CHECK

Rotated 90° clockwise


IPP_SH_ORIENTATION_AND_UNITS_OPTIONS--IDC_CORRECT_ORIENTATIONS

Correct orientations of pages


IPP_SH_ORIENTATION_AND_UNITS_OPTIONS--IDC_COUNTERCLOCKWISE_CHECK

Rotated 90° counterclockwise


IPP_SH_ORIENTATION_AND_UNITS_OPTIONS--IDC_UPSIDEDOWN_CHECK

Rotated 180°


IPP_SH_OTHER_OPTIONS--__CAPTION__

Other


IPP_SH_PRERECOGNITION_ADVANCED--IDC_BARCODES_DISABLE

Disable barcode extraction


IPP_SH_PRERECOGNITION_ADVANCED--IDC_CJK_PROHIBIT_VERTICAL_TEXT

Horizontal text only


IPP_SH_PRERECOGNITION_ADVANCED--IDC_CJK_SEPARATED_FURIGANA

Separated furigana mode


IPP_SH_PRERECOGNITION_ADVANCED--IDC_EXTRACT_2D_BARCODES

Extract 2D barcodes: Data Matrix, Aztec, QR Code


IPP_SH_PRERECOGNITION_ADVANCED--EXTRACT_POST_BARCODES

Extract post barcodes


IPP_SH_PRERECOGNITION_ADVANCED--IDC_SHOULD_ECTRACT_NER

Extract named entities


IPP_SH_PRERECOGNITION_ADVANCED--IDC_STATIC_RESTRANS_AUTO_435

CJK


IPP_SH_PRERECOGNITION_ADVANCED--IDC_STATIC_RESTRANS_AUTO_438

Vertical text extraction


IPP_SH_PRERECOGNITION_ADVANCED--IDC_TEXT_EXTRACTION_THOROUGH

Thorough extraction mode


IPP_SH_PRERECOGNITION_GENERAL--IDC_BALANCED_MODE

Balanced


IPP_SH_PRERECOGNITION_GENERAL--IDC_FAST_MODE

Fast


IPP_SH_PRERECOGNITION_GENERAL--IDC_FULL_MODE

Thorough


IPP_SH_PRERECOGNITION_GENERAL--IDC_TEXTTYPE_MATRIX

Matrix printer


IPP_SH_PRERECOGNITION_GENERAL--IDC_TEXTTYPE_NORMAL

Typographic


IPP_SH_PRERECOGNITION_GENERAL--IDC_TEXTTYPE_TYPEWRITER

Typewriter


IPP_SH_PROTECTION--__CAPTION__

Protection


IPP_SH_PROTECTION--IDC_SIGN_TEMPLATE

Sign FlexiLayout


IPP_SH_PROTECTION--IDC_STATIC_RESTRANS_AUTO_73

Name of author


IPP_SH_PROTECTION--IDC_STATIC_RESTRANS_AUTO_74

Component name


IPP_SH_PROTECTION--IDC_STATIC_RESTRANS_AUTO_75

License info


IPP_SH_RELATIONS--__CAPTION__

Relations


IPP_SH_RELATIONS--IDC_ADD_RELATION

Add


IPP_SH_RELATIONS--IDC_DUPLICATE_RELATION

Duplicate


IPP_SH_RELATIONS--IDC_EDIT_RELATION

Edit


IPP_SH_RELATIONS--IDC_ELEMENT_STATIC

Reference element


IPP_SH_RELATIONS--IDC_NEAREST_CHECK

Nearest


IPP_SH_RELATIONS--IDC_NEAREST_STATIC

To


IPP_SH_RELATIONS--IDC_REMOVE_RELATION

Remove


IPP_SH_RELATIONS--IDC_Y_STATIC

Y


IPP_SH_REPEATABLE_GENERAL--__CAPTION__

Repeating Group


IPP_SH_REPEATABLE_GENERAL--IDC_DOCUMENT_MODE

Document mode


IPP_SH_REPEATABLE_GENERAL--IDC_MAX_REP_ON_PAGE_STATIC

Max repetitions on page


IPP_SH_REPEATABLE_GENERAL--IDC_MAX_REP_STATIC

Max repetitions


IPP_SH_REPEATABLE_GENERAL--IDC_MIN_REP_ON_PAGE_STATIC

Min repetitions on page


IPP_SH_REPEATABLE_GENERAL--IDC_MIN_REP_STATIC

Min repetitions


IPP_SH_REPEATABLE_GENERAL--IDC_PAGINAL_MODE

Page mode


IPP_SH_SEARCH_CONSTRAINTS--__CAPTION__

Search Constraints


IPP_SH_SEARCH_CONSTRAINTS--IDC_ABS_CONSTRAINTS_CHECK

Absolute search area constraints


IPP_SH_SEARCH_CONSTRAINTS--IDC_ADD_ABS_AREA

Add...


IPP_SH_SEARCH_CONSTRAINTS--IDC_ADD_EXCLUDE

Add...


IPP_SH_SEARCH_CONSTRAINTS--IDC_CLOCKWISE

Top-down


IPP_SH_SEARCH_CONSTRAINTS--IDC_COUNTERCLOCKWISE

Bottom-up


IPP_SH_SEARCH_CONSTRAINTS--IDC_STATIC_RESTRANS_AUTO_41

Exclude regions of elements


IPP_SH_SEARCH_CONSTRAINTS--IDC_VERTICAL_TEXT

Search through vertical text


IPP_SH_SEPARATOR_GENERAL--__CAPTION__

Separator


IPP_SH_SEPARATOR_GENERAL--IDC_HORIZONTAL

Horizontal


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_43

Min length


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_44

Max length


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_45

Min relative length (%)


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_46

Penalty limit for length


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_49

Max length


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_50

Max relative length (%)


IPP_SH_SEPARATOR_GENERAL--IDC_STATIC_RESTRANS_AUTO_51

Orthogonal shift


IPP_SH_SEPARATOR_GENERAL--IDC_VERTICAL

Vertical


IPP_SH_SEPARATOR_GENERAL--IDC_WITHIN_SEARCHAREA

Fits entirely within search area


IPP_SH_STATICTEXT_GENERAL--__CAPTION__

Static Text


IPP_SH_STATICTEXT_GENERAL--IDC_BREAK_LINE_PENALTY_STATIC

Line break penalty


IPP_SH_STATICTEXT_GENERAL--IDC_BTN_BROWSE_SEARCH_FILE

Browse...


IPP_SH_STATICTEXT_GENERAL--IDC_CASE_SENSITIVE_CHECK

Match case


IPP_SH_STATICTEXT_GENERAL--IDC_CHECK_CONSIDER_SPACES

Take spaces into account


IPP_SH_STATICTEXT_GENERAL--IDC_ENABLE_ERRORS_COUNT

Max number of errors


IPP_SH_STATICTEXT_GENERAL--IDC_ERRORS_PERCENT_STATIC

Max error percentage


IPP_SH_STATICTEXT_GENERAL--IDC_MULTILINE

Permit multiple lines


IPP_SH_STATICTEXT_GENERAL--IDC_OMISSION_PENALTY_STATIC

Missing word penalty


IPP_SH_STATICTEXT_GENERAL--IDC_OMIT_WORDS

Permit missing words


IPP_SH_STATICTEXT_GENERAL--IDC_RADIO_SEARCH_FROM_DB

Search text from database


IPP_SH_STATICTEXT_GENERAL--IDC_RADIO_SEARCH_FROM_FILE

Search text from file


IPP_SH_STATICTEXT_GENERAL--IDC_RADIO_SEARCH_TEXT

Search text


IPP_SH_STATICTEXT_GENERAL--IDC_STATIC_CONNECTION_STRING

Connection string


IPP_SH_STATICTEXT_GENERAL--IDC_STATIC_QUERY_TEXT

Query text


IPP_SH_STATICTEXT_GENERAL--IDC_STATIC_RESTRANS_AUTO_38

Max space length


IPP_SH_STATICTEXT_GENERAL--IDC_WHOLE_WORDS_CHECK

Whole words only


IPP_SH_TABLE_BLOCK--__CAPTION__

Columns


IPP_SH_TABLE_BLOCK--IDC_ADD_TABLE_COLUMN

Add...


IPP_SH_TABLE_BLOCK--IDC_EDIT_TABLE_COLUMN

Edit...


IPP_SH_TABLE_COLUMN--IDC_CHECK_TABLE_COLUMN_HAS_SEARCH_AREA

Absolute area constraints


IPP_SH_TABLE_COLUMN--IDC_STATIC_LEFT

Left boundary


IPP_SH_TABLE_COLUMN--IDC_STATIC_NULL_CONTENT_QUALITY

Missing content penalty


IPP_SH_TABLE_COLUMN--IDC_STATIC_NULL_KEYWORD_QUALITY

Missing keyword penalty


IPP_SH_TABLE_COLUMN--IDC_STATIC_REGEXP

Regular expression


IPP_SH_TABLE_COLUMN--IDC_STATIC_RIGHT

Right boundary


IPP_SH_TABLE_COLUMN--IDC_STATIC_TYPE_CONTENT

Type of column content


IPP_SH_TABLE_COLUMN--IDC_TABLE_COLUMN_CHECK_CONTENT_TYPE

Check content type


IPP_SH_TABLE_COLUMN--IDC_TABLE_COLUMN_MULTILINE

Multi-line name


IPP_SH_TABLE_COLUMN--IDC_TABLE_COLUMN_SEARCH_COLUMN_BY_KEYWORD

Detect by keyword in name


IPP_SH_TABLE_COLUMN--IDC_TABLE_COLUMN_USE_FOUNDED_ELEMENT

Use found element as column name


IPP_SH_TABLE_COLUMN--IDC_TABLE_COLUMN_WHOLE_WORDS

Whole words only


IPP_SH_TABLE_COLUMNS--__CAPTION__

Columns


IPP_SH_TABLE_COLUMNS--IDC_EDIT_COLUMN_ENABLE

Enable


IPP_SH_TABLE_COLUMNS--IDC_EDIT_COLUMN_PROPERTIES

Properties...


IPP_SH_TABLE_COLUMNS--IDC_TABLE_BLOCK_COLUMNS_LIST

List1


IPP_SH_TABLE_COLUMNS--IDC_TABLE_COLUMNS_ORDER_CHOOSE_BLOCK

Select


IPP_SH_TABLE_COLUMNS_ORDER--__CAPTION__

Order


IPP_SH_TABLE_COLUMNS_ORDER--IDC_ADD_ALLOWED_COLUMN_ORDER

Add...


IPP_SH_TABLE_COLUMNS_ORDER--IDC_ADD_FIXED_COLUMN_SET

Add...


IPP_SH_TABLE_COLUMNS_ORDER--IDC_DELETE_ALLOWED_COLUMN_ORDER

Delete


IPP_SH_TABLE_COLUMNS_ORDER--IDC_EDIT_ALLOWED_COLUMN_ORDER

Edit...


IPP_SH_TABLE_COLUMNS_ORDER--IDC_EDIT_FIXED_COLUMN_SET

Edit...


IPP_SH_TABLE_COLUMNS_ORDER--IDC_TABLE_ORDER_ALLOWED_ORDERS_CHECK

Rules for column order


IPP_SH_TABLE_COLUMNS_ORDER--IDC_TABLE_ORDER_FIXED_SETS_CHECK

Fixed column order


IPP_SH_TABLE_FOOTER--__CAPTION__

Footer


IPP_SH_TABLE_FOOTER--IDC_CHECK_SEARCH_TABLE_FOOTER

Look for footer


IPP_SH_TABLE_FOOTER--IDC_CHECK_TABLE_FOOTER_EACH_PAGE

Footer is on each page


IPP_SH_TABLE_FOOTER--IDC_CHECK_TABLE_FOOTER_HAS_SEARCH_AREA

Absolute area constraints


IPP_SH_TABLE_FOOTER--IDC_CHECK_TABLE_FOOTER_REQUIRED

Footer is optional


IPP_SH_TABLE_FOOTER--IDC_CHECK_TABLE_FOOTER_WHOLE_WORDS

Whole words only


IPP_SH_TABLE_FOOTER--IDC_NULL_QUALITY_STATIC

Null hypothesis quality


IPP_SH_TABLE_FOOTER--IDC_TABLE_FOOTER_SEARCH_BY_KEYWORD

Search by keyword


IPP_SH_TABLE_FOOTER--IDC_TABLE_FOOTER_USE_HYPOTESIS

Use found element as footer


IPP_SH_TABLE_HEADER--__CAPTION__

Header


IPP_SH_TABLE_HEADER--IDC_CHECK_SEARCH_TABLE_HEADER

Look for header


IPP_SH_TABLE_HEADER--IDC_CHECK_TABLE_HEADER_EACH_PAGE

Header is on each page


IPP_SH_TABLE_HEADER--IDC_CHECK_TABLE_HEADER_HAS_SEARCH_AREA

Absolute area constraints


IPP_SH_TABLE_HEADER--IDC_CHECK_TABLE_HEADER_REQUIRED

Header is optional


IPP_SH_TABLE_HEADER--IDC_HYPOTHESES_COUNT_STATIC

Number of hypotheses


IPP_SH_TABLE_HEADER--IDC_NULL_QUALITY_STATIC

Null hypothesis quality


IPP_SH_TABLE_SEARCH_ROWS--__CAPTION__

Rows


IPP_SH_TABLE_SEARCH_ROWS--IDC_STATIC_RESTRANS_AUTO_170

Words not to be treated as a separate line of text


IPP_SH_TABLE_SEARCH_ROWS--IDC_TABLE_STRINGS_ROW_ONE_STRING

One line of text corresponds to one row


IPP_SH_TABLE_SEARCH_ROWS--IDC_TABLE_STRINGS_SELECT_AUTO

Detect rows automatically


IPP_SH_TABLE_SEARCH_ROWS--IDC_TABLE_STRINGS_SELECT_STRING_BY_COLUMN

Use master columns to detect rows


IPP_SH_TABLE_SEARCH_ROWS--IDC_VALUE_COLUMN_TEXT_ALIGNMENT_STATIC

Master column text alignment


IPP_SH_TELEPHONE_GENERAL--IDC_ADD_TELEPHONE_DELIMETERS

Add...


IPP_SH_TELEPHONE_GENERAL--IDC_ADD_TELEPHONE_PREFIX

Add...


IPP_SH_TELEPHONE_GENERAL--IDC_CHECK_PHONE_CODE_IN_BRACKETS_ALLOWED

Area code/city code brackets


IPP_SH_TELEPHONE_GENERAL--IDC_DELETE_TELEPHONE_DELIMETERS

Delete


IPP_SH_TELEPHONE_GENERAL--IDC_DELETE_TELEPHONE_PREFIX

Delete


IPP_SH_TELEPHONE_GENERAL--IDC_EDIT_TELEPHONE_DELIMETERS

Edit...


IPP_SH_TELEPHONE_GENERAL--IDC_EDIT_TELEPHONE_PREFIX

Edit...


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_158

Prefixes for phone numbers


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_159

Missing prefix penalty


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_160

Minimum number of digits


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_161

Possible digit separators


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_162

Maximum number of digits


IPP_SH_TELEPHONE_GENERAL--IDC_STATIC_RESTRANS_AUTO_163

Max space length


IPP_SH_TEMPLATE--__CAPTION__

General


IPP_SH_TEMPLATE--IDC_ADVANCED_PRERECOGNITION_PARAMS

Advanced Pre-recognition Properties...


IPP_SH_TEMPLATE--IDC_ALOW_MULTIPAGE_DOCS

Allow multi-page documents


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_65

Name


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_66

Version


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_67

Comment


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_68

Text languages


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_70

Minimum number of pages


IPP_SH_TEMPLATE--IDC_STATIC_RESTRANS_AUTO_71

Maximum number of pages


IPP_SH_TEXTCHAIN_GENERAL--__CAPTION__

Paragraph


IPP_SH_TEXTCHAIN_GENERAL--IDC_ALLOW_FIRST_LINE_INDENT

Allow first line indent


IPP_SH_TEXTCHAIN_GENERAL--IDC_ALLOW_HANGING_LINE

Allow "hanging" line


IPP_SH_TEXTCHAIN_GENERAL--IDC_IGNORE_SEP_CHECK

Ignore separators


IPP_SH_TEXTCHAIN_GENERAL--IDC_SHOULD_FILTER_STAMP

Remove stamp


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_89

Min line count


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_90

Max line count


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_93

Alignment


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_94

Max disalignment


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_97

Max space in line


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_98

Max interline space


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_99

Max relative interline space


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_102

Min line height


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_103

Max line height


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_104

Min line width


IPP_SH_TEXTCHAIN_GENERAL--IDC_STATIC_RESTRANS_AUTO_105

Max line width


IPP_SH_TEXTCHAIN_GENERAL--IDC_WHOLE_WORDS_CHECK

Whole words only


IPP_SH_TRAINING--__CAPTION__

Training


IPP_SH_TRAINING--IDC_AUTOPREDICT

Predict layout automatically on navigation


IPP_SH_TRAINING--IDC_REPLACE_ON_PREDICTION

Replace existing regions of fields on batch prediction


IPP_SH_WHITEGAP_GENERAL--__CAPTION__

White Gap


IPP_SH_WHITEGAP_GENERAL--IDC_HORIZONTAL

Horizontal


IPP_SH_WHITEGAP_GENERAL--IDC_MIN_BREADTH_STATIC

Min width


IPP_SH_WHITEGAP_GENERAL--IDC_STATIC_RESTRANS_AUTO_57

Lower threshold limit


IPP_SH_WHITEGAP_GENERAL--IDC_STATIC_RESTRANS_AUTO_58

Upper threshold limit


IPP_SH_WHITEGAP_GENERAL--IDC_STATIC_RESTRANS_AUTO_59

Threshold coefficient (%)


IPP_SH_WHITEGAP_GENERAL--IDC_TYPE_TEXT

Text


IPP_SH_WHITEGAP_GENERAL--IDC_VERTICAL

Vertical


MSG_FFS_BARCODE_ORIENTATION

Orientation


MSG_FFS_BARCODE_SUSPICIOUS_SYMBOLS_COUNT

Number of suspicious characters


MSG_FFS_BARCODE_TYPE_EAN13

EAN13


MSG_FFS_CURRENCY_NAME_RECT

Currency name rect


MSG_FFS_CURRENCY_NAME_VALUE

Currency name


MSG_FFS_CURRENCY_VALUE

Value


MSG_FFS_DATE_DAY

Day


MSG_FFS_DATE_MONTH

Month


MSG_FFS_DATE_YEAR

Year


MSG_FFS_DEFAULT_MAIN_ELEMENT_NAME

SearchElements


MSG_FFS_DIRECTION

Orientation


MSG_FFS_HYPOTHESIS_TEXT

Text


MSG_FFS_OBJECT_TYPE_ANY_TEXT

Raw Text


MSG_FFS_SEPARATOR_GAP_LENGTH

Space length


MSG_FFS_SEPARATOR_ORTOGONAL_DISTANCE

Orthogonal shift


MSG_FFS_SEPARATOR_RELATIVE_GAP_LENGTH

Relative space length


MSG_FFS_SEPARATOR_RELATIVE_LENGTH

Relative length


MSG_FFS_TABLE_BODY_FOUND

Body found


MSG_FFS_TABLE_COLUMNS_ORDER_NAME

Order name


MSG_FFS_TABLE_FOOTER_FOUND

Footer found


MSG_FFS_TABLE_FOUND_COLUMNS

Found columns


MSG_FFS_TABLE_HEADER_FOUND

Header found


MSG_FFS_TABLE_ROWS_NUMBER

Number of rows


MSG_FFS_TELEPHONE_NUMBER

Number


MSG_FFS_TELEPHONE_PREFIX_RECT

Prefix rect


MSG_FFS_TELEPHONE_PREFIX_VALUE

Prefix


MSG_FFS_WHITE_GAP_CREATION_LEVEL

White Gap threshold


MSG_FFS_WHITE_GAP_CURRENT_LEVEL

Histogram maximum within hypothesis


MSG_FFS_WHITE_GAP_HISTOGRAM_MAX

Histogram maximum in search area


MSG_SH_ADD_ALPHABET_PART

Add New Alphabet


MSG_SH_ADD_COLUMN_ORDER_RULE_DIALOG_EDIT_COLUMN_FOR_DETECT_CAPTION

Select Master Columns


MSG_SH_ADD_COLUMN_ORDER_RULE_DIALOG_EDIT_RULE_CAPTION

Edit Column Order Rule


MSG_SH_ADD_CURRENCY_NAME_DIALOG_EDIT_CAPTION

Edit Currency Name


MSG_SH_ADD_EXCLUDE_ELEMENT_CAPTION

Select Element to Exclude


MSG_SH_ADD_FIXED_COLUMNS_SET_DIALOG_EDIT_CAPTION

Edit Fixed Column Order


MSG_SH_ADD_NEW_ALTERNATIVE

Create new alternative...


MSG_SH_ADD_PHONE_CODE_BRACKETS_DIALOG_EDIT_CAPTION

Edit Phone Code Brackets


MSG_SH_ADD_PHONE_PREFIX_DIALOG_EDIT_CAPTION

Edit Phone Prefix


MSG_SH_ADD_REALTION_CAPTION

Add New Relation of %0


MSG_SH_ADD_TABLE_COLUMN_DIALOG_EDIT_CAPTION

Edit Table Column


MSG_SH_ADVANCED_CAPTION_FOR_COLLECTION

Advanced for All Instances


MSG_SH_ADVANCED_POSTSEARCH_FOR_COLLECTION

Advanced post-search relations for all instances


MSG_SH_ADVANCED_PRESEARCH_FOR_COLLECTION

Advanced pre-search relations for all instances


MSG_SH_ALL

All


MSG_SH_ALL_NAMES_CLASSIFICATION_STATISTICS_CAPTION

Classification Statistics


MSG_SH_AS_FOUND

In order of finding


MSG_SH_BATCH_CAPTION

Batch


MSG_SH_CHOOSE_RELATION_BY_PICTURE_CAPTION

Choose relation parameters by picture


MSG_SH_CLASSIFICATION_LOG_TITLE

Log


MSG_SH_CLASSIFICATION_MODE_AUTO

Auto


MSG_SH_CLASSIFICATION_MODE_AUTO_TREE

Auto Rule Tree


MSG_SH_CLASSIFICATION_MODE_TREE

Rule Tree


MSG_SH_CLASSIFICATION_STAT_CLASSIFIED_SIMILAR

Classified as extra


MSG_SH_CLASSIFICATION_STAT_FUZZY_CLASSIFIED

Fuzzy classified


MSG_SH_CLASSIFICATION_STAT_NOT_CLASSIFIED

Not classified


MSG_SH_CLASSIFICATION_STAT_SUCCEEDED

Succeeded


MSG_SH_CLASSIFICATION_STAT_WRONGLY_CLASSIFIED

Wrongly classified


MSG_SH_CLASSIFICATOR_VIEW_CAPTION

Classifier


MSG_SH_CLASSIFY

Classify


MSG_SH_CLASSIFYING

Classifying pages...


MSG_SH_COL_ANALYZED

Analyzed


MSG_SH_COL_AREA_ADDED

Excess Areas


MSG_SH_COL_AREA_REMOVED

Missing Areas


MSG_SH_COL_CLASSIFICATION_RES

Classification Result


MSG_SH_COL_CLASSIFIED

Classification Fidelity


MSG_SH_COL_COMMENT

Comment


MSG_SH_COL_ETALON_CLASSIFICATION_RES

Reference Class


MSG_SH_COL_ETALON_DOC

Reference Document Number


MSG_SH_COL_ETALON_MATCH_RES

Reference Alternative


MSG_SH_COL_ETALON_TYPE

Reference Sequence Number


MSG_SH_COL_MARKED

Training Layout State


MSG_SH_COL_MATCH_QUALITY

Match Quality


MSG_SH_COL_MATCH_RES

Matched Alternative


MSG_SH_COL_MATCHED_DOC

Matched Document Number


MSG_SH_COL_MATCHED_TYPE

Matched Sequence Number


MSG_SH_COL_NUMBER

Page No.


MSG_SH_COL_RECOGNIZED

Pre-recognized


MSG_SH_COL_SOURCE

Source


MSG_SH_COL_USED_FOR_TRAINING

Use for Training


MSG_SH_CORRECT_ELEMENT_RELATIONS

Correct Relations Offsets


MSG_SH_DELETE_ACTIVE_BOXES

Delete Active Regions


MSG_SH_DIFFERENCE_LAYOUT

Difference layout


MSG_SH_DISTANCE

Offset


MSG_SH_EDIT_ALPHABET_PART

Edit Alphabet


MSG_SH_EMPTY_PROPERTIES_DIALOG_CAPTION

Properties


MSG_SH_ENABLE

Enable


MSG_SH_ETALON_LAYOUT

Reference layout


MSG_SH_EVEN

Even


MSG_SH_EXPORT_CLASSIFIER

Export Classifier


MSG_SH_EXPORT_LOG

Export classification log


MSG_SH_EXPORT_TEMPLATE

Export FlexiLayout


MSG_SH_EXTERNAL_VARIABLES_CAPTION_FOR_COLLECTION

External Fields for All Instances


MSG_SH_FFS_CLASSIFIER_PROJECT_FILES

ABBYY Classifier Project Files (*.fcp)


MSG_SH_FFS_FLEXILAYOUT_PROJECT_FILES

ABBYY FlexiLayout Project Files (*.fsp)


MSG_SH_FILTER_COLUMN

Set Filter


MSG_SH_FIT_ALL_COLUMNS_WIDTH

Fit All Columns Width


MSG_SH_FIT_COLUMN_WIDTH

Fit Column Width


MSG_SH_GO_TO_NEXT_DOCUMENT_COMMAND

Next document


MSG_SH_GO_TO_PREV_DOCUMENT_COMMAND

Previous document


MSG_SH_HYPOTHESIS_VIEW_CAPTION

Tree of Hypotheses


MSG_SH_IMAGE_OBJECT_TYPE

Object type


MSG_SH_LAST

Last


MSG_SH_LAYOUT_MODE_BLOCKS

Blocks


MSG_SH_LEFT_TO_RIGHT

Left to right


MSG_SH_LETTERSET

Character Set


MSG_SH_MAKE_SUFFIX_CONTINIOUSLY

continiously


MSG_SH_MATCHED_LAYOUT

Matched layout


MSG_SH_MATCHING_TEMPLATE

Matching the FlexiLayout...


MSG_SH_NEAREST_BOTTOM

Page bottom edge


MSG_SH_NEAREST_ELEMENT

Element


MSG_SH_NEAREST_LEFT

Page left edge


MSG_SH_NEAREST_POINT

Point


MSG_SH_NEAREST_RIGHT

Page right edge


MSG_SH_NEAREST_TOP

Page top edge


MSG_SH_NEAREST_X

X coordinate


MSG_SH_NEAREST_Y

Y coordinate


MSG_SH_ODD

Odd


MSG_SH_OPEN_IMAGE_CAPTION

Open Images


MSG_SH_OPEN_PROJECT

Open Project


MSG_SH_PAGE_SEQUENCE_NUMBER_FOOTER

Footer


MSG_SH_PAGE_SEQUENCE_NUMBER_HEADER

Header


MSG_SH_PARAMETER_NAME_COL

Parameter name


MSG_SH_PART_BOTTOM

Bottom


MSG_SH_PART_LEFT

Left


MSG_SH_PART_RIGHT

Right


MSG_SH_PART_TOP

Top


MSG_SH_PART_WHOLE

<whole>


MSG_SH_PRERECOGNIZE_PAGES_COMMAND

Pre-recognize


MSG_SH_PROPERIES_VIEW_CAPTION

Properties


MSG_SH_PROPERTY_BARCODEORIENTATION

Orientation


MSG_SH_PROPERTY_BLOCKTYPE_BARCODE

Barcode


MSG_SH_PROPERTY_BLOCKTYPE_CHECKMARK

Checkmark


MSG_SH_PROPERTY_BLOCKTYPE_PICTURE

Picture


MSG_SH_PROPERTY_BLOCKTYPE_TEXT

Text


MSG_SH_PROPERTY_BLOCKTYPE_UNRECOGNIZABLE

Non-Recognized Block


MSG_SH_PROPERTY_BO_DOWNTOTOP

Bottom-to-Top


MSG_SH_PROPERTY_BO_LEFTTORIGHT

Left-to-Right


MSG_SH_PROPERTY_BO_RIGHTTOLEFT

Right-to-Left


MSG_SH_PROPERTY_BO_TOPTODOWN

Top-to-Bottom


MSG_SH_PROPERTY_DATYPE

Data type


MSG_SH_PROPERTY_DATYPECHECKMARK

Checkmark


MSG_SH_PROPERTY_DATYPEINVERTED

Inverted text


MSG_SH_PROPERTY_DATYPEPICTURE

Picture


MSG_SH_PROPERTY_DATYPEPUNCTMARK

Punctuation mark


MSG_SH_PROPERTY_DATYPETEXT

Text


MSG_SH_PROPERTY_DIRECTION

Orientation


MSG_SH_PROPERTY_ELEMENT_TYPE

Type


MSG_SH_PROPERTY_FLEXILAYOUT_NAMES_TYPENAME

Classes


MSG_SH_PROPERTY_HEIGHT

Height


MSG_SH_PROPERTY_HYPOTHESIS_CHAIN_QUALITY

Chain quality


MSG_SH_PROPERTY_HYPOTHESIS_ELEMENT_NAME

Element name


MSG_SH_PROPERTY_HYPOTHESIS_IS_FOUND

Detected


MSG_SH_PROPERTY_HYPOTHESIS_IS_FROM_BEST_PATH

From the best path


MSG_SH_PROPERTY_HYPOTHESIS_PAGE

Page


MSG_SH_PROPERTY_HYPOTHESIS_PARAMETERS_QUALITY

Pre-search quality


MSG_SH_PROPERTY_HYPOTHESIS_RELATIONS_QUALITY

Post-search quality


MSG_SH_PROPERTY_HYPOTHESIS_SURROUND_RECT

Surrounding rect


MSG_SH_PROPERTY_PAGE_TYPENAME

Image


MSG_SH_PROPERTY_SURROUND_RECT

Surrounding rect


MSG_SH_PROPERTY_TABLE_BLOCK_NAME

Table block


MSG_SH_PROPERTY_TABLEBLOCK_TABLE

Columns


MSG_SH_PROPERTY_WIDTH

Width


MSG_SH_RANGE

Range


MSG_SH_RECOGNITION_LINE_IMAGE_OBJECT

Recognized line


MSG_SH_RELATION_TYPE_ABOVE

Above


MSG_SH_RELATION_TYPE_BELOW

Below


MSG_SH_RELATION_TYPE_LEFT

Left of


MSG_SH_RELATION_TYPE_RIGHT

Right of


MSG_SH_RIGHT_TO_LEFT

Right to left


MSG_SH_SAVE_AS

Save Copy


MSG_SH_SEPARATOR_IMAGE_OBJECT

Separator


MSG_SH_SET_REFERENCE_CLASS

Set Reference Class


MSG_SH_SHOW_ALL_PARAMETERS

all parameters


MSG_SH_SHOW_ALL_RELATIONS

all relations


MSG_SH_SHOW_CHANGED_PARAMETERS

modified parameters only


MSG_SH_SHOW_CHANGED_RELATIONS

modified relations only


MSG_SH_SHOW_ELEMENT_REFERENCES_COMMAND

Show element references


MSG_SH_TABLE_COLUMN_CONTENT_TYPE_CURRENCY

Currency


MSG_SH_TABLE_COLUMN_CONTENT_TYPE_DATE

Date


MSG_SH_TABLE_COLUMN_CONTENT_TYPE_NUMBER

Number


MSG_SH_TABLE_COLUMN_CONTENT_TYPE_REGULAR_EXPRESSION

Regular expression


MSG_SH_TABLE_COLUMN_CONTENT_TYPE_TEXT

Text


MSG_SH_TABLE_COLUMN_DATYPE

Type


MSG_SH_TEMPLATE_VIEW_CAPTION

FlexiLayout


MSG_SH_TOOL_CREATE_BLOCK

Create Block


MSG_SH_TOP_TO_BOTTOM

Top to bottom


MSG_SH_TRAIN_ELEMENT_PARAMETERS

Train Element Parameters


MSG_SH_TRAIN_ELEMENT_RELATIONS

Generate Element Relations


MSG_SH_VALUE_ALIGN_BOTTOM

Bottom


MSG_SH_VALUE_ALIGN_LEFT

Left


MSG_SH_VALUE_ALIGN_RIGHT

Right


MSG_SH_VALUE_ALIGN_TOP

Top


MSG_SH_VALUE_TYPE_ANY

Any text


MSG_SH_VALUE_TYPE_CURRENCY

Currency


MSG_SH_VALUE_TYPE_DATE

Date


MSG_SH_VALUE_TYPE_NUMBER

Number


MSG_SH_VALUE_TYPE_PHONE

Phone


MSG_SH_VALUE_TYPE_STATIC

Fixed variants


MSG_SH_VERTICAL_TEXT_FOR_ALL_LANGUAGES

Extract for all languages


MSG_SH_VERTICAL_TEXT_FOR_CJK_ONLY

Extract for CJK languages


MSG_SH_VERTICAL_TEXT_NO_EXTRACTION

Do not extract


MSG_SH_WHOLE_PAGE_REGION

<whole page>


Note

note Note.


See_also

See also:


RESOURCE_ID

RESOURCE_TEXT


See_also

Tip.


Sample 1. Introduction

Show/Hide Hidden Text

Sample 1. Introduction

warning Important!For the sake of simplicity, a one-page document is used in this sample.

This sample document is a typical example of a registration form for which a FlexiLayout must be created. You will go through all the steps required to create a FlexiLayout that will detect the following elements: Static Text, Character String, Barcode, Paragraph, Date, Separator, and Object Collection.

The ultimate goal is to create a FlexiLayout which will enable ABBYY FlexiCapture to locate the following fields on all the test pages:

·NAME

·YOUR PLANET NAME

·YOUR SPACESHIP NUMBER

·DATE YOU ARRIVED AT THE EARTH

·YOUR IDENTITY NUMBER ON THE PARTY

·YOUR PHOTO IN FANCY DRESS

Additionally, the FlexiLayout must enable FlexiCapture to find a text field in which the guest has entered the information he or she managed to find about Halloween. Unlike all the above fields, the exact name of this field is not known in advance.

Show me...

sample1