专题:大语言模型支持下的文化与典籍计算人文研究

基于推理大语言模型的古籍实体知识抽取研究

  • 赵文华 ,
  • 叶文豪 ,
  • 杨帆 ,
  • 刘浏
展开
  • 1 南京农业大学信息管理学院 南京 210095;
    2 人文与社会计算江苏省高校哲学社会科学重点研究基地 南京 210095
赵文华,硕士研究生;叶文豪,博士,博士后;杨帆,硕士研究生;刘浏,副教授,博士,硕士生导师,通信作者,E-mail:liuliu@njau.edu.cn。

收稿日期: 2025-06-20

  修回日期: 2025-09-03

  网络出版日期: 2026-08-20

基金资助

本文系国家社会科学基金重大项目“中国古代典籍跨语言知识库构建及应用研究”(项目编号:21&ZD331)、江苏省社会科学基金一般项目“《二十四史》人物知识图谱构建与应用研究”(项目编号:24TQB004)和江苏省社会科学基金青年项目“先秦典籍外译知识库构建及应用研究”(项目编号:23TQC004)研究成果之一。

Research on Entity Extraction from Ancient Texts Based on Reasoning Large Language Models

  • Zhao Wenhua ,
  • Ye Wenhao ,
  • Yang Fan ,
  • Liu Liu
Expand
  • 1 College of Information Management, Nanjing Agricultural University, Nanjing 210095;
    2 Research Center for Humanities and Social computing of Nanjing Agricultural University, Nanjing 210095
Zhao Wenhua, Master’s Candidate; Ye Wenhao, PhD, Postdoctoral Fellow; Yang Fan, Master’s Candidate; Liu Liu, Associate Professor, PhD, Master’s Supervisor, Corresponding Author, E-mail: liuliu@njau.edu.cn.

Received date: 2025-06-20

  Revised date: 2025-09-03

  Online published: 2026-08-20

Supported by

This work is supported by the National Social Science Fund of China project titled “Research on the construction and application of crosslanguage support library for ancient Chinese classics” (Grant No. 21&ZD331), the general project of the Jiangsu Provincial Social Science Fund titled “Research on the Construction and Application of Knowledge Graphs for Figures in the Twenty-Four Histories” (Grant No.24TQB004); and the youth project of the Jiangsu Provincial Social Science Fund, titled “Construction and Application of the Knowledge Base for the Translation of Pre-Qin Classics” (Grant No. 23TQC004).

摘要

[目的/意义]古籍文献的命名实体识别是正确分析处理古汉语文本的基础步骤,也是深度挖掘和组织人文知识的关键支撑。本研究旨在探究大语言模型在古籍命名实体识别应用的技术路径,以深度挖掘和组织古籍中蕴含的丰富人文知识,为古籍数字化资源的智能开发、文化传承与学术研究提供技术支撑。[方法/过程]首先,制定统一标注规范,结合自动识别与人工精校策略构建高质量《二十四史》古现对照命名实体识别专用语料库;其次,以Qwen系列和DeepSeek-R1蒸馏模型为基座,采用指令监督微调(supervised fine-tuning,SFT)和群体相对策略优化的强化学习(group relative policy optimization,GRPO)技术进行领域微调,重点增强模型对古汉语语法、语义及上下文的理解能力;最后,设计严谨实验,使用多种评测指标系统评估模型在实体识别精度、鲁棒性和泛化能力上的综合性能。[结果/结论]实验结果表明SFT整体表现更优且稳定,性能随模型参数量增大而提升;GRPO效果高度依赖基座模型能力,仅在DeepSeek-R1蒸馏模型上取得最优结果(ROUGE-1达0.81),其他模型GRPO后性能可能衰减,表明GRPO存在冷启动风险。本研究为古籍命名实体识别提供了基于先进大语言模型的有效路径,构建的高质量语料库与优化模型为古籍数字化与知识化奠定了重要基础。

本文引用格式

赵文华 , 叶文豪 , 杨帆 , 刘浏 . 基于推理大语言模型的古籍实体知识抽取研究[J]. 图书情报工作, 2026 , 70(17) : 21 -33 . DOI: 10.13266/j.issn.0252-3116.2026.17.002

Abstract

[Purpose/Significance] Named Entity Recognition(NER) in classical texts is a fundamental step in correctly analyzing and processing ancient texts, and a key enabler for deeply mining and organizing humanistic knowledge. This study aims to explore technical methods for applying large language models(LLMs) to NER in ancient texts, with the goal of deeply excavating and organizing the rich humanistic knowledge contained within them. This provides technological support for the intelligent development of digital resources for ancient texts, cultural heritage preservation, and academic research. [Methods/Process] Firstly, unified annotation guidelines were established, and a high-quality ancient-modern parallel NER corpus for the Twenty-Four Histories was constructed using a strategy that combined automatic recognition with manual refinement. Secondly, using the Qwen series and the DeepSeek-R1 distilled model as foundations, domain adaptation was performed using supervised fine-tuning(SFT) and group relative policy optimization(GRPO) techniques. This focused on enhancing the models' understanding of ancient grammar, semantics, and context. Finally, rigorous experiments were designed, systematically evaluating the models' comprehensive performance on entity recognition accuracy, robustness, and generalization capability using multiple metrics. [Result/Conclusion] Experimental results indicate that SFT generally exhibits superior and more stable performance, which improves as the model parameter scale increases. The effectiveness of GRPO is highly dependent on the base model's capability, achieving optimal results only with the DeepSeek-R1 distilled model(reaching a ROUGE-1 score of 0.81). Performance on other models degrades after GRPO, indicating a cold-start risk associated with GRPO. This research provides an effective method for NER in ancient texts based on advanced LLMs. The constructed high-quality corpus and optimized models lay a solid foundation for the digitization and knowledge structuring of ancient texts.

参考文献

[1] NADEAU D, SEKINE S. A survey of named entity recognition and classification[J]. Lingvisticae investigationes, 2007, 30(1):3-26.
[2] 孙艳茹,林民,史明伟.融合多类型软提示与全局指针网络的古籍命名实体识别[J/OL]. 计算机工程与应用,1-17[2025-06-12]. http://kns.cnki.net/kcms/detail/11.2127.tp.20250519.1450.010.html.(SUN Y R, LIN M, SHI M W.Integrating multi-type soft prompts with global pointer network for named entity recognition in ancient texts[J/OL]. Computer engineering and applications, 1-17[2025-06-12]. http://kns.cnki.net/kcms/detail/11.2127.tp.20250519.1450.010.html.)
[3] 张文东,吴子炜,宋国昌,等.基于SiKuBERT与多元数据嵌入的中医古籍命名实体识别[J]. 华南理工大学学报(自然科学版), 2024, 52(6):128-137.(ZHANG W D, WU Z W, SONG G C, et al. Named entity recognition of traditional chinese medicine classics based on sikubert and multivariate data embedding[J]. Journal of South China University of Technology(natural science edition), 2024, 52(6):128-137.)
[4] 朱锁玲,包平.方志类古籍地名识别及分析研究——以《方志物产》(广东分卷)为例[J]. 图书馆论坛, 2012, 32(4):171-176.(ZHU S L, BAO P. Recognition and analysis of location names in ancient books such as Local Chronicle:taking Local Chronicle:Produce of Guangdong as an Example[J]. Library tribune, 2012, 32(4):171-176.)
[5] 包振山,宋秉彦,张文博,等.基于半监督学习和规则相结合的中医古籍命名实体识别研究[J]. 中文信息学报,2022, 36(6):90-100.(BAO Z S, SONG B Y, ZHANG W B, et al.Named entity recognition in traditional chinese medicine books combining semi-supervised learning and rule-based approach[J]. Journal of Chinese information processing, 2022, 36(6):90-100.)
[6] 李娜.基于条件随机场的方志古籍别名自动抽取模型构建[J]. 中文信息学报, 2018, 32(11):41-48, 61.(LI N. Automatic extraction of alias in ancient Local Chronicles based on conditional random fields[J]. Journal of Chinese information processing, 2018, 32(11):41-48, 61.)
[7] 王世昆,李绍滋,陈彤生.基于条件随机场的中医命名实体识别[J]. 厦门大学学报(自然科学版), 2009, 48(3):359-364.(WANG S K, LI S Z, CHEN T S. Recognition of chinese medicine named entity based on condition random field[J]. Journal of Xiamen University(Natural science), 2009, 48(3):359-364.)
[8] 孟洪宇,谢晴宇,常虹,等.基于条件随机场的《伤寒论》中医术语自动识别[J]. 北京中医药大学学报, 2015, 38(9):587-590.(MENG H Y, XIE Q Y, CHANG H, et al. Automatic identification of TCM terminology in Shanghan Lun based on conditional random field[J]. Journal of Beijing University of Traditional Chinese Medicine, 2015, 38(9):587-590.)
[9] 刘浏,秦天允,王东波.非物质文化遗产传统音乐术语自动抽取[J]. 数据分析与知识发现, 2020, 4(12):68-75.(LIU L, QIN T Y, WANG D B. Automatic extraction of traditional music terms of intangible cultural heritage[J]. Data analysis and knowledge discovery, 2020, 4(12):68-75.)
[10] 杜悦,王东波,江川,等.数字人文下的典籍深度学习实体自动识别模型构建及应用研究[J]. 图书情报工作, 2021, 65(3):100-108.(DU Y, WANG D B, JIANG C, et al. Construction and application of entity recognition model based on deep learning of classics in digital humanities[J]. Library and information service,2021, 65(3):100-108.)
[11] 林立涛,王东波,刘江峰,等.数字人文视域下典籍动物命名实体识别研究——以SikuBERT预训练模型为例[J]. 图书馆论坛, 2022, 42(10):42-50.(LIN L T, WANG D B, LIU J F, et al.Animal named entity recognition in ancient chinese classics from the perspective of digital humanities:based on SikuBERT pretraining model[J]. Library tribune, 2022, 42(10):42-50.)
[12] 谢靖,刘江峰,王东波.古代中国医学文献的命名实体识别研究——以Flat-lattice增强的SikuBERT预训练模型为例[J]. 图书馆论坛, 2022, 42(10):51-60.(XIE J, LIU J F, WANG D B. Study on named entity recognition of traditional chinese medicine classics:taking SikuBERT pre-training model enhanced by the flatlattice transformer for example[J]. Library tribune,2022, 42(10):51-60.)
[13] XIAO Y, SONG J, XU Y, et al. EL4NER:Ensemble learning for named entity recognition via multiple small-parameter large language models[PP]. arXiv preprint arXiv:2505.23038, 2025.
[14] VILLENA F, MIRANDA L, ARACENA C. llmNER:(Zero|Few)-Shot named entity recognition, exploiting the power of large language models[PP]. arXiv preprint arXiv:2406.04528,2024.
[15] 左亮,赵志枭,王东波.基于大语言模型的《四库全书》自动分类研究[J]. 信息资源管理学报, 2024, 14(5):22-35.(ZUO L,ZHAO Z X, WANG D B. A study on automatic categorization of the Siku Quanshu based on a large language model[J]. Journal of information resources management, 2024, 14(5):22-35.)
[16] 朱丹浩,赵志枭,吴娜,等.基于领域大语言模型的古籍分词研究[J]. 科技情报研究, 2024, 6(2):11-20.(ZHU D H, ZHAO Z X, WU N, et al. Research on word segmentation of ancient books based on domain large language model[J]. Scientific information research, 2024, 6(2):11-20.)
[17] 斯日古楞,林民,郭振东,等.基于提示学习和抽取式阅读理解的古籍礼仪实体关系联合抽取方法研究[J]. 数据分析与知识发现, 2025, 9(3):147-159.(SIRIGULENG, LIN M, GUO Z D, et al. Etiquette entity-relation extraction via prompt learning and extractive reading comprehension[J]. Data analysis and knowledge discovery, 2025, 9(3):147-159.)
[18] 张逸勤,邓三鸿,王东波.基于生成式大语言模型的非遗文本嵌套命名实体识别研究[J]. 现代情报, 2025, 45(10):26-38.(ZHANG Y Q, DENG S H, WANG D B. Research on nested named entity recognition of intangible cultural heritage texts based on generative language models[J]. Journal of modern information, 2025, 45(10):26-38.)
[19] XU Q, LIU Y, WANG D, et al. Automatic recognition of crosslanguage classic entities based on large language models[J]. npj Heritage science, 2025, 13(1):59.
[20] SHAO Z, WANG P, ZHU Q, et al. DeepSeekmath:Pushing the limits of mathematical reasoning in open language models[PP]. arXiv preprint arXiv:2402.03300, 2024.
[21] BROWN T, MANN B , RYDER N , et al. Language models are few-shot learners advances[C] //Proceedings of the 34th international conference on neural information processing systems. New York:Curran Associates, 2020:1877-1901.
[22] LIU P, YUAN W, FU J, et al. Pre-train, prompt, and predict:A systematic survey of prompting methods in natural language processing[J]. ACM computing surveys, 2023, 55(9):1-35.
文章导航

/

〈 〉