HuggingFace镜像/bert-tweet-italian-uncased-sentiment
模型介绍文件和版本分析

 
    任务:情感分析
    模型:BERT-TWEET
    语言:IT
  
 

模型描述

这是一个适用于意大利语的BERT [1]无大小写模型,专门针对情感分析(仅包含积极和消极两类)在[SENTIPOLC-16]数据集上进行了微调。该模型以BERT-TWEET-ITALIAN([bert-tweet-base-italian-uncased])作为预训练模型。

训练与性能

本模型经过训练可执行二元情感分类(积极 vs 消极),主要用于分析推文或其他社交媒体帖子。它在SENTIPOLC-16数据集上针对情感分析任务进行了微调,训练周期为3轮,学习率恒定为1e-5,并采用类别权重来弥补类别不平衡问题。 同时包含积极和消极情感的样本已被排除,最终得到4154个训练样本和1050个测试样本。

测试集上的性能如下表所示:

准确率召回率精确率F1值
83.6783.1580.4881.49

召回率、精确率和F1值均为两类的平均值。

快速使用

from transformers import AutoModelForTokenClassification
from openmind import pipeline, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("Changchun_Ascend/bert-tweet-italian-uncased-sentiment")
model = AutoModelForTokenClassification.from_pretrained("Changchun_Ascend/bert-tweet-italian-uncased-sentiment")

classifier = pipeline("text-classification", model = model, tokenizer = tokenizer)

classifier("una fantastica giornata di #calcio! grande prestazione del mister e della squadra")

# [{'label': 'POSITIVE', 'score': 0.9883694648742676}]

参考文献

[1] https://arxiv.org/abs/1810.04805

局限性

本模型基于推文训练而成,因此主要适用于通用社交媒体文本处理,包括采用社交网络风格撰写的短文本。 对于较长且结构更严谨的文本,或特定领域的文本,该模型可能存在局限性。

许可证

本模型基于 Apache-2.0 许可证发布

(py3.8) root@bms-910a-hgx:~/bert-tweet-italian-uncased-sentiment# git status 位于分支 main 您的分支与上游分支 'origin/main' 保持同步。

无提交内容,工作区干净

下载使用量0