Create custom subfields for an A2iA Zone Locator
When an A2iA Zone Locator is added to a project and CheckReader as used as the A2iA reader, several predefined custom subfields are included. If you need to extract data that is not available through a predefined custom subfield, you can create your own custom subfield. Each custom subfield has one or more output paths that provide a map to the data you need.
To define an output path, you select the nodes containing the extraction results, location, and confidence values. The values for output paths, location, and confidence correspond with the paths specified in the A2iA Configuration Editor. You can also modify the prefix and regular expressions used to format data that was extracted from the output path.
A custom subfield can contain more than one output path so that you can combine extracted data. The output paths are concatenated in the order you list them, and each path is separated by the delimiter you specify. For example, suppose there are different output paths for the three components that make up a date: the day, the month, and the year. When the date custom subfield returns a value, the three different output paths are concatenated together and separated by the specified delimiter. The end result is a single string made up of three different output paths.
Follow these steps to set up custom subfields.
- Open the locator properties.
- On the General tab, add reference documents.
-
On the
Zones tab, select
CheckReader as the
A2iA
Reader.
The Custom Subfields tab becomes enabled.
- Click the Custom Subfields tab.
-
Create a new custom subfield. In the
Subfields group, click
Add. In place of the default name that appears, type a new descriptive name.
The best practice is to use this naming convention,
SF_<Descriptive Name>.
-
With the new custom subfield selected, add an output path.
-
In the Properties section, click
Add.
The A2iA Output Path for Custom Subfield window is displayed so that you can select or enter the output path.
-
In the
A2iA
Output Path for Custom Subfield window, select the node in the tree containing the desired output path.
The complete path appears in the A2iA Output Path field. You can also type or edit the path in the field.
If you select a node for an array, a placeholder ([?]) appears for the array index number. Replace the question mark inside the brackets with the correct array index, such as [1].
If the path you selected is invalid, an icon appears in the window. Mouse over the icon to view a description of the error.
-
If the path you selected is correct, click
OK.
The A2iA Output Path for Custom Subfield window closes, and the selected path appears in the field in the A2iA Output Path column.
- Optionally, change the Prefix field to enter characters to append to the beginning of the output string before it is processed by the regular expressions. Click the field to enter characters.
-
Optionally, change the
Regex Match and
Regex Replace fields as needed.
These fields enable the data retrieved from an output path to be modified. For example, if the data retrieved from an account subfield is 123456789, and you want to format it as 123-456-789, use the following regular expressions:
-
Regex Match: (\w{3})(\w{3})(\w{3})
-
Regex Replace: $1-$2-$3
Click a field and enter the desired characters.
-
Note If you need to delete an output path, select the row in the Properties table and click the Delete button in the Properties section. Do not click the Delete button in the Subfields section because it deletes a custom subfield. -
In the Properties section, click
Add.
-
If the custom subfield uses multiple output paths, do the following:
- Add output paths by repeating the previous step.
- Set the output paths in the order they should be concatenated. Select an output path and click Move Up or Move Down to change the order.
- In the Delimiter field, enter the characters used as a delimiter between the output paths.
-
In the
Location field, select or enter the location of the subfield data.
-
Click
Browse to the right of the field.
The Location for Custom Subfield window appears.
-
In the
Location for Custom Subfield window, select the node in the tree containing the location of
the subfield data. A location node must contain the following child nodes: x_tl, x_br, y_tl, y_br, and pageIndex.
The complete path appears in the Location field. You can also type or edit the path in the field.
If you select a node for an array, a placeholder ([?]) appears for the array index number. Replace the question mark inside the brackets with the correct array index, such as [1].
If the path you selected is invalid, an icon appears in the window. Mouse over the icon to view a description of the error.
-
If the path you selected is correct, click
OK.
The Location for Custom Subfield window closes, and the selected path appears in the Location field.
-
Click
Browse to the right of the field.
-
In the
Confidence field, select or enter the path for the confidence value of the subfield data.
-
Click
Browse to the right of the field.
The Confidence for Custom Subfield window appears.
-
In the
Confidence for Custom Subfield window, select the node in the tree containing the location of
the subfield data.
The complete path appears in the Confidence field. You can also type or edit the path in the field.
If you select a node for an array, a placeholder ([?]) appears for the array index number. Replace the question mark inside the brackets with the correct array index, such as [1].
If the node is invalid, an icon appears. Mouse over the icon for more information.
-
If the path you selected is correct, click
OK.
The Confidence for Custom Subfield window closes, and the selected path appears in the Confidence field.
-
Click
Browse to the right of the field.
- Click Close to close the locator properties window.
- Save the changes to your project.