Daejeon, July 27–31
This study investigates whether Tang dynasty poets’ geographic origins left detectable linguistic traces in their literary works. By applying natural language processing and machine learning techniques to the Quan Tang Shi (the Complete Tang Poems全唐詩), we examine the extent to which a poet’s birthplace can be predicted from textual features alone, which is a question that bridges computational linguistics, historical geography, and classical Chinese literary studies.
The Quan Tang Shi, compiled in the Qing dynasty, is the most comprehensive collection of Tang poetry. It contains approximately 49,000 poems by over 2,200 poets. While literary historians have long discussed regional schools and local poetic traditions, computational methods now enable systematic investigation of whether geographic origins manifest as quantifiable patterns in poetic language. Thus, this research addresses the following questions: (1) Can machine learning models predict a poet's birthplace based solely on their collected works? (2) Which linguistic features, including lexical choices, imagery, tonal patterns, or thematic preferences, carry the strongest regional signals? (3) Do these regional fingerprints persist across different poetic genres and historical periods within the Tang dynasty?
There are three main components in our computational pipeline: data preparation, feature extraction, and classification with interpretability analysis. In data preparation, we compiled poet-level corpora by aggregating all poems attributed to each author in the Quan Tang Shi. Geographic data on poets’ birthplaces were extracted from the Chinese Biography Databases, standardized to prefecture-level administrative units of the Tang dynasty, and geocoded to modern coordinates. Poets with fewer than five extant poems or uncertain geographic attributions were excluded, yielding a final dataset of approximately 1,800 poets with verified origins across major Tang administrative regions.
As for the feature extraction, we employed multiple feature representations to capture different dimensions of poetic style. Character-level and word-level n-gram features captured lexical preferences. Classical Chinese word embeddings, trained on a large corpus of pre-modern texts, provided dense semantic representations. We additionally extracted domain-specific features including: (1) imagery categories based on traditional Chinese literary classification (mountains, rivers, flora, fauna, celestial bodies); (2) tonal patterns reflecting prosodic requirements of the regulated verse (律詩); (3) allusion density measured through reference to canonical texts and historical figures; and (4) seasonal and temporal markers. These heterogeneous features were concatenated into unified poet representations.
Lastly, for classification and interpretation, we framed the task as multi-class classification, predicting poets’ regional origins from their textual representations. We experimented with classical machine learning models, such as logistic regression, support vector machines, random forests, and transformer-based models fine-tuned on classical Chinese. To ensure robust evaluation, we employed stratified k-fold cross-validation, accounting for the imbalanced distribution of poets across regions. Beyond classification accuracy, we prioritized interpretability: attention weights from transformer models and feature importance scores from tree-based models were analyzed to identify which textual elements most strongly signaled regional identity.
Our initial experiments demonstrate that regional origin prediction significantly exceeds chance-level performance. Classification accuracy varies by region, with poets from culturally distinct peripheral areas, such as the Jiangnan region and the northwestern frontier, being more readily identifiable than those from the political center around Chang’an and Luoyang. This asymmetry suggests that proximity to the imperial court may have exerted a homogenizing influence on poetic language, while geographic and cultural distance preserved local distinctiveness. Feature analysis reveals that imagery selection constitutes the strongest regional marker. Poets from southern regions disproportionately employed aquatic and botanical imagery, while those from northern and western frontiers favored martial and pastoral motifs. Lexical choices, particularly function words and grammatical particles, also exhibited regional variation, echoing findings from historical dialectology. Interestingly, tonal patterns showed weaker geographic correlation, possibly reflecting the standardizing influence of regulated verse conventions that transcended regional boundaries.
This research contributes to digital humanities discourse in several dimensions. Methodologically, it demonstrates the feasibility of applying geolinguistic analysis, traditionally confined to spoken language, to historical literary corpora. The interpretable machine learning approach allows us to move beyond black-box prediction toward generating humanistically meaningful insights about regional literary cultures. Substantively, our findings engage with longstanding debates in Tang literary history regarding the existence and character of regional schools. The computational evidence suggests that while elite literary culture exhibited considerable standardization, detectable regional variation persisted, particularly in imagery and lexical choice. This invites reconsideration of how geography shaped literary production even within a politically unified empire with a shared classical education system.
The study also speaks to the conference theme of “Engagement” with AI technologies. Rather than treating computational methods as replacement for traditional humanistic inquiry, we position machine learning as a tool for surfacing patterns that warrant further interpretive attention. The regional markers identified by our models generate hypotheses for close reading and literary-historical investigation, exemplifying productive human-AI collaboration in humanities research.
This study establishes that Tang poets’ geographic origins left computationally detectable traces in their verse, opening new avenues for understanding the spatial dimensions of classical Chinese literary culture. Future work will extend the analysis temporally, examining whether regional distinctiveness strengthened or weakened across the Early, High, and Late Tang periods. We also plan to construct poet similarity networks based on stylistic proximity, investigating whether textual affinity correlates with geographic proximity or transcends spatial boundaries through literary influence and intellectual networks.