Description
Return clipped context bounds around an excerpt.
Cultural source records can encode exact tokens, voices, time offsets and context budgets. Their literal structure can be summarized without determining authorship, cultural meaning, source authority or adequacy of interpretation.
Return clipped context bounds around an excerpt.
When to use this tool
Use Excerpt Context Window Offset when checking a supplied source-context or annotation convention.
How to use the tool and how it works
- Enter excerptStart, excerptEnd, contextBefore, contextAfter, textLength. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read contextStart, contextEnd, excerptOffset. Use the output convention below.
Return clipped context bounds around an excerpt. Require whole ordered offsets inside textLength and nonnegative context counts; clamp start/end to the text and return excerptOffset relative to contextStart.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| excerptStart | Excerpt Start | Required. Safe integer; minimum 0. |
| excerptEnd | Excerpt End | Required. Safe integer. |
| contextBefore | Context Before | Required. Safe integer; minimum 0. |
| contextAfter | Context After | Required. Safe integer; minimum 0. |
| textLength | Text Length | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| contextStart | Context Start | Required. Safe integer. |
| contextEnd | Context End | Required. Safe integer. |
| excerptOffset | Excerpt Offset | Required. Safe integer. |
{
"input": {
"excerptStart": 5,
"excerptEnd": 10,
"contextBefore": 3,
"contextAfter": 4,
"textLength": 12
},
"output": {
"contextStart": 2,
"contextEnd": 12,
"excerptOffset": 3
}
} Limitations and assumptions
- Offsets use a supplied text-unit convention; no text extraction, Unicode unit conversion or context interpretation occurs.
- 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
Review the actual sources and relevant participant or community context for substantive interpretation and attribution.
References
Similar or alternative tools
- Quotation Context Expansion Budget
Return expanded quotation length and budget slack.
- Translated Turn Offset
Map a source turn coordinate into translated-turn coordinates.