Visualization & Metrics
Sentiment Arc
Per-paragraph sentiment scoring with flatline and sharp-reversal detection.
What It Does
Computes a sentiment score for each paragraph on a scale from –1.0 (strongly negative) to +1.0 (strongly positive), then uses the arc to detect:
- Emotional flatline — the sentiment stays nearly constant throughout the entire document (very low variance)
- Sharp reversals — adjacent paragraphs with dramatically different sentiment (Δ > 1.5)
Also produces the raw sentiment arc data for visualization — useful for plotting emotional trajectory charts.
Why It Matters
The emotional arc is the shape of a story's feelings over time. Kurt Vonnegut famously sketched story shapes: "Man in Hole" (happy → sad → happy), "Boy Meets Girl" (happy → sad → happy with variation). A flatlined arc means the story maintains the same emotional tone throughout — fine for a technical manual, problematic for fiction. Sharp reversals without transition make the reader feel whiplash.
What Gets Flagged
Emotional Flatline
Severity: Information
Example (flagged):
Sentiment arc: emotional flatline — the story maintains a uniform emotional tone throughout
Why: Sentiment variance is below 0.01 across 8+ paragraphs, meaning the emotional temperature never changes.
Sharp Reversal
Severity: Hint
Example (flagged):
Sentiment arc: sharp emotional reversal at paragraph 7 (Δ1.8) — may feel jarring without transition
Why: The sentiment score jumps from strongly negative to strongly positive (or vice versa) between adjacent paragraphs.
Sentiment Scoring
The scoring system uses:
| Component | Words |
|---|---|
| Positive | happy, joy, love, wonderful, brilliant, hope, smile, triumph, warm, etc. (50+ words) |
| Negative | sad, hate, terrible, painful, cruel, death, fear, grief, suffer, etc. (70+ words) |
| Negation | not, n't, no, never, hardly, barely, without |
Negation flips the sentiment of a sentence (odd number of negation words inverts the score).
Configuration
No configuration options.
Technical Details
- Source:
prose-craft - Scope: Paragraph-level (produces document-wide arc)
- Minimum text: 5 paragraphs for diagnostic generation
- Method: Word-list sentiment scoring with negation handling; variance calculation for flatline; adjacent-paragraph delta for reversals
- API:
sentiment_arc_from_doc()returnsVec<f64>for visualization