Description
Partition a half-open annotation span against a context span.
Quotations and corpora depend on span boundaries, omissions, annotation context and exclusion policies. A clipped window or support count describes supplied records while the adequacy, independence and meaning of their context still require editorial interpretation.
Partition a half-open annotation span against a context span.
When to use this tool
Use Discourse Annotation Scope Gap when checking a supplied quotation, context or corpus-support convention.
How to use the tool and how it works
- Enter annotationStart, annotationEnd, contextStart, contextEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read outsideBefore, outsideAfter, insideUnits. Use the output convention below.
Partition a half-open annotation span against a context span. Require ordered nonnegative whole endpoints; return lengths before, after and inside the context using clipped interval intersections.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| annotationStart | Annotation Start | Required. Safe integer; minimum 0. |
| annotationEnd | Annotation End | Required. Safe integer. |
| contextStart | Context Start | Required. Safe integer; minimum 0. |
| contextEnd | Context End | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| outsideBefore | Outside Before | Required. Safe integer. |
| outsideAfter | Outside After | Required. Safe integer. |
| insideUnits | Inside Units | Required. Safe integer. |
{
"input": {
"annotationStart": 2,
"annotationEnd": 12,
"contextStart": 5,
"contextEnd": 10
},
"output": {
"outsideBefore": 3,
"outsideAfter": 2,
"insideUnits": 5
}
} Limitations and assumptions
- Units must match; literal containment does not establish discourse meaning or sufficient interpretive context.
- 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
Read the complete sources and audit the annotation/exclusion policy before treating a numerical coverage measure as interpretive support.
References
Similar or alternative tools
- Quotation Context Window Length
Clip a quotation context window to a supplied token array.
- Quotation Ellipsis Span Gap
Compare an original span with a quotation and declared omission.