《计算机应用》唯一官方网站 ›› 2024, Vol. 44 ›› Issue (2): 377-384.DOI: 10.11772/j.issn.1001-9081.2023020239
所属专题: 人工智能
收稿日期:
2023-03-06
修回日期:
2023-05-16
接受日期:
2023-05-22
发布日期:
2023-08-14
出版日期:
2024-02-10
通讯作者:
胡建鹏
作者简介:
黄子麒(1997—),男,江西赣州人,硕士研究生,CCF学生会员,主要研究方向:自然语言处理;
基金资助:
Received:
2023-03-06
Revised:
2023-05-16
Accepted:
2023-05-22
Online:
2023-08-14
Published:
2024-02-10
Contact:
Jianpeng HU
About author:
HUANG Ziqi, born in 1997, M. S. candidate. His research interests include natural language processing.
Supported by:
摘要:
针对中文汽车领域实体抽取任务中对嵌套实体、长实体识别效果差的问题,提出一种实体类别增强的嵌套实体抽取(ECE-NER)模型。首先,基于特征融合编码,提高模型对领域实体边界的感知能力;然后,尾词识别模块利用多层感知机得到实体尾词集合;最后,前向边界识别模块基于义原构造的实体类别特征和自注意力机制得到实体类别增强的候选尾词表征,融合领域实体类别特征,利用双仿射编码器计算特定尾词和实体类型的实体跨度概率,从而确定命名实体。在某汽车企业生产线故障数据集、汽车工业故障抽取评测数据集CCL2022和中文医学文本数据集CHIP2020上进行模型验证。实验结果表明,所提模型在前两个数据集上的实体识别F1值比序列标注模型(BERT+BiLSTM+CRF)、基于跨度的实体抽取模型(PURE(Princeton University Relation Extraction)、SpERT(Span-based Entity and Relation Transformer))分别提高了4.1、1.8、1.6个百分点和9.0、5.4、7.3个百分点;在第一个数据集和第三个数据集中嵌套实体识别F1值与PURE、SpERT模型相比提高了13.3、8.3个百分点和21.7、9.3个百分点,验证了所提模型在嵌套实体识别上的有效性。
中图分类号:
黄子麒, 胡建鹏. 实体类别增强的汽车领域嵌套命名实体识别[J]. 计算机应用, 2024, 44(2): 377-384.
Ziqi HUANG, Jianpeng HU. Entity category enhanced nested named entity recognition in automotive domain[J]. Journal of Computer Applications, 2024, 44(2): 377-384.
实体类别 | 备注 | 实例 | 实体数 |
---|---|---|---|
总和 | 12 204 | ||
设备单元 | 设备的名称、型号 | 主轴、夹爪 | 4 592 |
设备功能 | 设备的功能表述 | 切割、对刀 | 475 |
检修动作 | 检修设备的动作 | 更换、紧固 | 3 746 |
检修工具 | 对设备检修的工具 | 电脑、图纸 | 60 |
失效模式 | 设备的故障描述 | 电压异常 | 2 734 |
设备属性 | 设备理化属性 | 电压13.5 V | 597 |
表1 汽车故障文本实体定义
Tab. 1 Text entity definition of automobile fault
实体类别 | 备注 | 实例 | 实体数 |
---|---|---|---|
总和 | 12 204 | ||
设备单元 | 设备的名称、型号 | 主轴、夹爪 | 4 592 |
设备功能 | 设备的功能表述 | 切割、对刀 | 475 |
检修动作 | 检修设备的动作 | 更换、紧固 | 3 746 |
检修工具 | 对设备检修的工具 | 电脑、图纸 | 60 |
失效模式 | 设备的故障描述 | 电压异常 | 2 734 |
设备属性 | 设备理化属性 | 电压13.5 V | 597 |
数据集 | 训练集 | 验证集 | 测试集 |
---|---|---|---|
CCL2022 | 2 400 | 300 | 300 |
FDoAPL | 2 543 | 318 | 318 |
CHIP2020 | 16 000 | 2 000 | 2 000 |
表2 数据集句子划分
Tab.2 Dataset sentence division
数据集 | 训练集 | 验证集 | 测试集 |
---|---|---|---|
CCL2022 | 2 400 | 300 | 300 |
FDoAPL | 2 543 | 318 | 318 |
CHIP2020 | 16 000 | 2 000 | 2 000 |
模型参数 | 参数值 | 模型参数 | 参数值 |
---|---|---|---|
batch size | 4 | CNN窗大小 | 8.0 |
学习率 | 5×10-5 | α | 0.5 |
优化器 | AdamW | γ | 0.5 |
tail threshold | 0.6 | max_span_size | 11.0 |
表3 本文模型参数
Tab.3 Parameters of proposed model
模型参数 | 参数值 | 模型参数 | 参数值 |
---|---|---|---|
batch size | 4 | CNN窗大小 | 8.0 |
学习率 | 5×10-5 | α | 0.5 |
优化器 | AdamW | γ | 0.5 |
tail threshold | 0.6 | max_span_size | 11.0 |
模型 | CCL2022 | FDoAPL | ||||
---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | |
序列标注 | 69.8 | 81.3 | 75.1 | 73.0 | 78.1 | 75.5 |
PURE | 78.8 | 78.5 | 78.7 | 75.6 | 80.1 | 77.8 |
SpERT | 72.8 | 81.2 | 76.8 | 77.3 | 78.7 | 78.0 |
本文模型 | 83.4 | 84.8 | 84.1 | 78.2 | 81.1 | 79.6 |
表4 汽车领域实体识别结果 (%)
Tab.4 Entity recognition results for automotive domain
模型 | CCL2022 | FDoAPL | ||||
---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | |
序列标注 | 69.8 | 81.3 | 75.1 | 73.0 | 78.1 | 75.5 |
PURE | 78.8 | 78.5 | 78.7 | 75.6 | 80.1 | 77.8 |
SpERT | 72.8 | 81.2 | 76.8 | 77.3 | 78.7 | 78.0 |
本文模型 | 83.4 | 84.8 | 84.1 | 78.2 | 81.1 | 79.6 |
FDoAPL | CHIP2020 | ||||||
---|---|---|---|---|---|---|---|
合计 | 12 204 | 1 346 | 11.0 | 合计 | 82 096 | 4 903 | 6.0 |
实体 类型 | 实体数 | 嵌套实体 | 实体 类型 | 实体数 | 嵌套实体 | ||
数量 | 占比/% | 数量 | 占比/% | ||||
设备单元 | 4 592 | 845 | 18.4 | bod | 23 580 | 4 114 | 17.4 |
设备功能 | 475 | 82 | 17.3 | dis | 20 778 | 229 | 1.1 |
检修动作 | 3 746 | 79 | 2.1 | sym | 16 399 | 2 | 0.0 |
检修工具 | 60 | 7 | 11.7 | mic | 2 492 | 23 | 0.9 |
失效模式 | 2 734 | 87 | 3.2 | pro | 8 389 | 58 | 0.6 |
性能表征 | 597 | 246 | 41.2 | ite | 3 504 | 426 | 12.2 |
dep | 458 | 2 | 0.4 | ||||
dru | 5 370 | 36 | 0.7 | ||||
equ | 1 126 | 13 | 1.2 |
表5 嵌套实体比例统计
Tab.5 Proportion statistics of nested entities
FDoAPL | CHIP2020 | ||||||
---|---|---|---|---|---|---|---|
合计 | 12 204 | 1 346 | 11.0 | 合计 | 82 096 | 4 903 | 6.0 |
实体 类型 | 实体数 | 嵌套实体 | 实体 类型 | 实体数 | 嵌套实体 | ||
数量 | 占比/% | 数量 | 占比/% | ||||
设备单元 | 4 592 | 845 | 18.4 | bod | 23 580 | 4 114 | 17.4 |
设备功能 | 475 | 82 | 17.3 | dis | 20 778 | 229 | 1.1 |
检修动作 | 3 746 | 79 | 2.1 | sym | 16 399 | 2 | 0.0 |
检修工具 | 60 | 7 | 11.7 | mic | 2 492 | 23 | 0.9 |
失效模式 | 2 734 | 87 | 3.2 | pro | 8 389 | 58 | 0.6 |
性能表征 | 597 | 246 | 41.2 | ite | 3 504 | 426 | 12.2 |
dep | 458 | 2 | 0.4 | ||||
dru | 5 370 | 36 | 0.7 | ||||
equ | 1 126 | 13 | 1.2 |
模型 | FDoAPL | CHIP2020 | ||||
---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | |
PURE | 68.3 | 24.1 | 35.6 | 63.2 | 11.3 | 19.1 |
SpERT | 61.3 | 30.4 | 40.6 | 65.8 | 20.7 | 31.5 |
本文模型 | 67.1 | 38.5 | 48.9 | 72.4 | 28.4 | 40.8 |
表6 嵌套实体识别结果 (%)
Tab. 6 Nested entity recognition results
模型 | FDoAPL | CHIP2020 | ||||
---|---|---|---|---|---|---|
P | R | F1 | P | R | F1 | |
PURE | 68.3 | 24.1 | 35.6 | 63.2 | 11.3 | 19.1 |
SpERT | 61.3 | 30.4 | 40.6 | 65.8 | 20.7 | 31.5 |
本文模型 | 67.1 | 38.5 | 48.9 | 72.4 | 28.4 | 40.8 |
数据集 | 长度L | 实体数 | F1值/% | ||
---|---|---|---|---|---|
PURE | SpERT | 本文模型 | |||
FDoAPL | [1,5) | 851 | 81.7 | 82.4 | 82.7 |
[5,10) | 327 | 71.5 | 64.2 | 74.1 | |
[10,+∞) | 83 | 30.4 | 51.8 | 59.3 | |
CCL2022 | [1,5) | 587 | 79.2 | 77.9 | 85.3 |
[5,10) | 116 | 70.7 | 70.5 | 75.3 | |
[10,+∞) | 10 | 30.8 | 66.7 | 76.4 | |
CHIP2020 | [1,5) | 5 052 | 67.1 | 74.2 | 77.3 |
[5,10) | 3 681 | 64.1 | 71.8 | 76.1 | |
[10,+∞) | 666 | 17.6 | 24.3 | 31.7 |
表7 3个数据集中不同模型不同实体长度的F1值对比
Tab.7 Comparison of F1 values for different models with different entity lengths in 3 datasets
数据集 | 长度L | 实体数 | F1值/% | ||
---|---|---|---|---|---|
PURE | SpERT | 本文模型 | |||
FDoAPL | [1,5) | 851 | 81.7 | 82.4 | 82.7 |
[5,10) | 327 | 71.5 | 64.2 | 74.1 | |
[10,+∞) | 83 | 30.4 | 51.8 | 59.3 | |
CCL2022 | [1,5) | 587 | 79.2 | 77.9 | 85.3 |
[5,10) | 116 | 70.7 | 70.5 | 75.3 | |
[10,+∞) | 10 | 30.8 | 66.7 | 76.4 | |
CHIP2020 | [1,5) | 5 052 | 67.1 | 74.2 | 77.3 |
[5,10) | 3 681 | 64.1 | 71.8 | 76.1 | |
[10,+∞) | 666 | 17.6 | 24.3 | 31.7 |
消融模型 | P | R | F1 | ||
---|---|---|---|---|---|
整体 | 嵌套实体 | 长度L>10 | |||
ECE-NER | 78.2 | 81.1 | 79.6 | 48.9 | 59.3 |
ECE-NER- 句法特征融合 | 77.6 | 80.4 | 79.0 | 48.6 | 58.7 |
ECE-NER- 实体特征构造 | 76.7 | 72.5 | 77.6 | 46.4 | 52.1 |
ECE-NER- 字符CNN编码 | 77.4 | 80.2 | 78.8 | 47.3 | 56.7 |
表8 消融实验结果 (%)
Tab.8 Results of ablation experiment
消融模型 | P | R | F1 | ||
---|---|---|---|---|---|
整体 | 嵌套实体 | 长度L>10 | |||
ECE-NER | 78.2 | 81.1 | 79.6 | 48.9 | 59.3 |
ECE-NER- 句法特征融合 | 77.6 | 80.4 | 79.0 | 48.6 | 58.7 |
ECE-NER- 实体特征构造 | 76.7 | 72.5 | 77.6 | 46.4 | 52.1 |
ECE-NER- 字符CNN编码 | 77.4 | 80.2 | 78.8 | 47.3 | 56.7 |
1 | MIWA M, BANSAL M. End-to-end relation extraction using LSTMs on sequences and tree structures[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2016: 1105-1116. 10.18653/v1/p16-1105 |
2 | HANIFAH A F, KUSUMANINGRUM R. Non-factoid answer selection in Indonesian science question answering system using Long Short-Term Memory (LSTM)[J]. Procedia Computer Science, 2021, 179: 736-746. 10.1016/j.procs.2021.01.062 |
3 | BAI T, GE Y, GUO S, et al. Enhanced natural language interface for web-based information retrieval[J]. IEEE Access, 2020, 9: 4233-4241. 10.1109/access.2020.3048164 |
4 | 赵鹏飞, 赵春江, 吴华瑞, 等. 基于BERT的多特征融合农业命名实体识别[J]. 农业工程学报, 2022, 38(3): 112-118. 10.11975/j.issn.1002-6819.2022.03.013 |
ZHAO P F, ZHAO C J, WU H R, et al. Recognition of the agricultural named entities with multi-feature fusion based on BERT[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(3): 112-118. 10.11975/j.issn.1002-6819.2022.03.013 | |
5 | 刘文松, 胡竹青, 张锦辉, 等. 基于文本特征增强的电力命名实体识别[J]. 电力系统自动化, 2022, 46(21): 134-142. 10.7500/AEPS20210323003 |
LIU W S, HU Z Q, ZHANG J H, et al. Named entity recognition for electric power industry based on enhanced text features [J]. Automation of Electric Power Systems, 2022, 46: 134-142. 10.7500/AEPS20210323003 | |
6 | 马建红, 张炳斐, 张少光, 等. 基于主动MCNN-SCRF的新能源汽车命名实体识别[J]. 计算机工程与应用, 2019, 55(7): 23-29. |
MA J H, ZHANG B F, ZHANG S G, et al. Named entity recognition for new energy vehicles based on active MCNN-SCRF[J]. Computer Engineering and Applications, 2019, 55(7): 23-29. | |
7 | 张永平. 汽车领域命名实体识别方法研究[D]. 株洲: 湖南工业大学, 2016: 2-7. |
ZHANG Y P. Research on named entity recognition method in automobile field[D]. Zhuzhou: Hunan University of Technology, 2016: 2-7. | |
8 | BHATTACHARYA M, BHAT S, TRIPATHY S, et al. Improving biomedical named entity recognition through transfer learning and asymmetric tri-training[J]. Procedia Computer Science, 2023, 218: 2723-2733. 10.1016/j.procs.2023.01.244 |
9 | DEVLIN J, CHANG M-W, LEE K, et al. BERT: pre-training of deep bidirectional Transformers for language understanding[C] // Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies(Volume 1: Long and Short Papers). Stroudsburg: ACL, 2019: 4171-4186. 10.18653/v1/n18-2 |
10 | LU W, ROTH D. Joint mention extraction and classification with mention hypergraphs[C] // Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2015: 857-867. 10.18653/v1/d15-1102 |
11 | KATIYAR A, CARDIE C. Nested named entity recognition revisited[C]// Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies(Volume 1: Long Papers). Stroudsburg: ACL, 2018: 861-871. 10.18653/v1/n18-1079 |
12 | LI H, YU L, LYU M, et al. Fusion deep learning and machine learning for multi-source heterogeneous military entity recognition[C]// Proceedings of the 2021 IEEE Conference on Telecommunications, Optics and Computer Science. Piscataway: IEEE, 2021: 535-539. 10.1109/tocs53301.2021.9688813 |
13 | JU M, MIWA M, ANANIADOU S. A neural layered model for nested named entity recognition[C]// Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). Stroudsburg: ACL, 2018: 1446-1459. 10.18653/v1/n18-1131 |
14 | SOHRAB M G, MIWA M. Deep exhaustive model for nested named entity recognition[C]// Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2018: 2843-2849. 10.18653/v1/d18-1309 |
15 | ZHONG Z, CHEN D. A frustratingly easy approach for entity and relation extraction[C]// Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Stroudsburg: ACL, 2021: 50-61. 10.18653/v1/2021.naacl-main.5 |
16 | EBERTS M, ULGES A. Span-based joint entity and relation extraction with transformer pre-training[EB/OL]. (2019-09-17)[2023-03-06]. . 10.18653/v1/2021.eacl-main.319 |
17 | 黄昌宁, 李玉梅, 朱晓丹. 中文文本标注规范(5.0版)[EB/OL]. 微软亚洲研究院(2006-03-27)[2023-02-10]. . |
HUANG C N, LI Y M, ZHU X D. Chinese text annotation specification (Version 5.0)[EB/OL]. Microsoft Asia Research Institute(2006-03-27)[2023-02-10]. . | |
18 | PAN S J, YANG Q. A survey on transfer learning[J]. IEEE Transactions on Knowledge Data Engineering, 2010, 22(10): 1345-1359. 10.1109/tkde.2009.191 |
19 | MIKOLOV T, CHEN K, CORRADO G, et al. Efficient estimation of word representations in vector space[EB/OL]. (2013-01-16)[2023-02-01]. . 10.3126/jiee.v3i1.34327 |
20 | PENNINGTON J, SOCHER R, MANNING C. GloVe: global vectors for word representation[C]// Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2014: 1532-1543. 10.3115/v1/d14-1162 |
21 | CUI Y, CHE W, LIU T, et al. Pre-training with whole word masking for Chinese BERT[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2021, 29: 3504-3514. 10.1109/taslp.2021.3124365 |
22 | CHE W, FENG Y, QIN L, et al. N-LTP: an open-source neural language technology platform for Chinese[EB/OL]. (2021-09-23)[2023-03-06]. . 10.18653/v1/2021.emnlp-demo.6 |
23 | LI X, FENG J, MENG Y, et al. A unified MRC framework for named entity recognition[C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: ACL, 2020: 5849-5859. 10.18653/v1/2020.acl-main.519 |
24 | QI F, YANG C, LIU Z, et al. OpenHowNet: an open sememe-based lexical knowledge base[EB/OL]. (2019-01-28) [2023-03-06]. . 10.18653/v1/p19-1571 |
[1] | 潘烨新, 杨哲. 基于多级特征双向融合的小目标检测优化模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2871-2877. |
[2] | 秦璟, 秦志光, 李发礼, 彭悦恒. 基于概率稀疏自注意力神经网络的重性抑郁疾患诊断[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2970-2974. |
[3] | 李力铤, 华蓓, 贺若舟, 徐况. 基于解耦注意力机制的多变量时序预测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2732-2738. |
[4] | 刘瑞华, 郝子赫, 邹洋杨. 基于多层级精细特征融合的步态识别算法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2250-2257. |
[5] | 徐泽鑫, 杨磊, 李康顺. 较短的长序列时间序列预测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1824-1831. |
[6] | 黄梦源, 常侃, 凌铭阳, 韦新杰, 覃团发. 基于层间引导的低光照图像渐进增强算法[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1911-1919. |
[7] | 刘越, 刘芳, 武奥运, 柴秋月, 王天笑. 基于自注意力机制与图卷积的3D目标检测网络[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1972-1977. |
[8] | 李鑫, 孟乔, 皇甫俊逸, 孟令辰. 基于分离式标签协同学习的YOLOv5多属性分类[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1619-1628. |
[9] | 韩贵金, 张馨渊, 张文涛, 黄娅. 基于多特征融合的自监督图像配准算法[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1597-1604. |
[10] | 李鸿天, 史鑫昊, 潘卫国, 徐成, 徐冰心, 袁家政. 融合多尺度和注意力机制的小样本目标检测[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1437-1444. |
[11] | 黄荣, 宋俊杰, 周树波, 刘浩. 基于自监督视觉Transformer的图像美学质量评价方法[J]. 《计算机应用》唯一官方网站, 2024, 44(4): 1269-1276. |
[12] | 郑宇亮, 陈云华, 白伟杰, 陈平华. 融合事件数据和图像帧的车辆目标检测[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 931-937. |
[13] | 吴宁, 罗杨洋, 许华杰. 基于多尺度特征融合的遥感图像语义分割方法[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 737-744. |
[14] | 李新叶, 侯晔凝, 孔英会, 燕志旗. 结合特征融合与增强注意力的少样本目标检测[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 745-751. |
[15] | 蒋占军, 吴佰靖, 马龙, 廉敬. 多尺度特征和极化自注意力的Faster-RCNN水漂垃圾识别[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 938-944. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||