作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2026, Vol. 52 ›› Issue (11): 110-120. doi: 10.19678/j.issn.1000-3428.0070482

• 计算智能与模式识别 • 上一篇    

基于边界掩码的中文命名实体识别模型

胡晶亮1,2,3, 陈艳平1,2,3, 秦永彬1,2,3, 黄瑞章1,2,3, 邹安琪1,2,3   

  1. 1. 贵州大学文本计算与认知智能教育部工程研究中心, 贵州 贵阳 550025;
    2. 贵州大学公共大数据国家重点实验室, 贵州 贵阳 550025;
    3. 贵州大学计算机科学与技术学院, 贵州 贵阳 550025
  • 收稿日期:2024-10-14 修回日期:2024-12-24 发布日期:2025-02-28
  • 作者简介:胡晶亮,男,硕士研究生,主研方向为自然语言处理、命名实体识别;陈艳平(通信作者,E-mail:742723641@qq.com)、秦永彬、黄瑞章,教授、博士;邹安琪,博士研究生。
  • 基金资助:
    国家自然科学基金(62166007);国家重点研发计划(2023YFC3304500);贵州省科学技术基金重点项目([2024]003)。

Chinese Named Entity Recognition Model Based on Boundary Mask

HU Jingliang1,2,3, CHEN Yanping1,2,3, QIN Yongbin1,2,3, HUANG Ruizhang1,2,3, ZOU Anqi1,2,3   

  1. 1. Engineering Research Center of Text Computing and Cognitive Intelligence, Ministry of Education, Guizhou University, Guiyang 550025, Guizhou, China;
    2. State Key Laboratory of Public Big Data, Guizhou University, Guiyang 550025, Guizhou, China;
    3. College of Computer Science and Technology, Guizhou University, Guiyang 550025, Guizhou, China
  • Received:2024-10-14 Revised:2024-12-24 Published:2025-02-28

摘要: 在命名实体识别(NER)任务中,实体边界作为粒度较小的语言单元,具有歧义性小和语义特征明显的特点,因此通常被用来表征实体。然而,现有NER方法在训练时,通常仅依赖原始文本的语义逻辑来挖掘实体边界信息。由于边界词与非边界词共享相同的上下文语义,这导致模型难以充分感知实体边界语义特征和捕获实体边界语义信息。针对此问题,提出一种基于边界掩码的中文命名实体识别(CNER)模型。该模型由实体边界检测、实体编码和实体分类3个模块组成。该模型首先通过实体边界检测模块识别出候选实体边界;然后在实体编码模块中依据候选实体边界信息构造候选实体集,并通过引入开始边界线索标记[B]和结束边界线索标记[E]及预训练语言模型预置的掩码标记[MASK]来定位和掩码实体边界,从而增强模型感知实体边界语义特征的能力和充分挖掘预训练语言模型关于候选实体的潜在知识;最后将实体边界原始语义与边界线索标记语义及通过掩码标记预测得到的边界语义相融合,并利用双仿射机制与真实实体类型信息进行交互,从而充分丰富实体边界语义信息,提高模型识别实体的性能。实验结果表明,该模型在ACE2005-Chinese、Weibo和Resume 3个中文数据集上分别取得了91.40%、74.06%和96.79%的F1值,这验证了该模型的有效性。

关键词: 中文命名实体识别, 实体边界, 线索标记, 边界掩码, 多标记语义融合

Abstract: In the task of Named Entity Recognition (NER), entity boundaries, as fine-grained linguistic units, exhibit characteristics of low ambiguity and distinct semantic features, making them suitable for representing entities. However, existing NER methods typically rely solely on the semantic logic of raw text to extract entity boundary information during training. Due to the shared contextual semantics between boundary and non-boundary words, these models often struggle to adequately perceive the semantic features of entity boundaries and capture the corresponding semantic information. To address this issue, we propose a Chinese Named Entity Recognition (CNER) model based on boundary mask. This model comprises three modules: entity boundary detection, entity encoding, and entity classification. Specifically, the entity boundary detection module first identifies candidate entity boundaries. Subsequently, the entity encoding module constructs a set of candidate entities based on these boundaries. By introducing the start boundary clue marker [B], the end boundary clue marker [E], and the pre-trained language model's mask token [MASK] to locate and mask entity boundaries, the model enhances its ability to perceive entity boundary semantic features and fully exploit the pre-trained language model's latent knowledge regarding candidate entities. Finally, the model integrates the original semantic information of entity boundaries, the semantic clues from boundary markers, and the boundary semantics predicted via mask tokens. This integrated representation is then interacted with true entity type information using a biaffine mechanism, thereby significantly enriching the semantic information of entity boundaries and improving the model's performance in entity recognition. Experimental results demonstrate the effectiveness of our proposed model. It achieves F1-scores of 91.40%, 74.06%, and 96.79% on the ACE2005-Chinese, Weibo, and Resume datasets, respectively, validating its superior performance.

Key words: Chinese Named Entity Recognition (CNER), entity boundary, cue marker, boundary mask, multi-marker semantic fusion

中图分类号: