🚀 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}
}