🚀 (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
🔧 技術細節
文檔未提供技術實現細節,暫不展示。
📄 許可證
文檔未提及許可證信息,暫不展示。