Improving sentiment analysis in literary texts through bidirectional encoder representations: A BERT-based approach

Emotion analysis in literary texts is a complex task due to the intricate nature of language, rich contextual dependencies, and subtle emotional manifestations present in narratives, dialogues, and poetic structures. Traditional lexicon-based models frequently fail to capture the complexity of emotions in literature, leading to incorrect classifications. This study examines the ability of BERT to enhance emotion analysis for literary texts. An innovative Dynamic Honey Badger-tuned BERT (DHB-BERT) model is applied to effectively detect emotional changes in literary texts. Training and emotion analysis are ensured through a diverse dataset of Chinese literary works, with accurate samples to evaluate the model. Lemmatization and stemming serve as preprocessing techniques that reduce words to their most basic forms to preserve continuity. Then, feature extraction is performed using Word2Vec, which maintains relevant linkages and captures emotional fluctuations. Based on the sentiment analysis, texts are classified as positive, negative, neutral, or mixed. The Dynamic Honey Badger algorithm is employed for feature selection and adaptation of the dataset for improved emotion classification. The BERT model is then utilized to capture meaningful emotional variations across various literary forms. This simulation is executed using a Python platform. To evaluate the effectiveness of the simulation, various performance metrics are employed, including precision (94.76%), recall (95%), accuracy (95%), and F1-score (94.13%). Experimental results indicate that the DHB-BERT model significantly outperforms traditional algorithms, particularly in handling rhetorical language, irony, and nuanced emotional manifestations. This research highlights the potential of transformer-based architectures in advancing sentiment analysis for literary texts, providing valuable insights for computational linguistics, literary studies, and sentiment-aware systems.

Authors

Publication Details

Journal
Journal of Computational Methods in Sciences and Engineering
Published
2025-05-05
DOI
https://doi.org/10.1177/14727978251338004
Citations
3
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
7.44
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Improving sentiment analysis in literary texts through bidirectional encoder representations: A BERT-based approach

Jiancheng Feng
3 citations
Journal of Computational Methods in Sciences and Engineering
Sentiment Analysis and Opinion Mining
7.44
article

Improving sentiment analysis in literary texts through bidirectional encoder representations: A BERT-based approach

Jiancheng Feng
article en
3 citations

Abstract

Emotion analysis in literary texts is a complex task due to the intricate nature of language, rich contextual dependencies, and subtle emotional manifestations present in narratives, dialogues, and poetic structures. Traditional lexicon-based models frequently fail to capture the complexity of emotions in literature, leading to incorrect classifications. This study examines the ability of BERT to enhance emotion analysis for literary texts. An innovative Dynamic Honey Badger-tuned BERT (DHB-BERT) model is applied to effectively detect emotional changes in literary texts. Training and emotion analysis are ensured through a diverse dataset of Chinese literary works, with accurate samples to evaluate the model. Lemmatization and stemming serve as preprocessing techniques that reduce words to their most basic forms to preserve continuity. Then, feature extraction is performed using Word2Vec, which maintains relevant linkages and captures emotional fluctuations. Based on the sentiment analysis, texts are classified as positive, negative, neutral, or mixed. The Dynamic Honey Badger algorithm is employed for feature selection and adaptation of the dataset for improved emotion classification. The BERT model is then utilized to capture meaningful emotional variations across various literary forms. This simulation is executed using a Python platform. To evaluate the effectiveness of the simulation, various performance metrics are employed, including precision (94.76%), recall (95%), accuracy (95%), and F1-score (94.13%). Experimental results indicate that the DHB-BERT model significantly outperforms traditional algorithms, particularly in handling rhetorical language, irony, and nuanced emotional manifestations. This research highlights the potential of transformer-based architectures in advancing sentiment analysis for literary texts, providing valuable insights for computational linguistics, literary studies, and sentiment-aware systems.

Journal of Computational Methods in Sciences and EngineeringVol. 25(5)
Quality Education
Openalex Percentile: Top 3%
Sentiment Analysis and Opinion Mining
7.44
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Improving sentiment analysis in literary texts through bidirectional encoder representations: A BERT-based approach — Jiancheng Feng · Journal of Computational Methods in Sciences and Engineering (2025) | TGRS Research Map | TGRS