TL;DR
This paper tackles the challenge of sentiment analysis in historical literary texts, a domain often overlooked by traditional NLP methods due to linguistic shifts and ambiguity. The authors introduce a novel, manually annotated dataset of 19th-century Danish and Norwegian novels and demonstrate that fine-tuned pre-trained language models significantly outperform lexicon-based approaches, paving the way for data-driven literary hypothesis testing.
What Problem Does This Paper Address?
Sentiment analysis, a cornerstone of modern NLP, has found limited application in literary studies. This is primarily due to the unique characteristics of historical literary texts: archaic vocabulary, complex sentence structures, literary ambiguity, figurative language, and the scarcity of relevant training data. Traditional sentiment analysis tools, often trained on contemporary social media or reviews, struggle to generalize to this domain. Furthermore, existing literary hypotheses, like the one suggesting 19th-century Scandinavian female authors predominantly wrote "unhappy texts," lack robust empirical validation due to the absence of suitable computational tools and datasets. This paper aims to bridge this gap by developing and evaluating sentiment analysis methods specifically for historical literary texts and applying them to test a prominent literary hypothesis.
Methods
The authors employ a multi-pronged approach:
- Dataset Creation: They manually annotated a dataset of sentence-level sentiment (Positive, Negative, Neutral) from a large corpus of 19th-century Danish and Norwegian novels (the MEMO corpus). This involved rigorous guidelines to ensure consistency, even accounting for historical semantic shifts and the challenges of context.
- Model Evaluation: They evaluated a range of sentiment classification methods, including:
- Lexicon-based approaches: Sentida (a Danish lexicon), TextBlob (translated to English), and VADER (adapted for Danish).
- Supervised models (without fine-tuning): Pre-trained Danish BERT models (Danish BERT Tone, Danish Sentiment).
- Supervised models (with fine-tuning): Pre-trained models (BERT BotXO, Danish BERT Tone, Danish Sentiment) fine-tuned on their newly created annotated dataset.
- Classifier-assisted Corpus Analysis: The best-performing model was used to predict sentiment across the entire MEMO corpus, enabling an analysis of sentiment trends in relation to author gender and publication year.
Datasets
- MEMO Corpus: A large corpus of 839 Danish and Norwegian novels from the late 19th century, containing over 50 million words. This serves as the primary source for the study.
- Annotated Sub-Corpus: A subset of 2,748 sentences from the MEMO corpus, manually annotated for sentiment (Positive, Negative, Neutral) by three literary scholars. This dataset is a novel contribution and is made publicly available.
Key Insights and Ideas
- Historical Text Sentiment is Feasible: Despite the inherent challenges, sentiment analysis on historical literary texts is achievable with appropriate methods and datasets.
- Pre-trained Models Shine: Fine-tuned pre-trained language models, particularly XLM-ROBERTa-base fine-tuned on Danish tweets and then the specific literary dataset, significantly outperform traditional lexicon-based methods. This highlights the power of transfer learning for domain adaptation.
- Gendered Sentiment Differences: The analysis provides empirical evidence that female authors in the 19th-century Scandinavian literary landscape expressed a higher proportion of both negative and positive sentiments compared to their male counterparts.
- Challenging the "Unhappy Texts" Hypothesis: While female authors did express more negative sentiment, they also expressed more positive sentiment, partially contesting the simplistic "unhappy texts" hypothesis. The hypothesis that male authors wrote more positively was not supported; instead, they tended towards more neutral sentiment.
- Temporal Sentiment Dynamics: The study reveals evolving sentiment trends over time, influenced by author gender, offering a nuanced view of literary expression.
Key Results
- Best Model Performance: The fine-tuned 'Danish Sentiment' model (based on XLM-ROBERTa-base) achieved the highest F1-scores, reaching 63% on the validation set and 72% on the test set.
- Lexicon vs. Models: Lexicon-based methods achieved F1-scores in the range of 0.52-0.63, while supervised models without fine-tuning reached up to 0.74. Fine-tuned models generally showed the best performance.
- Inter-Annotator Agreement: Cohen's Kappa of 0.59 indicated moderate agreement among annotators, which is considered reasonable given the subjectivity and contextual challenges of literary sentiment analysis.
- Gender Differences: Statistical analysis (t-tests) revealed statistically significant differences in sentiment trends between male and female authors across negative, neutral, and positive sentiment classes (p-values < 0.05).
- Qualitative Findings: The analysis confirmed that female authors exhibited more negative and positive sentiments over time than male authors. The average sentiment scores showed female authors expressing more negative sentiment in 16 out of 29 years analyzed.
Limitations and Future Work
- Limitations:
- The annotation process, while rigorous, still faced challenges due to the inherent ambiguity and lack of context in short text segments.
- The study acknowledges the potential for unconscious contextualization by annotators familiar with the literary period.
- The "unhappy texts" hypothesis was only partially confirmed, suggesting a more complex reality than initially posited.
- Future Work:
- Deeper Polarity Analysis: Investigating the intensity of positive and negative sentiments rather than just their presence.
- Topic Modeling: Analyzing the evolution of sentiment towards specific topics and the language used to express sentiment over time.
- Pre-training on Literary Corpus: Further improving classifier performance by pre-training a language model directly on the entire MEMO corpus.
- Literary Theory Integration: Connecting sentiment analysis findings with literary theories like "naturalism" and exploring narratological layers (e.g., distinguishing author, narrator, and character sentiment).
- Comparative Analysis: Comparing sentiment in naturalist literature with other literary movements and canonical vs. popular works.
Summary updated