劉宇鵬 栗冬冬
摘 要:傳統(tǒng)的命名實體識別方法依賴大量的人工選擇的特征和專業(yè)領(lǐng)域的外部知識,針對這一問題,提出了一種新穎的神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu),該算法結(jié)合了雙向LSTM,CNN和CRF可以同時自動獲取到基于字符級別和詞語級別的表示,是一種真正意義上的端到端的結(jié)構(gòu),不再需要人工選擇特征和數(shù)據(jù)的預(yù)處理,可以應(yīng)用到各個領(lǐng)域的命名實體識別任務(wù)中去。最后,通過實驗證明該算法在醫(yī)療領(lǐng)域和新聞領(lǐng)域的F1值分別達到了90-97%和92-19%。
關(guān)鍵詞:命名實體識別;長短期記憶網(wǎng)絡(luò);卷積神經(jīng)網(wǎng)絡(luò);條件隨機場
DOI:10.15938/j.jhust.2020.01.017
中圖分類號: TP391.1
文獻標志碼: A
文章編號: 1007-2683(2020)01-0115-06
Abstract:Traditional algorithms of named entity recognition rely on a large number of artificial features and external knowledgeTo solve this problem, we propose a novel neural network structure which combines the bidirectional LSTM(Long Short-Term Memory), CNN(Convolution Neural Network) and CRF(Conditional Random Field)This algorithm can also automatically get both character-level and word-level representationsIt is a truly end-to-end system, requiring no feature engineering and data processingThus, it can be easily applied to various fields of named entity recognition taskFinally, the experimental results show that the F1 measure of the algorithm in the medical and news field is 90-97% and 92-19%, respectively-Keywords:named entity recognition; long short-term memory; convolution neural network; conditional random field
0 引 言
命名實體識別(named entity recognition, NER)作為自然語言處理的一項基礎(chǔ)任務(wù),在自然語言處理領(lǐng)域有著很重要的作用[1-2],分為在不同語言上的命名實體識別[3-4],微博上的命名實體識別[5]和Twitter上的命名實體識別[6-8]等。在機器對話、問答系統(tǒng)、機器翻譯等任務(wù)中都有著重要的應(yīng)用。傳統(tǒng)方法中表現(xiàn)最優(yōu)的就是基于統(tǒng)計的模型,例如隱
馬爾可夫模型(hidden markov models HMM)、條件隨機場模型(conditional random fields, CRF)[9],這些方法需要大量的人工選擇的特征和外部知識信息,例如字典信息,很難直接解決一個全新領(lǐng)域的命名實體識別問題。近年來,利用神經(jīng)網(wǎng)絡(luò)獲取詞語表示作為模型的輸入(例如詞向量)在自然語言處理領(lǐng)域取得了巨大的成功[10-12]。循環(huán)神經(jīng)網(wǎng)絡(luò)以及其變形長短期記憶網(wǎng)絡(luò)(long-short term memory, LSTM)在解決序列標注任務(wù)中表現(xiàn)優(yōu)異[13-15]。
本文提出了一種結(jié)合雙向LSTM、卷積神經(jīng)網(wǎng)絡(luò)(convolutional neural network, CNN)、CRF的方法,首先利用CNN獲取詞語基于字符的表示,然后結(jié)合詞向量加入到雙向LSTM中,最后利用線性CRF聯(lián)合解碼標簽。該模型不需要外部知識和手工選擇特征,在不同領(lǐng)域的數(shù)據(jù)上進行實驗驗證了其可行性和有效性。
1 問題描述
NER是指從一段文本中提取出具有特定含義的詞語,即實體[16]。實體的類型有很多種,常見的有人名、地名、機構(gòu)名等,在一些特定領(lǐng)域會有其獨特的實體,例如醫(yī)療領(lǐng)域的病癥名稱、藥物名稱等。這些實體信息對進一步分析句子含義有很大的幫助。
一般會把NER問題看成序列標注問題,標注問題一般是監(jiān)督學(xué)習(xí)問題,也可以看成是一種復(fù)雜的結(jié)構(gòu)預(yù)測問題的簡單形式[17]。NER任務(wù)分為學(xué)習(xí)和標注兩個過程,首先有一個帶標注信息的數(shù)據(jù)集作為訓(xùn)練數(shù)據(jù)。
2 神經(jīng)網(wǎng)絡(luò)結(jié)構(gòu)
2-1 CNN提取字符級別的表示
之前的研究表明卷積神經(jīng)網(wǎng)絡(luò)(convolutional neural network, CNN)在提取局部特征方面十分有效[18],因此在本系統(tǒng)中先利用CNN提取出詞語基于字符的特征將其編碼到神經(jīng)網(wǎng)絡(luò)中。其結(jié)構(gòu)表示圖如圖1所示,CNN的輸入為字符的embedding,圖1中虛線部分為dropout層。
4-3 實驗結(jié)果分析
通過在兩組不同領(lǐng)域的數(shù)據(jù)集上進行實驗,本文中混合模型在各組實驗中均取得了高于單一模型的預(yù)測效果。且在新聞領(lǐng)域和醫(yī)療領(lǐng)域中,實體類別區(qū)別非常大,使用本文中的模型,不需要任何的數(shù)據(jù)預(yù)處理和引入外部知識信息。驗證了該模型可以很好的應(yīng)用到不同領(lǐng)域的命名實體識別任務(wù)中,模型的通用性較好。
5 結(jié) 論
針對命名實體識別在不同領(lǐng)域中的類型千差萬別,傳統(tǒng)的命名實體識別方法中需要大量人工選擇的特征和引入外部的知識信息,本文提出了一種結(jié)合CNN、BLSTM、CRF的模型,可以直接應(yīng)用到不同類型的實體標注中去。通過在新聞領(lǐng)域和醫(yī)療領(lǐng)域數(shù)據(jù)集上的多組對比實驗,該系統(tǒng)均取得了高于傳統(tǒng)單一模型的結(jié)果。在接下來的工作中,可以對模型進一步改進,探索多任務(wù)學(xué)習(xí)方法,針對不同的領(lǐng)域結(jié)合更多有用的相關(guān)信息。
參 考 文 獻:
[1] DAVID N,SATOSHI S.A Survey of Named Entity Recognition and Classification[J]. Logistical Investigations,2007,30(1):3.
[2] 劉瀏, 王東波. 命名實體識別研究綜述[J]. 情報學(xué)報, 2018, 37(3): 329.LIU Liu, WANG Dongbo. A Survey of Named Entity Recognition)[J]. Journal of the China Society for Scientific and Technical Information, 2018, 37(3): 329.
[3] 王路路, 艾山, 吾買爾. 基于 CRF 和半監(jiān)督學(xué)習(xí)的維吾爾文命名實體識別[J]. 中文信息學(xué)報, 2018, 32(11): 16.WANG Lulu, AI Shan, WU Maier. A Semi-supervised Approach to Uyghur Named Entity Recognition Based on CRF)[J]. Journal of Chinese Information Processing, 2018, 32(11): 16.
[4] 徐廣義, 嚴馨, 余正濤, 等. 融合跨語言特征的柬埔寨語命名實體識別方法[J]. 云南大學(xué)學(xué)報(自然科學(xué)版), 2018, 40(5): 865.XU Guangyi, YAN Xin, YU Zhengtao,et al. A Khmer Named Entity Recognition Method Incorporating Cross-lingual Features)[J]. Journal of Yunnan University(Natural Sciences Edition), 2018, 40(5): 865.
[5] 朱顥東, 楊立志, 丁溫雪, 等. 基于主題標簽和 CRF 的中文微博命名實體識別[J]. 華中師范大學(xué)學(xué)報(自然科學(xué)版), 2018, 52(3): 316.ZHU Haodong, YANG Lizhi, DING Wenxue,et al. Named Entity Recognition of Chinese Microblog based on Theme tag and CRF)[J].Journal of Central China Normal University(Natural Sciences) , 2018, 52(3): 316.
[6] RITTER A, CLARK S, ETZIONI O. Named Entity Recognition in Tweets: an Experimental Study[C]// Proceedings of the Conference on Empirical Methods in Natural Language Processing. Stroudsburg: Association for Computational Linguistics, 2011: 1524.
[7] LIU X, ZHANG S, WEI F, et al. Recognizing Named Entities in Tweets[C]// Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: Association for Computational Linguistics, 2011: 359.
[8] LI C, WENG J, HE Q, et al. Twiner: Named Entity Recognition in Targeted Twitter Stream[C]//Proceedings of the 35th International ACM SIGIR Conference on Research and Development in Information Retrieval, New York: ACM Press, 2012: 721.
[9] 張祝玉,任飛亮,朱靖波.基于條件隨機場的中文命名實體識別特征比較研究[C]//第四屆全國信息檢索與內(nèi)容安全學(xué)術(shù)會議,2008:8.ZHANG Zhuyu,REN Feiliang ZHU Jingbo.A Comparative Study of Chinese Named Entity Recognition Features based on Conditional Random Fields)[C]//NCIRC,2008:8.
[10]WU Y,JIANG M,LEI J ,et al.Named Entity Recognition in Chines Text Using Deep Neural Network[J].Studies in Health Technology and Information,2015, 15(1):624.
[11]劉樹杰,董力,張家俊.深度學(xué)習(xí)在自然語言處理中的應(yīng)用[J].中國計算機學(xué)會通訊,2015,18(2):11.LIU Shujie,DONG Li,ZHANG Jiajun.The Application of Deep Learning in Natural Language Processing[J].Communications of the CCF,2015,18(2):11.
[12]WU Y,JIANG M,LEI J,et al.Named Entity Recognition in Chinese Clinical Text using Deep Neural Network[J].Studies in Health Technology and Informatics,2015,216:624.
[13]CICERO D,VICTOR G,RJ N,et al.Boosting Named Entity Recognition with Neural Character Embeddings[C]//In Proceedings of NEWS 2015 The Fifth Named Entities Workshop,2015:25.
[14]WU Y,JIANG M,LEI J,et al.Named Entity Recognition in Chines Text Using Deep Neural Network[J].Studies in Health Technology and Information,2015, 18(1): 462.
[15]HUANG Z , XU W , YU K . Bidirectional LSTM-CRF Models for Sequence Tagging[J]. Computer Science, 2015, 4(1):1508.
[16]ANDO R,ZHANG T.A Framework for Learning Predictive Structures from Multiple Tasks and Unlabeled Data[J].The Journal of Machine Learning Research,2005(6):1817.
[17]陳鋒, 翟羽佳, 王芳. 基于條件隨機場的學(xué)術(shù)期刊中理論的自動識別方法[J]. 圖書情報工作, 2016, 60(2): 122.CHEN Feng, ZHAI Yujia, WANG Fang. Automatic Theory Recognition in Academic Journals Based on CRF)[J]. Library and Information Service, 2016, 60(2): 122.
[18]CHIU J, NICHOLS E. Named Entity Recognition with Bidirectional LSTM-CNNs[J]. Transactions of the Association for Computational Linguistics, 2016(4): 357.
[19]曲春燕,關(guān)毅,楊錦鋒,等.中文電子病歷命名實體標注語料庫構(gòu)建[J].高技術(shù)通訊,2015(2):143.QU Chunyan,GUAN Yi,YANG Jinfeng,et al.The Construction of Annotated Corpora of Named Entities for Chinese Electronic Medical Records [J].Chinese High Technology Letters,2015(2):143.
[20]PENG N,DREDZE M.Named Entity Recognition for Chinese social Media with Jointly Trained Embeddings[C]//Proceedings of EMNLP,2015:548.
(編輯:溫澤宇)