Machine Learning Unveils the Drama in Novels

ChunYu Ko
The whispers of a data analyst
3 min readJan 1, 2024

In this data-driven era, machine learning has transcended traditional boundaries, finding its way into literary analysis. The article “The Emotional Arcs of Stories are Dominated by Six Basic Shapes” from Project Gutenberg’s fiction collection explores this by analyzing the emotional arcs of 1,327 stories, showcasing a fascinating application of machine learning in literature.

This exploration delves into using advanced computing, natural language processing, and text digitization to analyze the emotional arcs and thematic structures in literature, with a focus on Chinese Wuxia and Xianxia novels. By analyzing these novels, we demonstrate the application of these technologies.

The analysis began with thematic modeling of literary works, classifying each sentence into a theme and generating a list of 110 different themes, further analyzed through hierarchical clustering.

This not only revealed the main emotional arcs but also highlighted the diversity and complexity of the storylines. For instance, the gpt-4–1106-preview model was used to generate keyword representations for each theme, aiding in understanding and constructing story overviews.

prompt

I have a topic is described by the following keywords:

{{keyword1, keyword2, keyword3……}}

Based on the above information, can you give a short english title of the topic?”

Themes like “Chasing Shadows: The Tale of Zhao and Chen” (Topic 116) and “Martial World Hierarchies and Courtesies” (Topic 170) reveal key elements of these novels.

  • Topic 116 Chasing Shadows: The Tale of Zhao and Chen
  • Topic 170 Martial World Hierarchies and Courtesies
  • Topic 188 Dark Whispers: The Saga of the Ghost King and the Haunted PrisonTopic 198 Rainbow Veins and Beast Taming: The Saga of Sects and Disciples in a Mystical Martial World
  • Topic 198 Rainbow Veins and Beast Taming: The Saga of Sects and Disciples in a Mystical Martial World
  • Topic 199 Daoist Cultivation and the Pursuit of ImmortalityTopic 201 Imperial Intrigue and Divine Judgment in the Celestial Realm
  • Topic 202 New Release and Recommendations: Latest Update
  • Topic 204 Mystical Quests and Martial Clans: The Adventures of the Eternal Cultivators
  • Topic 205 Eternal Sovereign: Chronicles of the Immortal Fist and the Thunder Sect
  • Topic 207 Secrets of the Blood-Colored Path: Power Struggles and Mystical Artifacts in the World of Immortal Cultivation
  • Topic 211 Soul Refining Odyssey in the Mystic Martial World

Furthermore, we analyzed the entropy of themes in novel chapters, a measure of diversity. Significant variations in thematic entropy across different chapters were observed.

For example, the first 200 chapters showed higher entropy, indicating rich storylines and hidden plots early in the novels. Subsequent chapters showed fluctuations in entropy, indicating narrative style shifts and plot twists.

A decreasing trend in entropy from chapter 100 to 400, with cycles of decrease and increase every 100 chapters, suggests a pattern in the author’s plot development and turning points.

No significant change in entropy was observed between chapters 600 and 700, indicating a shift from a fast to a slow narrative pace. Key turning points likely occurred around chapters 800, 1000, and 1200, with the most revealing part of the novel and hidden plots likely between chapters 1100 and 1200, culminating in a climax at chapter 1200 before the story’s conclusion.

In conclusion, such analysis of a vast array of literary works is not only intriguing but also of significant academic and creative value. The rapid development of Chinese web novels provides a rich resource to explore different narrative styles and emotional arcs. The application of machine learning offers deeper insights into story structure and development, predicting possible plot twists and offering a new perspective for literary creation and research.

--

--

ChunYu Ko
The whispers of a data analyst

Work is data, and hobby is also data, but I yearn for my roommate's two cats, lazily lounging at the doorway.