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.

  1. Open the locator properties.
  2. On the General tab, add reference documents.
  3. On the Zones tab, select CheckReader as the A2iA Reader.

    The Custom Subfields tab becomes enabled.

  4. Click the Custom Subfields tab.
  5. 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>."

  6. With the new custom subfield selected, add an output path.
    1. In the Properties section, click Add.

      The A2iA Output Path for Custom Subfield window appears where you select or enter the output path.

    2. 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.

    3. 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.

    4. 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 and enter the desired characters.
    5. 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.
  7. If the custom subfield uses multiple output paths, do the following:
    1. Add output paths by repeating the previous step.
    2. 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.
    3. In the Delimiter field, enter the characters used as a delimiter between the output paths.
  8. In the Location field, select or enter the location of the subfield data.
    1. Click Browse to the right of the field.

      The Location for Custom Subfield window appears.

    2. 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.

    3. 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.

  9. In the Confidence field, select or enter the path for the confidence value of the subfield data.
    1. Click Browse to the right of the field.

      The Confidence for Custom Subfield window appears.

    2. 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 or does not contain the expected value, an icon appears. Mouse over the icon for more information.

    3. 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.

  10. Click Close to close the locator properties window.
  11. Save the changes to your project.