An Extraction and Representation Pipeline for Literary Characters

Funing YangAAAI 2022 · DOI

Abstract

Extracting characters from full-length novels is a complex task due to the intricate narrative styles, metaphors, and long-range dependencies inherent in literary fiction. This paper introduces an automated, modular pipeline designed to identify characters and construct dense vector representations of them. By integrating state-of-the-art Named Entity Recognition (NER) and Coreference Resolution modules, the system achieves robust performance on the LitBank dataset. The pipeline provides a foundation for advanced literary analysis, enabling comparisons of characters based on their actions and speech throughout a narrative.

Introduction

While Natural Language Processing (NLP) has seen significant advancements in processing structured data like news articles, the literary domain remains a formidable challenge. Novels often feature archaic structures and "messy" references where characters are identified by titles, pronouns, or descriptive phrases rather than consistent names. A character introduced early in a text may not be explicitly named again for hundreds of pages, necessitating sophisticated tracking mechanisms. This research addresses these challenges by developing an end-to-end pipeline for character identification and representation in English novels.

Methodology

The proposed pipeline is divided into several distinct modules:

Named Entity Recognition (NER)

The initial stage involves identifying entity mentions within the text. The study compared several architectures, including a baseline Conditional Random Field (CRF) and more advanced deep learning models. The most effective model was a Bi-LSTM-CRF architecture, which utilizes bidirectional LSTMs to capture context and a CRF layer to optimize label sequences.

Coreference Resolution

Once entities are identified, they must be linked to the same character cluster (e.g., linking "Elizabeth" to "she" and "Miss Bennet"). The pipeline leverages SpanBERT, a model pre-trained to mask and predict entire spans of text, which is particularly suited for the descriptive nature of literary mentions. This was combined with a Gated Recurrent Unit (GRU) head for optimal performance.

Disambiguation and Representation

A final disambiguation module applies heuristics to refine character clusters. Beyond identification, the pipeline aims to represent characters as vectors based on event extraction (actions performed) and speech extraction (dialogue), utilizing both static GloVe and contextual BERT embeddings to capture the essence of a character's role in the story.

Results and Analysis

NER Performance

The evaluation on the LitBank dataset demonstrated that deep learning architectures significantly outperform traditional statistical methods. The Bi-LSTM-CRF model achieved an F1 score of 0.85, a substantial improvement over the CRF baseline.

Performance comparison of various NER architectures on literary text.

Coreference Resolution Performance

In the coreference resolution task, the SpanBERT-based models showed strong results. Specifically, the SpanBERT + GRU configuration achieved an F1 score of 76.1, effectively handling the linguistic complexity of 19th-century literature.

Coreference resolution performance across different model configurations.

Key Insights

  • Nested Mentions: The study found that focusing on the "outermost" layer of nested entities (e.g., the full phrase "[The sister of Elinor]") provided the most reliable data for character tracking.
  • The Main Character Paradox: Paradoxically, prominent characters are often the hardest to resolve correctly. Their frequent and varied appearances across a long text can lead coreference models to split a single character into multiple disconnected clusters.

Conclusion and Future Work

The automated pipeline successfully generalizes across different genres and eras, as evidenced by qualitative tests on works ranging from Jane Austen to J.K. Rowling. However, challenges remain regarding the resolution of unique or archaic names and maintaining links across very long text spans. Future research will focus on refining character representations through unsupervised event extraction to automatically categorize characters into archetypal roles like "hero" or "villain" based on their narrative actions.

Reference: Yang, F. (2022). An Extraction and Representation Pipeline for Literary Characters. Proceedings of the Thirty-Sixth AAAI Conference on Artificial Intelligence (AAAI-22).

Summary updated

BibTeX
@inproceedings{yang2022extraction,
  author = {Funing Yang},
  title = {{An Extraction and Representation Pipeline for Literary Characters}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i11.21709},
}
Figure