Quantifying Emotional Tone in Tolkien's The Hobbit: Dialogue Sentiment Analysis with RegEx, NRC-VAD, and Python
Lilin Qiu

TL;DR
This paper employs computational text analysis to quantify and visualize the emotional tone and its progression in Tolkien's The Hobbit, revealing patterns of emotional modulation that underpin the narrative structure.
Contribution
It introduces a novel combination of regex extraction, NRC-VAD lexicon scoring, and visualization techniques to analyze emotional dynamics in literary dialogue.
Findings
Dialogue is generally positive and calm throughout the novel.
Emotional intensity increases gradually as the story progresses.
Visualizations reveal cycles of tension and comfort in the narrative.
Abstract
This study analyzes the emotional tone of dialogue in J. R. R. Tolkien's The Hobbit (1937) using computational text analysis. Dialogue was extracted with regular expressions, then preprocessed, and scored using the NRC-VAD lexicon to quantify emotional dimensions. The results show that the dialogue maintains a generally positive (high valence) and calm (low arousal) tone, with a gradually increasing sense of agency (dominance) as the story progresses. These patterns reflect the novel's emotional rhythm: moments of danger and excitement are regularly balanced by humor, camaraderie, and relief. Visualizations -- including emotional trajectory graphs and word clouds -- highlight how Tolkien's language cycles between tension and comfort. By combining computational tools with literary interpretation, this study demonstrates how digital methods can uncover subtle emotional structures in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMedia Influence and Health · Themes in Literature Analysis · Narrative Theory and Analysis
