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
- Enter speakers, tokenLine. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| speakers | Speakers | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| tokenLine | Token Line | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| turnIndex | Turn Index | Required. Safe integer. |
| currentSpeaker | Current Speaker | Required. Text; maximum UTF-16 length 8192. |
{
"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
Similar or alternative tools
- Dialogue Interruption Unfinished Word Hyphen
Append one unfinished-word marker unless already present.
- Manuscript Dialogue Dash Role
Compare a dialogue or interruption dash with supplied marker conventions.