RoBERTa-based Traditional Chinese Medicine Named Entity Recognition Model
1029Authors
nan
Abstract
AbstractIn this study, a named entity recognition was constructed and applied to the identification of Chinese medicine names and disease names. The results can be further used in a human-machine dialogue system to provide people with correct Chinese medicine medication reminders. First, this study uses web crawlers to sort out web resources into a Chinese medicine named entity corpus, collecting 1097 articles, 1412 disease names and 38714 Chinese medicine names. Then, we annotated each article using TCM name and BIO tagging method. Finally, this study trains and evaluates BERT, ALBERT, RoBERTa, GPT2 with BiLSTM and CRF. The experimental results show that RoBERTa’s NER system combining BiLSTM and CRF achieves the best system performance, with a precision rate of 0.96, a recall rate of 0.96, and an F1-score of 0.96.
Keywords
Full Content
摘要 本研究構建了一個命名實體識別,並 將其應用於中藥名稱和疾病名稱的識 別,其結果可進一步用於人機對話系 統,為人們提供正確的中藥用藥提醒。 首先,本研究利用網路爬蟲整理網路 資源,成為中藥命名實體語料庫,收 集了 1097 篇文章,1412 個疾病名稱和 38714 個中藥名稱。然後,我們使用中 藥名稱和BIO標籤方法對每篇文章進行 標註。最後,本研究用 BiLSTM和 CRF 對 BERT、ALBERT、RoBERTa、GPT2 進行訓練和評估。實驗結果表明, RoBERTa 結合 BiLSTM 和 CRF 的 NER 系統取得了最好的系統性能,其中精 準率為 0.96,召回率為 0.96,F1-score 為 0.96。 Abstract In this study, a named entity recognition was constructed and applied to the identification of Chinese medicine names and disease names. The results can be further used in a human-machine dialogue system to provide people with correct Chinese medicine medication reminders. First, this study uses web crawlers to sort out web resources into a Chinese medicine named entity corpus, collecting 1097 articles, 1412 disease names and 38714 Chinese medicine names. Then, we annotated each article using TCM name and BIO tagging method. Finally, this study trains and evaluates BERT, ALBERT, RoBERTa, GPT2 with BiLSTM and CRF. The experimental results show that RoBERTa's NER system combining BiLSTM and CRF achieves the best system performance, with a precision rate of 0.96, a recall rate of 0.96, and an F1-score of 0.96. 關鍵字:中藥、疾病、命名實體識別模型 Keywords: Traditional Chinese Medicine, Disease, Named Entity Recognition Model 1 Introduction 中藥(Traditional Chinese Medicine, TCM) 是中 華民族傳統藥物的總稱,根據中醫理論指導 下應用的藥物 (Wiki, 2022)。台灣擁有一個融 合了傳統中藥和西藥的多元化醫療環境,中 藥對保健和慢性病的作用近來逐漸受到公眾 的重視,中藥的使用也得到了廣泛的普及 (顏 秋蘭等人, 2020; 葉明功, 2020)。民眾普遍認為 中藥溫和,沒有副作用。因此,人們經常在 沒有醫生處方的情況下到中藥店購買中藥, 或者聽地下電台誇大療效,購買相關中藥產 品,而忽視了中藥的安全性 (楊榮季, 2012)。 根據統計,約有 88.2%的大眾在過去一年中有 過購買和服用中藥的經歷 (顏秋蘭等人, 2020)。 然而,市場上存在著各種非法的藥品廣告和 不合格的產品。國人的用藥習慣不正確,往 往會加重肝腎負擔,甚至誤用、混用、中西 藥相互作用,導致藥物的療效或毒性發生變 化,對健康的影響是不可低估的。王海征等 人 (王海征等人, 2015) 研究指出銀髮族患者病 情複雜,慢性病居多,加上認為中藥其中以 銀髮族用藥錯誤所造成的健康影響最為嚴重。 在 520 例用藥錯誤中,以用法、用量錯誤為最 高,佔了 48.5%。在聊天過程中,如何提供人 們正確的中藥使用方式及用藥資訊,以避免 因錯誤用藥造成健康惡化,是對話系統值得 研究的議題。 深度學習是目前機器學習領域最具前瞻性 的方法,如對話理解 (Su et al., 2018)、對話回 應生成 (Su et al., 2019)、圖像分類 (Chhillar et al., 2020) 或語音翻譯 (McCarthy et al., 2020) 等 成功案例。具深度學習模型的機器,可以從 基於 RoBERTa 的中藥命名實體識別模型 ( RoBERTa-based Traditional Chinese Medicine Named Entity Recognition Model) Ming-Hsiang Su, Chin-Wei Lee, Chi-Lun Hsu and Ruei-Cyuan Su Department of Data Science, Soochow University, Taipei, Taiwan {huntfox.su,vivibank888, laurenhsu31,70613rex}@gmail.com The 34th Conference on Computational Linguistics and Speech Processing (ROCLING 2022) Taipei, Taiwan, November 21-22, 2022. The Association for Computational Linguistics and Chinese Language Processing 61 大量的數據中自行摸索出潛在的抽象規則, 而不需要他人的指導。鑒於近年來深度學習 出色的識別能力,本研究將應用深度學習技 術 於 中 藥 命 名 實 體 識 別(Named Entity Recognition, NER),從而提供對話系統與人的 互動,並提醒避免用藥錯誤。目前,中藥領 域的語料庫還沒有像中文或英文語料庫那樣 多樣化和豐富,這大大增加了中藥命名實體 識別的難度。如果能夠克服中藥命名實體識 別的問題,就有可能正確識別人機對話中人 們提到的藥名,這對後續用藥提醒回應的生 成有很大的幫助。對於中藥領域,目前還沒 有適合使用的中藥公共知識庫。如果能通過 網路爬蟲將網路資源整理成中藥知識庫,包 括各種類型的中藥和中藥處方及療效,將對 對話系統和問答系統有很大幫助。 現今,在命名實體識別任務中,主要採用 基於循環神經網路(Recurrent Neural Network, RNN)的方法 (Chiu & Nichols, 2016; Lample et al., 2016) 作為序列標註的模型,並輔以字元級 的詞向量或有其他文本特徵。Chiu 和 Nichols (Chiu & Nichols, 2016) 在序列標註模型中使用 了雙向長短期記憶循環神經網路(Bidirectional Long Short-Term Memory, Bi-LSTM)。在循環 神經網路輸出後,使用人工網路來確定哪些 電流應該被標記。命名實體,作者使用字元 級模型使用了具有一些字元特徵的卷積神經 網路 (Convolutional Neural Network, CNN),例 如首字母是否大寫。 而 Lample et al. (Lample et al., 2016) 使用一層 條件隨機域 (Conditional Random Fields, CRF)來 判斷當前的標註結果。他們利用 CRF 的特點, 讓前一個時間點的標註結果影響當前的標註, 從而提高準確率。另一方面,字元層面的編 碼也發生了變化,他們在字元層面使用了預 先訓練好的詞向量語另一個雙向的長短期循 環神經網路。最後,他們將原始單詞向量語 字元級向量連接起來,作為單詞的代表向量。 除了使用 RNN 來判斷命名實體外,Strubell et al. (Strubell et al., 2017) 使用疊代擴張卷積神經 網 路 (Iterated Dilated Convolutional Neural Networks, ID-CNN)來處理命名實體以達到加 速的目的。他們通過卷積網路的特殊結構, 解決了卷積網路不適合於序列標註的缺點。 NER 系統通常通過將其輸出與人類注釋進 行比較來評估,這可以通過精確匹配來量化。 NER 涉及到實體邊界和實體類型,通過精確 匹配評估,只有當時體邊界和實體類型都與 基礎事實相匹配時,命名實體才被認為是正 確的 (Tjong et al., 2003; Pradhan et al., 2012; Li et al., 2020)。由於大多數NER系統涉及多種實體 類型,因此通常需要評估所有實體類型的性 能,這方面通常使用兩種方法,宏觀平均的 F-score 和微觀平均的 F-score,宏觀平均 F- score 是針對每個實體類型獨立計算的,然後 取其平均值。微觀平均 F-score 將所有類別的 實體貢獻彙總,計算出一個平均值。後者可 能會受到語料庫中大類別識別實體質量的嚴 重影響。 2 Dataset Collection 在台灣,雖然人們經常使用中藥來保養身體, 但很少有人整理中藥數據集來訓練 NER 模型。 在 本 研 究 中 , 採 用 爬 蟲 從 KingNet 網 站 (KingNet, 2022) 和 CloudTCM 網站 (CloudTCM, 2022) 檢索中藥數據。對於中藥和處方的種類, 根據其名稱、功效、用法、禁忌等,自動整 理成適合 NER模型的中藥數據集。在 KingNet 網站上,共收集了 730 篇文章,包含 678,846 個單詞;而在 CloudTCM 網站上,共收集了 367 篇文章,包含 1,219,168 單詞。中藥名稱和處 方名稱的例子見 Table1。然後本研究採用內- 外-開始 (IOB) 進行標註,我們將中藥名稱標 註為 ”B-TMC” 和 “I-TMC”,症狀標註為 “B- SYMP” 和 “I-SYMP”,其他標註為 “O”。例 如,”人蔘的安神益智功效主要表現在促進學 …
Content truncated to 500 words
Labeled Text
AbstractIn this study, a named entity recognition was constructed and applied to the identification of Chinese medicine names and disease names. The results can be further used in a human-machine dialogue system to provide people with correct Chinese medicine medication reminders. First, this study uses web crawlers to sort out web resources into a Chinese medicine named entity corpus, collecting 1097 articles, 1412 disease names and 38714 Chinese medicine names. Then, we annotated each article using TCM name and BIO tagging method. Finally, this study trains and evaluates BERT, ALBERT, RoBERTa, GPT2 with BiLSTM and CRF. The experimental results show that RoBERTa’s NER system combining BiLSTM and CRF achieves the best system performance, with a precision rate of 0.96, a recall rate of 0.96, and an F1-score of 0.96.
Publication Details
- Paper ID:
- 1029
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan