《计算机应用》唯一官方网站 ›› 2022, Vol. 42 ›› Issue (10): 3011-3017.DOI: 10.11772/j.issn.1001-9081.2021091565
所属专题: 人工智能
曾兰兰, 王以松, 陈攀峰
收稿日期:
2021-09-03
修回日期:
2021-12-02
接受日期:
2022-01-04
发布日期:
2022-04-15
出版日期:
2022-10-10
通讯作者:
王以松
作者简介:
第一联系人:曾兰兰(1997—),女,贵州毕节人,硕士研究生,主要研究方向:自然语言处理、知识表示与推理基金资助:
Lanlan ZENG, Yisong WANG, Panfeng CHEN
Received:
2021-09-03
Revised:
2021-12-02
Accepted:
2022-01-04
Online:
2022-04-15
Published:
2022-10-10
Contact:
Yisong WANG
About author:
ZENG Lanlan, born in 1997, M. S. candidate. Her research interests include natural language processing, knowledge representation and reasoning.Supported by:
摘要:
正确识别裁判文书中的实体是构建法律知识图谱和实现智慧法院的重要基础。然而常用的命名实体识别(NER)模型并不能很好地解决裁判文书中的多义词表示和实体边界识别错误的问题。为了有效提升裁判文书中各类实体的识别效果,提出了一种基于联合学习和BERT的BiLSTM-CRF(JLB-BiLSTM-CRF)模型。首先,利用BERT对输入字符序列进行编码以增强词向量的表征能力;然后,使用双向长短期记忆(BiLSTM)网络建模长文本信息,并将NER任务和中文分词(CWS)任务进行联合训练以提升实体的边界识别率。实验结果表明,所提模型在测试集上的精确率达到了94.36%,召回率达到了94.94%,F1值达到了94.65%,相较于BERT-BiLSTM-CRF模型分别提升了1.05个百分点、0.48个百分点和0.77个百分点,验证了JLB-BiLSTM-CRF模型在裁判文书NER任务上的有效性。
中图分类号:
曾兰兰, 王以松, 陈攀峰. 基于BERT和联合学习的裁判文书命名实体识别[J]. 计算机应用, 2022, 42(10): 3011-3017.
Lanlan ZENG, Yisong WANG, Panfeng CHEN. Named entity recognition based on BERT and joint learning for judgment documents[J]. Journal of Computer Applications, 2022, 42(10): 3011-3017.
实体类别(英文简写) | 训练集 | 验证集 | 测试集 |
---|---|---|---|
作案时间(TIME) | 1 203 | 166 | 180 |
作案地点(LOC) | 1 079 | 156 | 135 |
被告人(DEF) | 1 067 | 225 | 235 |
受害人(VIC) | 797 | 224 | 196 |
案发起因(MOT) | 297 | 54 | 46 |
作案工具(TOOL) | 259 | 65 | 66 |
损失物品(OBJ) | 259 | 64 | 66 |
损失金额(MON) | 731 | 114 | 109 |
人身损伤(INJ) | 52 | 25 | 20 |
表1 各类实体数目
Tab. 1 Number of entities in each category
实体类别(英文简写) | 训练集 | 验证集 | 测试集 |
---|---|---|---|
作案时间(TIME) | 1 203 | 166 | 180 |
作案地点(LOC) | 1 079 | 156 | 135 |
被告人(DEF) | 1 067 | 225 | 235 |
受害人(VIC) | 797 | 224 | 196 |
案发起因(MOT) | 297 | 54 | 46 |
作案工具(TOOL) | 259 | 65 | 66 |
损失物品(OBJ) | 259 | 64 | 66 |
损失金额(MON) | 731 | 114 | 109 |
人身损伤(INJ) | 52 | 25 | 20 |
模型 | 精确率 | 召回率 | F1值 |
---|---|---|---|
BiLSTM-CRF[ | 90.45 | 91.34 | 90.90 |
BiLSTM-CRF(Word2vec) | 92.47 | 91.43 | 91.95 |
ID-CNN-CRF[ | 88.55 | 91.83 | 90.16 |
Lattice-LSTM[ | 91.32 | 91.51 | 91.42 |
BERT-CRF[ | 92.58 | 94.53 | 93.53 |
BERT-BiLSTM-CRF[ | 93.31 | 94.46 | 93.88 |
JLB-BiLSTM-CRF | 94.36 | 94.94 | 94.65 |
表2 不同模型的实验结果对比 (%)
Tab. 2 Comparison of experimental results of different models
模型 | 精确率 | 召回率 | F1值 |
---|---|---|---|
BiLSTM-CRF[ | 90.45 | 91.34 | 90.90 |
BiLSTM-CRF(Word2vec) | 92.47 | 91.43 | 91.95 |
ID-CNN-CRF[ | 88.55 | 91.83 | 90.16 |
Lattice-LSTM[ | 91.32 | 91.51 | 91.42 |
BERT-CRF[ | 92.58 | 94.53 | 93.53 |
BERT-BiLSTM-CRF[ | 93.31 | 94.46 | 93.88 |
JLB-BiLSTM-CRF | 94.36 | 94.94 | 94.65 |
模型 | 示例1 | 示例2 | 示例3 |
---|---|---|---|
BiLSTM-CRF(Word2vec) | 被告人途经 施工中的工地,将12个方管托盘窃走。 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集严1、严2 进入 |
BERT-BiLSTM-CRF[ | 被告人途经 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集 进入 |
JLB-BiLSTM-CRF | 被告人途经 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集 进入 |
表3 三个模型对示例的标记结果
Tab. 3 Marking results of three models on examples
模型 | 示例1 | 示例2 | 示例3 |
---|---|---|---|
BiLSTM-CRF(Word2vec) | 被告人途经 施工中的工地,将12个方管托盘窃走。 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集严1、严2 进入 |
BERT-BiLSTM-CRF[ | 被告人途经 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集 进入 |
JLB-BiLSTM-CRF | 被告人途经 | 被告人脚踢救护车后挡风玻璃,致使挡风 玻璃碎裂。救护车损坏修复费为 | 谭某1纠集 进入 |
实体类别 | 精确率 | 召回率 | F1值 |
---|---|---|---|
被告人 | 95.75 | 96.65 | 96.20 |
受害人 | 95.69 | 94.68 | 95.17 |
案发起因 | 92.31 | 91.73 | 92.01 |
作案时间 | 99.57 | 97.24 | 98.39 |
作案地点 | 96.25 | 98.83 | 97.52 |
作案工具 | 83.38 | 91.11 | 86.99 |
损失物品 | 89.94 | 82.55 | 85.92 |
损失金额 | 95.17 | 100.00 | 97.53 |
人身损伤 | 99.16 | 100.00 | 99.58 |
表4 JLB-BiLSTM-CRF模型对各类实体的识别效果 (%)
Tab. 4 Recognition effect of JLB-BiLSTM-CRF model to each category of entities
实体类别 | 精确率 | 召回率 | F1值 |
---|---|---|---|
被告人 | 95.75 | 96.65 | 96.20 |
受害人 | 95.69 | 94.68 | 95.17 |
案发起因 | 92.31 | 91.73 | 92.01 |
作案时间 | 99.57 | 97.24 | 98.39 |
作案地点 | 96.25 | 98.83 | 97.52 |
作案工具 | 83.38 | 91.11 | 86.99 |
损失物品 | 89.94 | 82.55 | 85.92 |
损失金额 | 95.17 | 100.00 | 97.53 |
人身损伤 | 99.16 | 100.00 | 99.58 |
1 | ZHONG H X, XIAO C J, TU C C, et al. How does NLP benefit legal system: a summary of legal artificial intelligence[C]// Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA: Association for Computational Linguistics, 2020: 5218-5230. 10.18653/v1/2020.acl-main.466 |
2 | BANSAL N, SHARMA A, SINGH R K. A review on the application of deep learning in legal domain[C]// Proceedings of the 15th IFIP International Conference on Artificial Intelligence Applications and Innovations, IFIPAICT 559. Cham: Springer, 2019: 374-381. |
3 | 佘贵清,张永安. 审判案例自动抽取与标注模型研究[J]. 现代图书情报技术, 2013(6):23-29. 10.11925/infotech.1003-3513.2013.06.04 |
SHE G Q, ZHANG Y A. Study on the model of automatic extraction and annotation of trial cases[J]. New Technology of Library and Information Service, 2013(6): 23-29. 10.11925/infotech.1003-3513.2013.06.04 | |
4 | 宋传宝. 基于GATE的司法案件信息抽取方法研究[D]. 天津:天津大学, 2016:26-37. |
SONG C B. Research on the method of information extraction based on GATE[D]. Tianjin: Tianjin University, 2016: 26-37. | |
5 | LE Q, MIKOLOV T. Distributed representations of sentences and documents[C]// Proceedings of the 31st International Conference on Machine Learning. New York: JMLR.org, 2014: 1188-1196. |
6 | LAMPLE G, BALLESTEROS M, SUBRAMANIAN S, et al. Neural architectures for named entity recognition[C]// Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Stroudsburg, PA: Association for Computational Linguistics, 2016: 260-270. 10.18653/v1/n16-1030 |
7 | 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, PA: Association for Computational Linguistics, 2019: 4171-4186. 10.18653/v1/n18-2 |
8 | MORWAL S, JAHAN N, CHOPRA D. Named entity recognition using Hidden Markov Model (HMM)[J]. International Journal on Natural Language Computing, 2012, 1(4):15-23. 10.5121/ijnlc.2012.1402 |
9 | SONG S L, ZHANG N, HUANG H T. Named entity recognition based on conditional random fields[J]. Cluster Computing, 2019, 22(S3): 5195-5206. 10.1007/s10586-017-1146-3 |
10 | JU Z F, WANG J, ZHU F. Named entity recognition from biomedical text using SVM[C]// Proceedings of the 5th International Conference on Bioinformatics and Biomedical Engineering. Piscataway: IEEE, 2011: 1-4. 10.1109/icbbe.2011.5779984 |
11 | HAMMERTON J. Named entity recognition with long short-term memory[C/OL]// Proceedings of the 7th Conference on Natural Language Learning at HLT-NAACL 2003. [2021-07-21]. . 10.3115/1119176.1119202 |
12 | ZHANG Y, YANG J. Chinese NER using lattice LSTM[C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg, PA: Association for Computational Linguistics, 2018: 1554-1564. 10.18653/v1/p18-1144 |
13 | DONG C H, ZHANG J J, ZONG C Q, et al. Character-based LSTM-CRF with radical-level features for Chinese named entity recognition[C]// Proceedings of the 2016 International Conference on Computer Processing of Oriental Languages and the 2016 National CCF Conference on Natural Language Processing and Chinese Computing, LNCS 10102. Cham: Springer, 2016: 239-250. |
14 | STRUBELL E, VERGA P, BELANGER D, et al. Fast and accurate entity recognition with iterated dilated convolutions[C]// Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. Stroudsburg, PA: Association for Computational Linguistics, 2017: 2670-2680. 10.18653/v1/d17-1283 |
15 | MA X Z, HOVY E. End-to-end sequence labeling via bi-directional LSTM-CNNs-CRF[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg, PA: Association for Computational Linguistics, 2016: 1064-1074. 10.18653/v1/p16-1101 |
16 | LIU S, YANG H, LI J Y, et al. Chinese named entity recognition method in history and culture field based on BERT[J]. International Journal of Computational Intelligence Systems, 2021, 14(1): No.163. 10.1007/s44196-021-00019-8 |
17 | LI X Y, ZHANG H, ZHOU X H. Chinese clinical named entity recognition with variant neural structures based on BERT methods[J]. Journal of Biomedical Informatics, 2020, 107: No.103422. 10.1016/j.jbi.2020.103422 |
18 | WANG X, ZHANG Y, REN X, et al. Cross-type biomedical named entity recognition with deep multi-task learning[J]. Bioinformatics, 2019, 35(10): 1745-1752. 10.1093/bioinformatics/bty869 |
19 | TONG Y Q, CHEN Y D, SHI X D. A multi-task approach for improving biomedical named entity recognition by incorporating multi-granularity information[C]// Proceedings of the Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Stroudsburg, PA: Association for Computational Linguistics, 2021: 4804-4813. 10.18653/v1/2021.findings-acl.424 |
20 | HUANG W M, HU D R, DENG Z R, et al. Named entity recognition for Chinese judgment documents based on BiLSTM and CRF[J]. EURASIP Journal on Image and Video Processing, 2020, 2020: No.52. 10.1186/s13640-020-00539-x |
21 | WANG C, LI B, ZHANG W J. Attention-BiLSTM-CRF based model for named entity recognition in judicial domain[J]. Journal of Physics: Conference Series, 2020, 1616: No.012108. 10.1088/1742-6596/1616/1/012108 |
22 | 王得贤,王素格,裴文生,等. 基于JCWA-DLSTM的法律文书命名实体识别方法[J]. 中文信息学报, 2020, 34(10):51-58. 10.3969/j.issn.1003-0077.2020.10.007 |
WANG D X, WANG S G, PEI W S, et al. Named entity recognition based on JCWA-DLSTM for legal instruments[J]. Journal of Chinese Information Processing, 2020, 34(10): 51-58. 10.3969/j.issn.1003-0077.2020.10.007 | |
23 | VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need[C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Red Hook, NY: Curran Associates Inc., 2017: 6000-6010. |
24 | LIU X D, HE P C, CHEN W Z, et al. Multi-Task deep neural networks for natural language understanding[C]// Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Stroudsburg, PA: Association for Computational Linguistics, 2019: 4487-4496. 10.18653/v1/p19-1441 |
25 | ZHANG S X, ZHAO M. Chinese agricultural diseases named entity recognition based on BERT-CRF[C]// Proceedings of the 5th International Conference on Mechanical, Control and Computer Engineering. Piscataway: IEEE, 2020: 1148-1151. 10.1109/icmcce51767.2020.00252 |
[1] | 汪雨晴, 朱广丽, 段文杰, 李书羽, 周若彤. 基于交互注意力机制的心理咨询文本情感分类模型[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2393-2399. |
[2] | 孙焕良, 王思懿, 刘俊岭, 许景科. 社交媒体数据中水灾事件求助信息提取模型[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2437-2445. |
[3] | 吕锡婷, 赵敬华, 荣海迎, 赵嘉乐. 基于Transformer和关系图卷积网络的信息传播预测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1760-1766. |
[4] | 姚迅, 秦忠正, 杨捷. 生成式标签对抗的文本分类模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1781-1785. |
[5] | 于右任, 张仰森, 蒋玉茹, 黄改娟. 融合多粒度语言知识与层级信息的中文命名实体识别模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1706-1712. |
[6] | 沈君凤, 周星辰, 汤灿. 基于改进的提示学习方法的双通道情感分析模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1796-1806. |
[7] | 余杭, 周艳玲, 翟梦鑫, 刘涵. 基于预训练模型与标签融合的文本分类[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 709-714. |
[8] | 董永峰, 白佳明, 王利琴, 王旭. 融合先验知识和字形特征的中文命名实体识别[J]. 《计算机应用》唯一官方网站, 2024, 44(3): 702-708. |
[9] | 罗歆然, 李天瑞, 贾真. 基于自注意力机制与词汇增强的中文医学命名实体识别[J]. 《计算机应用》唯一官方网站, 2024, 44(2): 385-392. |
[10] | 黄子麒, 胡建鹏. 实体类别增强的汽车领域嵌套命名实体识别[J]. 《计算机应用》唯一官方网站, 2024, 44(2): 377-384. |
[11] | 赖华, 孙童, 王文君, 余正涛, 高盛祥, 董凌. 多模态特征的越南语语音识别文本标点恢复[J]. 《计算机应用》唯一官方网站, 2024, 44(2): 418-423. |
[12] | 张小艳, 段正宇. 基于句级别GAN的跨语言零资源命名实体识别模型[J]. 《计算机应用》唯一官方网站, 2023, 43(8): 2406-2411. |
[13] | 拓雨欣, 薛涛. 融合指针网络与关系嵌入的三元组联合抽取模型[J]. 《计算机应用》唯一官方网站, 2023, 43(7): 2116-2124. |
[14] | 雷景生, 剌凯俊, 杨胜英, 吴怡. 基于上下文语义增强的实体关系联合抽取[J]. 《计算机应用》唯一官方网站, 2023, 43(5): 1438-1444. |
[15] | 侯志荣, 范晓东, 张华, 马晓楠. J-SGPGN:基于序列与图的联合学习复述生成网络[J]. 《计算机应用》唯一官方网站, 2023, 43(5): 1365-1371. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||