Roberta Large Tweetner7 All
基于roberta-large在tner/tweetner7数据集上微调的命名实体识别模型,专门用于推特文本中的实体识别
下载量 170.06k
发布时间 : 7/2/2022
模型简介
该模型是针对推特文本优化的命名实体识别模型,能够识别推文中的公司、创意作品、事件、团体、地点、人物和产品等实体类别
模型特点
推特文本优化
专门针对推特文本进行优化,处理了账户名和URL的特殊格式
多类别实体识别
能够识别7种不同的实体类别,包括人物、地点、产品等
高精度人物识别
在人物实体识别上表现最佳,F1分数达到0.829
模型能力
推特文本实体识别
多类别实体分类
社交媒体文本处理
使用案例
社交媒体分析
推特用户分析
识别推文中提及的人物、组织和产品
可帮助分析用户兴趣和社交网络
品牌监控
追踪社交媒体上品牌和产品的提及情况
可用于市场分析和竞争情报
🚀 tner/roberta-large-tweetner7-all
tner/roberta-large-tweetner7-all
是一个基于 roberta-large
模型在 tner/tweetner7
数据集上微调得到的模型,用于命名实体识别任务。它能有效处理特定格式的推文数据,在相关评估指标上有不错的表现。
✨ 主要特性
- 基于
roberta-large
模型进行微调,在tner/tweetner7
数据集上有良好表现。 - 支持使用
tner
库调用,方便快捷。 - 提供了详细的评估指标和训练超参数。
📦 安装指南
此模型可通过 tner 库 使用,可通过以下命令安装该库:
pip install tner
💻 使用示例
基础用法
import re
from urlextract import URLExtract
from tner import TransformersNER
extractor = URLExtract()
def format_tweet(tweet):
# mask web urls
urls = extractor.find_urls(tweet)
for url in urls:
tweet = tweet.replace(url, "{{URL}}")
# format twitter account
tweet = re.sub(r"\b(\s*)(@[\S]+)\b", r'\1{\2@}', tweet)
return tweet
text = "Get the all-analog Classic Vinyl Edition of `Takin' Off` Album from @herbiehancock via @bluenoterecords link below: http://bluenote.lnk.to/AlbumOfTheWeek"
text_format = format_tweet(text)
model = TransformersNER("tner/roberta-large-tweetner7-all")
model.predict([text_format])
高级用法
暂未提供高级用法示例。
📚 详细文档
数据集和指标
属性 | 详情 |
---|---|
数据集 | tner/tweetner7 |
评估指标 | F1、Precision、Recall、Macro F1、Macro Precision、Macro Recall、Entity Span F1、Entity Span Precision、Entity Span Recall |
模型结果
该模型在 2021 年测试集上的表现如下:
- F1 (micro): 0.6574551220340903
- Precision (micro): 0.644212629008989
- Recall (micro): 0.6712534690101758
- F1 (macro): 0.6124665667529737
- Precision (macro): 0.6005167968535563
- Recall (macro): 0.625251837701222
各实体的 F1 分数如下:
- corporation: 0.5392156862745098
- creative_work: 0.4760582928521859
- event: 0.4673321234119782
- group: 0.6139798488664987
- location: 0.6707399864222675
- person: 0.8293212669683258
- product: 0.6906187624750498
F1 分数的置信区间(通过自助法获得)如下:
- F1 (micro):
- 90%: [0.6484148010152769, 0.6672289519134409]
- 95%: [0.6470100684797441, 0.6689850350992637]
- F1 (macro):
- 90%: [0.6484148010152769, 0.6672289519134409]
- 95%: [0.6470100684797441, 0.6689850350992637]
完整评估结果可参考 NER 评估文件 和 实体跨度评估文件。
训练超参数
以下是训练过程中使用的超参数:
- 数据集: ['tner/tweetner7']
- 数据集分割: train_all
- 数据集名称: None
- 本地数据集: None
- 模型: roberta-large
- CRF: True
- 最大长度: 128
- 训练轮数: 30
- 批次大小: 32
- 学习率: 1e-05
- 随机种子: 0
- 梯度累积步数: 1
- 权重衰减: 1e-07
- 学习率热身步数比例: 0.15
- 最大梯度范数: 1
完整配置可参考 微调参数文件。
🔧 技术细节
该模型基于 roberta-large
进行微调,使用了 CRF 层来提升性能。在训练过程中,使用了特定的超参数进行优化,以在 tner/tweetner7
数据集上达到较好的效果。
📄 许可证
文档未提及相关许可证信息。
📖 引用
如果使用该模型,请引用 T-NER 论文和 TweetNER7 论文:
- T-NER
@inproceedings{ushio-camacho-collados-2021-ner,
title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
author = "Ushio, Asahi and
Camacho-Collados, Jose",
booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
month = apr,
year = "2021",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.eacl-demos.7",
doi = "10.18653/v1/2021.eacl-demos.7",
pages = "53--62",
abstract = "Language model (LM) pretraining has led to consistent improvements in many NLP downstream tasks, including named entity recognition (NER). In this paper, we present T-NER (Transformer-based Named Entity Recognition), a Python library for NER LM finetuning. In addition to its practical utility, T-NER facilitates the study and investigation of the cross-domain and cross-lingual generalization ability of LMs finetuned on NER. Our library also provides a web app where users can get model predictions interactively for arbitrary text, which facilitates qualitative model evaluation for non-expert programmers. We show the potential of the library by compiling nine public NER datasets into a unified format and evaluating the cross-domain and cross- lingual performance across the datasets. The results from our initial experiments show that in-domain performance is generally competitive across datasets. However, cross-domain generalization is challenging even with a large pretrained LM, which has nevertheless capacity to learn domain-specific features if fine- tuned on a combined dataset. To facilitate future research, we also release all our LM checkpoints via the Hugging Face model hub.",
}
- TweetNER7
@inproceedings{ushio-etal-2022-tweet,
title = "{N}amed {E}ntity {R}ecognition in {T}witter: {A} {D}ataset and {A}nalysis on {S}hort-{T}erm {T}emporal {S}hifts",
author = "Ushio, Asahi and
Neves, Leonardo and
Silva, Vitor and
Barbieri, Francesco. and
Camacho-Collados, Jose",
booktitle = "The 2nd Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 12th International Joint Conference on Natural Language Processing",
month = nov,
year = "2022",
address = "Online",
publisher = "Association for Computational Linguistics",
}
Indonesian Roberta Base Posp Tagger
MIT
这是一个基于印尼语RoBERTa模型微调的词性标注模型,在indonlu数据集上训练,用于印尼语文本的词性标注任务。
序列标注
Transformers 其他

I
w11wo
2.2M
7
Bert Base NER
MIT
基于BERT微调的命名实体识别模型,可识别四类实体:地点(LOC)、组织机构(ORG)、人名(PER)和杂项(MISC)
序列标注 英语
B
dslim
1.8M
592
Deid Roberta I2b2
MIT
该模型是基于RoBERTa微调的序列标注模型,用于识别和移除医疗记录中的受保护健康信息(PHI/PII)。
序列标注
Transformers 支持多种语言

D
obi
1.1M
33
Ner English Fast
Flair自带的英文快速4类命名实体识别模型,基于Flair嵌入和LSTM-CRF架构,在CoNLL-03数据集上达到92.92的F1分数。
序列标注
PyTorch 英语
N
flair
978.01k
24
French Camembert Postag Model
基于Camembert-base的法语词性标注模型,使用free-french-treebank数据集训练
序列标注
Transformers 法语

F
gilf
950.03k
9
Xlm Roberta Large Ner Spanish
基于XLM-Roberta-large架构微调的西班牙语命名实体识别模型,在CoNLL-2002数据集上表现优异。
序列标注
Transformers 西班牙语

X
MMG
767.35k
29
Nusabert Ner V1.3
MIT
基于NusaBert-v1.3在印尼语NER任务上微调的命名实体识别模型
序列标注
Transformers 其他

N
cahya
759.09k
3
Ner English Large
Flair框架内置的英文4类大型NER模型,基于文档级XLM-R嵌入和FLERT技术,在CoNLL-03数据集上F1分数达94.36。
序列标注
PyTorch 英语
N
flair
749.04k
44
Punctuate All
MIT
基于xlm-roberta-base微调的多语言标点符号预测模型,支持12种欧洲语言的标点符号自动补全
序列标注
Transformers

P
kredor
728.70k
20
Xlm Roberta Ner Japanese
MIT
基于xlm-roberta-base微调的日语命名实体识别模型
序列标注
Transformers 支持多种语言

X
tsmatz
630.71k
25
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98