Description
Return an OCR word-box anchor relative to an origin.
Digital editions connect textual witnesses, anchors, page images and source-specific labels. Literal identifier agreement and numerical offsets preserve a supplied convention without proving textual authority, complete coverage or correct editorial interpretation.
Return an OCR word-box anchor relative to an origin.
When to use this tool
Use OCR Word Origin Affinity when checking supplied edition identifiers, ordering or coordinate conventions.
How to use the tool and how it works
- Enter boxStart, boxEnd, origin, affinity. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read relativeAnchor. Use the output convention below.
Return an OCR word-box anchor relative to an origin. Require boxEnd >= boxStart and affinity start or end; select that endpoint and subtract origin.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| boxStart | Box Start | Required. Finite number. |
| boxEnd | Box End | Required. Finite number. |
| origin | Origin | Required. Finite number. |
| affinity | Affinity | Required. Text; one of "start", "end"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| relativeAnchor | Relative Anchor | Required. Finite number. |
{
"input": {
"boxStart": 10,
"boxEnd": 30,
"origin": 5,
"affinity": "start"
},
"output": {
"relativeAnchor": 5
}
} Limitations and assumptions
- These are supplied coordinates, not text-affinity inference or OCR recognition.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect the original edition and its encoding model before treating local record agreement as meaningful textual or historical evidence.
References
Similar or alternative tools
- TEI Anchor Range Length
Return span length and endpoint offsets for named anchors.
- Citation Anchor Character Offset
Return a quote's signed offset relative to an anchor.