Skip to content

Main content

Allusion Source Anchor Depth Tool

Calculate allusion source anchor depth from explicit caller-supplied inputs.

Loading tool…

Description

Compare source and allusion-anchor paths by literal shared prefix.

Comparative-literature annotations connect editions, passages, speakers, structural frames and count units. Literal keys and normalized lengths can support consistent records while textual meaning, translation fidelity and bibliographic authority remain matters for source-aware editorial analysis.

Compare source and allusion-anchor paths by literal shared prefix.

When to use this tool

Use Allusion Source Anchor Depth when checking a supplied literary annotation, cross-edition offset or count convention.

How to use the tool and how it works

  1. Enter sourcePath, anchorPath. Keep parallel arrays aligned. 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 commonDepth, remainingAnchorDepth, sourceIsPrefix. Inspect sourceIsPrefix before interpreting the associated values.

Compare source and allusion-anchor paths by literal shared prefix. Count equal leading components, return commonDepth and anchor length minus that depth, and flag sourceIsPrefix when all source components match.1

Input fieldMeaning and unitsAccepted input
sourcePathSource PathRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
anchorPathAnchor PathRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
commonDepthCommon DepthRequired. Safe integer.
remainingAnchorDepthRemaining Anchor DepthRequired. Safe integer.
sourceIsPrefixTrue when all source components match the anchor prefix; empty source path also qualifies.Required. Boolean.
json
{
  "input": {
    "sourcePath": [
      "book",
      "chapter"
    ],
    "anchorPath": [
      "book",
      "chapter",
      "line"
    ]
  },
  "output": {
    "commonDepth": 2,
    "remainingAnchorDepth": 1,
    "sourceIsPrefix": true
  }
}

Limitations and assumptions

  • An empty source path is a prefix by convention; bibliographic identity, actual allusion and source authority are not established.
  • 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.

Alternative or Complementary methods

Inspect the source editions and their annotation/counting policy for substantive literary, translation or provenance conclusions.

References

  1. Calculation and input contract: comparative-literature/allusion-source-anchor-depth — tool.io

Similar or alternative tools