Skip to content

Main content

Dialogue Attribution Speaker Turn Index Tool

Map a zero-based line index to a zero-based contiguous speaker turn from caller-provided speaker labels.

Loading tool…

Description

Return a supplied dialogue line's speaker-turn index.

Story planning separates the order of telling from fictional chronology, continuity records and practical writing budgets. Explicit labels, counts and invented calendar rules can make a local convention consistent without deciding narrative quality or inferring facts from manuscript prose.

Return a supplied dialogue line's speaker-turn index.

When to use this tool

Use Dialogue Attribution Speaker Turn Index when checking a supplied story-continuity, chronology, calendar or drafting-budget convention.

How to use the tool and how it works

  1. Enter speakers, tokenLine. 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 turnIndex, currentSpeaker. Use the output convention below.

Return a supplied dialogue line's speaker-turn index. Require tokenLine within speakers; count adjacent speaker-label changes up through that zero-based line and return its currentSpeaker.1

Input fieldMeaning and unitsAccepted input
speakersSpeakersRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
tokenLineToken LineRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
turnIndexTurn IndexRequired. Safe integer.
currentSpeakerCurrent SpeakerRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "speakers": [
      "A",
      "A",
      "B",
      "B",
      "A"
    ],
    "tokenLine": 3
  },
  "output": {
    "turnIndex": 1,
    "currentSpeaker": "B"
  }
}

Limitations and assumptions

  • Speaker labels are supplied, and repeated contiguous labels form one turn; no dialogue attribution is inferred from text.
  • 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

Use the manuscript, scene outline and the chosen style/calendar policy for a complete editorial review; interpret numerical budgets in their narrative context.

References

  1. Calculation and input contract: creative-writing/dialogue-attribution-speaker-turn-index — tool.io

Similar or alternative tools