Exploring the social and cultural contexts in ancient chinese literature using natural language processing techniques

Xiaoyu Rong1, Jiagong Tang2
1Public Foundation College, Jilin General Aviation Vocational and Technical College, Jilin, Jilin, 132000, China
2Ninth Middle School of Jilin City, Jilin, Jilin, 132000, China

Abstract

The rise of digital humanities reflects a paradigm shift in literary research. This project applies natural language processing to ancient Chinese literature, embedding an attention mechanism into an iterative null convolutional network for named entity recognition. It also integrates the MacBERT pre-training model with a dual-channel structure of aspectual word and semantic features, designing a hierarchical attention mechanism for aspect-level sentiment analysis. Experimental results show improved recognition and sentiment analysis performance, with evaluation scores exceeding 83%. In Ming Dynasty fiction, craftsmen (44.7%) and merchants (22.4%) were the most frequent characters, highlighting the rise of a commercial economy and civic class. In Tang Dynasty poetry, 67.9% of sentiments were positive, with themes of national honor (0.334) and send-off emotions (0.226) commonly linked, reflecting the era’s prosperity and literary aspirations.

Keywords: natural language processing, attention mechanism, iterative null convolution, named entity recognition, sentiment analysis, ancient Chinese literature