Skip to content

Main content

Discourse Annotation Scope Gap Tool

Calculate discourse annotation scope gap from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter annotationStart, annotationEnd, contextStart, contextEnd. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
annotationStartAnnotation StartRequired. Safe integer; minimum 0.
annotationEndAnnotation EndRequired. Safe integer.
contextStartContext StartRequired. Safe integer; minimum 0.
contextEndContext EndRequired. Safe integer.
Output fieldInterpretationReturned shape
outsideBeforeOutside BeforeRequired. Safe integer.
outsideAfterOutside AfterRequired. Safe integer.
insideUnitsInside UnitsRequired. Safe integer.
json
{
  "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

  1. Calculation and input contract: critical-theory/discourse-annotation-scope-gap — tool.io

Similar or alternative tools