Order of multiple matches

The output .json file can contain multiple matches. This tool itself cannot determine which one is correct, but it incorporates scoring facilities through the following features:

  • The score option of the matching rule, or the sum of scores if multiple rules match in a compound rule
  • Fuzzy errors
  • The positional rule's proximity to the anchor
  • The top and left properties of the bounding box
  • Anchor's features, as mentioned above

Considering the above, matches are finally sorted in the following order:

  1. Score
  2. Error (derived from the voc rule)
  3. Proximity
  4. Anchor score
  5. Anchor error
  6. Anchor proximity (of a parent anchor, if any)
  7. Number of matches (provided by a fuzzy match)
  8. Size of the rule list
  9. Top
  10. Left

This sorting mechanism even applies in Blocks, expression, where the use of the same-block positional rule might suggest something different in practice, such as in the case of addresses. This is why we provided a command line with jq in that example.