🚀 BioBERT疾病命名實體識別模型
本模型是一款強大且精準的疾病命名實體識別模型,它基於可靠的NCBI疾病數據集對BioBERT進行微調。該模型實現了高達98.64%的準確率和令人矚目的89.04%的F1分數,在疾病提取任務中表現卓越。它能夠從臨床和生物醫學文本中精準識別疾病、症狀和醫療狀況。
🚀 快速開始
本模型可與Hugging Face Transformers庫配合使用。
注意:按照BIO標註格式,LABEL_0對應“O”(外部),LABEL_1對應“B - 疾病”,LABEL_2對應“I - 疾病”。
from transformers import pipeline
nlp = pipeline(
"ner",
model="Ishan0612/biobert-ner-disease-ncbi",
tokenizer="Ishan0612/biobert-ner-disease-ncbi",
aggregation_strategy="simple"
)
text = "The patient has signs of diabetes mellitus and chronic obstructive pulmonary disease."
results = nlp(text)
for entity in results:
print(f"{entity['word']} - ({entity['entity_group']})")
此代碼應輸出:
提取的醫學實體:
the patient has signs of - (LABEL_0)
diabetes - (LABEL_1)
mellitus - (LABEL_2)
and - (LABEL_0)
chronic - (LABEL_1)
obstructive pulmonary disease - (LABEL_2)
. - (LABEL_0)
✨ 主要特性
- 高精度:在疾病提取任務中,準確率達到98.64%,F1分數為89.04%。
- 精準識別:能夠精準識別臨床和生物醫學文本中的疾病、症狀和醫療狀況。
- 數據豐富:基於6800多個帶註釋的示例進行了5個週期的微調,驗證分數始終保持較高水平。
📦 安裝指南
文檔未提及安裝步驟,故跳過此章節。
💻 使用示例
基礎用法
from transformers import pipeline
nlp = pipeline(
"ner",
model="Ishan0612/biobert-ner-disease-ncbi",
tokenizer="Ishan0612/biobert-ner-disease-ncbi",
aggregation_strategy="simple"
)
text = "The patient has signs of diabetes mellitus and chronic obstructive pulmonary disease."
results = nlp(text)
for entity in results:
print(f"{entity['word']} - ({entity['entity_group']})")
高級用法
文檔未提及高級用法代碼示例,故跳過此部分。
📚 詳細文檔
模型性能
- 精確率:86.80%
- 召回率:91.39%
- F1分數:89.04%
- 準確率:98.64%
✅ 基於6800多個帶註釋的示例進行了5個週期的微調,驗證分數始終保持較高水平。
預期用途
- 從臨床和生物醫學文檔中提取疾病提及。
- 支持醫療保健人工智能系統和醫學研究自動化。
訓練數據
該模型在NCBI疾病數據集上進行訓練,該數據集包含793篇PubMed摘要,其中有6892個疾病提及。
🔧 技術細節
文檔未提及技術實現細節,故跳過此章節。
📄 許可證
該模型遵循Apache 2.0許可證,與原始的BioBERT (dmis-lab/biobert-base-cased-v1.1
) 相同。
引用
@article{lee2020biobert,
title={BioBERT: a pre-trained biomedical language representation model for biomedical text mining},
author={Lee, Jinhyuk and Yoon, Wonjin and Kim, Sungdong and Kim, Donghyeon and So, Chan Ho and Kang, Jaewoo},
journal={Bioinformatics},
volume={36},
number={4},
pages={1234--1240},
year={2020},
publisher={Oxford University Press}
}