🚀 (NER) roberta-base : conll2012_ontonotesv5-english-v4
本roberta-base
命名实体识别(NER)模型在conll2012_ontonotesv5
的english-v4
版本数据集上进行了微调。
更多信息请查看NER-System仓库。
🚀 快速开始
本roberta-base
命名实体识别(NER)模型专为解决英文文本中的实体识别问题而设计。它在conll2012_ontonotesv5
的english-v4
版本数据集上进行了微调,能够准确识别多种类型的实体,为信息提取和文本分析提供了强大的支持。
✨ 主要特性
- 基于特定数据集微调:在
conll2012_ontonotesv5
的english-v4
版本数据集上进行微调,更适配英文实体识别任务。
- 多指标评估表现良好:在精确率、召回率和F1分数等评估指标上都有不错的表现。
📦 安装指南
文档未提及安装步骤,暂不展示。
💻 使用示例
基础用法
from transformers import pipeline
ner_pipeline = pipeline(
'token-classification',
model=r'djagatiya/ner-roberta-base-ontonotesv5-englishv4',
aggregation_strategy='simple'
)
高级用法
ner_pipeline("India is a beautiful country")
[{'entity_group': 'GPE',
'score': 0.99186057,
'word': ' India',
'start': 0,
'end': 5}]
ner_pipeline("On September 1st George won 1 dollar while watching Game of Thrones.")
[{'entity_group': 'DATE',
'score': 0.99720246,
'word': ' September 1st',
'start': 3,
'end': 16},
{'entity_group': 'PERSON',
'score': 0.99071586,
'word': ' George',
'start': 17,
'end': 23},
{'entity_group': 'MONEY',
'score': 0.9872978,
'word': ' 1 dollar',
'start': 28,
'end': 36},
{'entity_group': 'WORK_OF_ART',
'score': 0.9946732,
'word': ' Game of Thrones',
'start': 52,
'end': 67}]
📚 详细文档
数据集
数据集 |
示例数量 |
训练集 |
75187 |
测试集 |
9479 |
评估
- 精确率:88.88
- 召回率:90.69
- F1分数:89.78
查看eval.log文件获取评估指标和分类报告。
precision recall f1-score support
CARDINAL 0.84 0.85 0.85 935
DATE 0.85 0.90 0.87 1602
EVENT 0.67 0.76 0.71 63
FAC 0.74 0.72 0.73 135
GPE 0.97 0.96 0.96 2240
LANGUAGE 0.83 0.68 0.75 22
LAW 0.66 0.62 0.64 40
LOC 0.74 0.80 0.77 179
MONEY 0.85 0.89 0.87 314
NORP 0.93 0.96 0.95 841
ORDINAL 0.81 0.89 0.85 195
ORG 0.90 0.91 0.91 1795
PERCENT 0.90 0.92 0.91 349
PERSON 0.95 0.95 0.95 1988
PRODUCT 0.74 0.83 0.78 76
QUANTITY 0.76 0.80 0.78 105
TIME 0.62 0.67 0.65 212
WORK_OF_ART 0.58 0.69 0.63 166
micro avg 0.89 0.91 0.90 11257
macro avg 0.80 0.82 0.81 11257
weighted avg 0.89 0.91 0.90 11257
🔧 技术细节
文档未提供技术实现细节,暂不展示。
📄 许可证
文档未提及许可证信息,暂不展示。