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:
- Score
- Error (derived from the voc rule)
- Proximity
- Anchor score
- Anchor error
- Anchor proximity (of a parent anchor, if any)
- Number of matches (provided by a fuzzy match)
- Size of the rule list
- Top
- 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.