# Sentence lengths

> Use a sentence-length chart to show the rhythm of a text: every sentence as a bar, in reading order, as tall as its word count.

- Data type: Words and text (`text`)
- Free (MIT): install with `npx chartreuse add sentence-lengths`, or registry item `/r/sentence-lengths.json`
- Example: **A Tale of Two Cities opens with a 118-word sentence; the typical one has 13** (Every sentence in Book the First of Dickens's A Tale of Two Cities (1859), length in words)
- How to read it: Each row is a chapter read left to right; each bar is one sentence, as tall as its word count, with sentences of 100 words or more picked out.
- Phone: Not recommended for mobile (On a phone marks are too small to see or tap (checked by eye)) · Video formats: none passed; closest 9:16

## Use it when
- the rhythm or pacing of a text is the story
- you want to find unusually long or short sentences in context
- comparing chapters, speeches or authors by style

## Avoid it when
- only the average matters (use a single number or a histogram)
- the text has no clear sentence boundaries (verse, transcripts)
- the text is very long (sample a chapter or bin the sentences)

## Fields (data.json)
- `chapters` (category): the chapter titles, in order; numbered with Roman numerals, and named in tooltips with hints.part, else "Part"
- `columns` (text): the order of values in each sentence row
- `sentences[][0] chapter` (id): the chapter it is in (0 is the first)
- `sentences[][1] words` (number, unit "words", format count): its length in words
- `sentences[][2] text` (text): its opening words

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a sentence to read its length and opening
- Motion: The bars rise chapter by chapter in reading order; then the famous opening is called out.
- Sound: A pop on hover, higher for longer sentences. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "sentence-lengths",
  "title": "A Tale of Two Cities opens with a 118-word sentence; the typical one has 13",
  "subtitle": "Every sentence in Book the First of Dickens's A Tale of Two Cities (1859), length in words",
  "data": "/charts/sentence-lengths.data.json"
}
```

## Source
A Tale of Two Cities by Charles Dickens (eBook #98), Project Gutenberg (Public domain), retrieved 2026-12-01: https://www.gutenberg.org/ebooks/98

Note: Sentences are split at full stops, question and exclamation marks (titles like Mr. excepted), so a dash-broken line of dialogue can run into the next. Hyphenated words count as one, which is why the opening comes to 118 rather than the often-quoted 119.

Live: /charts/sentence-lengths · Manifest: /charts/sentence-lengths.json · Tags: text, sentences, rhythm, style, Dickens, literature, reading, pacing
