IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0330919.html
   My bibliography  Save this article

Sentiment analysis of classical Chinese literature: An unsupervised deep learning model with BERT and graph attention networks

Author

Listed:
  • Xiaohan Yu
  • Jin Wang

Abstract

Sentiment analysis has become a transformative technology in various contexts, particularly in Natural Language Processing (NLP), social media analytics, and literary analysis, as it can extract information from a wide range of texts. The advancements in deep learning, particularly with transformer models such as BERT and graph-based models like GATs, have enabled faster progress in analyzing complex language structures. However, the issue lies in incorporating these technologies into classical Chinese literature, which involves delicate syntax, semantics, and emotions that are difficult to harness using traditional methods. The existing methods, which rely on strictly labeled data or unsupervised learning methods that do not effectively manage contextual dependencies, are very limited in analyzing historical or philosophical texts that abound in metaphor and implicit sentiment. To minimize the limitations, this paper proposes an unsupervised deep learning framework that integrates BERT embeddings, sentiment lexicon enrichment, and graph attention networks (GATs) for sentiment analysis in classical Chinese literature. Firstly, the BERT-based model extracts contextualised embeddings from a raw text, providing a deep understanding of semantics. Secondly, embedding includes sentiment-specific data from the NTUSD lexicon, thus injecting it with emotional information. Thirdly, a graph-based formulation is developed, in which words are represented as nodes, and the relations between them are defined using GATs to modify the features of nodes based on their significance in the context. Finally, unsupervised sentiment labelling, or K-Means clustering, is used to classify sentiment. The experimental results demonstrate the proposed model’s efficiency – an accuracy of 0.95, precision of 0.97, recall of 0.96, and F1-score of 0.91 in several runs. These results surpass those of the traditional approach, which includes SentiCNN, MLT-ML4, and BERT-LLSTM-DL, which achieve an accuracy score of 0.90 to 0.95. Additionally, the comparison with large-scale foundation models (such as ChatGPT-4o and DeepSeek R1) in zero-shot prompt-based classification further validates the domain-adapted advantage of our model in the classical Chinese text processing. These results demonstrate that the proposed model significantly enhances the handling of the intricate linguistic features and cultural nuances in classical Chinese texts, providing a robust solution for sentiment analysis in low-resource domains.

Suggested Citation

  • Xiaohan Yu & Jin Wang, 2025. "Sentiment analysis of classical Chinese literature: An unsupervised deep learning model with BERT and graph attention networks," PLOS ONE, Public Library of Science, vol. 20(9), pages 1-23, September.
  • Handle: RePEc:plo:pone00:0330919
    DOI: 10.1371/journal.pone.0330919
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0330919
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0330919&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0330919?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Zijia Du & Alan Guoming Huang & Russ Wermers & Wenfeng Wu, 2022. "Language and Domain Specificity: A Chinese Financial Sentiment Dictionary [The effects of analyst-country institutions on biased research: Evidence from target prices]," Review of Finance, European Finance Association, vol. 26(3), pages 673-719.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Li, Guowen & Wang, Shuai & Feng, Yuyao, 2024. "Making differences work: Financial fraud detection based on multi-subject perceptions," Emerging Markets Review, Elsevier, vol. 60(C).
    2. Li, Jing & Li, Nan & Xia, Tongshui & Guo, Jinjin, 2023. "Textual analysis and detection of financial fraud: Evidence from Chinese manufacturing firms," Economic Modelling, Elsevier, vol. 126(C).
    3. Durand, Robert B. & Khuu, Joyce & Smales, Lee A., 2023. "Lost in translation. When sentiment metrics for one market are derived from two different languages," Journal of Behavioral and Experimental Finance, Elsevier, vol. 39(C).
    4. Stolbov, Mikhail & Shchepeleva, Maria & Karminsky, Alexander, 2022. "When central bank research meets Google search: A sentiment index of global financial stress," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 81(C).
    5. Laubsch, Joshua & Smales, Lee A. & Vo, Duc, 2024. "The influence of uncertainty on commodity futures returns and trading behaviour," The Quarterly Review of Economics and Finance, Elsevier, vol. 98(C).
    6. Mikhail Stolbov & Maria Shchepeleva, 2023. "Sentiment-based indicators of real estate market stress and systemic risk: international evidence," Annals of Finance, Springer, vol. 19(3), pages 355-382, September.
    7. Liu, Yulin & Wang, Junbo & Wen, Fenghua & Wu, Chunchi, 2024. "Corporate responses to systemic risk: Talk and action," Pacific-Basin Finance Journal, Elsevier, vol. 87(C).
    8. Chu, Xiaojun & Wan, Xinmin & Qiu, Jianying, 2023. "The relative importance of overnight sentiment versus trading-hour sentiment in volatility forecasting," Journal of Behavioral and Experimental Finance, Elsevier, vol. 39(C).

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0330919. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.