Key-Value Pair

Matches cases where a key-value pair occur on the document in a specific layout.

Remarks

Designed for extracting field label / field value pairs, this collation method requires that the host Data Type define exactly 2 extractors. The first extractor is considered the "key", and the second extractor is considered the "value". The output will only include the value component.

Inherits from: Ordered Array

Properties

The following 10 properties are defined.

Property Name Description
General
Enforce Line Boundaries Type: Boolean, Default: False

Indicates whether a line between the key and value should exclude them as a key-value pair. If set to true, excludes pairs from consideration if a horizontal or vertical line separates the key from the value. NOTE: This feature depends on layout data generated by the Line Detection / Line Removal IP commands during Image Processing or Recognize. Please ensure that the input documents have been processed accordingly before using this feature.

Vertical Direction Type: ReadDirection, Default: Forward

Defines the direction in which values will be read. Can be one of the following values:

  • Forward - Matches cases where the key appears first, followed by the value.
  • Reverse - Matches cases where the value appears first, followed by the key.
  • Either - Matches cases where the key and value appear in either order.

Horizontal Direction Type: ReadDirection, Default: Forward

Defines the direction in which values will be read. Can be one of the following values:

  • Forward - Matches cases where the key appears first, followed by the value.
  • Reverse - Matches cases where the value appears first, followed by the key.
  • Either - Matches cases where the key and value appear in either order.

Flow Direction Type: ReadDirection, Default: Forward

Defines the direction in which values will be read. Can be one of the following values:

  • Forward - Matches cases where the key appears first, followed by the value.
  • Reverse - Matches cases where the value appears first, followed by the key.
  • Either - Matches cases where the key and value appear in either order.

Horizontal Layout Type: Horizontal

Enables or disables detection of a horizontal layout. Can be one of the following values:

  • Enabled
  • Disabled

Vertical Layout Type: Vertical

Enables or disables detection of a vertical layout. Can be one of the following values:

  • Enabled
  • Disabled

Flow Layout Type: Flow

Enables or disables detection of a flow layout. Can be one of the following values:

  • Enabled
  • Disabled

Output Element Type: String

Specifies the name of a child extractor or regular expression group when the combine method is set to 'Group'.

Output
Combine Method Type: CombineType, Default: Individual

Defines the method used for constructing the output instances. Can be one of the following values:

  • None - Output instances will not be combined.
  • Individual - The output value will be a concatenation of the individual results, using the configured Output Separator between each instance.
  • Flow - The output value will be an extraction from the original document flow containing all text between the beginning of the first instance and the end of the last instance.
  • Geometric - The output value will be an extraction of all characters falling inside the zone defined by the individual results.
  • Sum - The output value will be the sum of the extracted instances. Any values which cannot be converted to a numeric value will evaulate to zero.
  • Group - The output value will reflect the value of a specific child extractor or regular expression group.

Result Separator Type: String

The separator to be used between each combined instance. The following special escape sequences may be used:

  • \r - Carriage return
  • \n - Line feed
  • \t - Tab
  • \f - Form feed
  • \s - Space

See Also

Flow, Horizontal, Vertical

Used By

Data Type