Downloads · 30 days
102
0% of all-time downloads
osiria/bert-tweet-italian-uncased-sentiment
bert-tweet-italian-uncased-sentiment is a text classification model from osiria. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
--------------------------------------------------------------------------------------------------
Downloads · 30 days
102
0% of all-time downloads
All-time downloads
119K
Public
Parameters
110M
882 MB on disk
Likes
2
Public
Click a slice to open those files.
.bin441 MB · 50%
How the weights are stored.
F32110M · 100%
From the Hugging Face model README
This is a <b>BERT</b> <b>[1]</b> uncased model for the <b>Italian</b> language, fine-tuned for <b>Sentiment Analysis</b> (<b>positive</b> and <b>negative</b> classes only) on the SENTIPOLC-16 dataset, using <b>BERT-TWEET-ITALIAN</b> (bert-tweet-base-italian-uncased) as a pre-trained model.
<h3>Training and Performances</h3>The model is trained to perform binary sentiment classification (<b>positive</b> vs <b>negative</b>) and it's meant to be used primarily on tweets or other social media posts. It has been fine-tuned for Sentiment Analysis, using the SENTIPOLC-16 dataset, for 3 epochs with a constant learning rate of 1e-5 and exploiting class weighting to compensate for the class imbalance. Instances having both positive and negative sentiment have been excluded, resulting in 4154 training instances and 1050 test instances
The performances on the test set are reported in the following table:
| Accuracy | Recall | Precision | F1 |
|---|---|---|---|
| 83.67 | 83.15 | 80.48 | 81.49 |
The Recall, Precision and F1 metrics are averaged over the two classes
<h3>Quick usage</h3>from transformers import BertTokenizerFast, BertForSequenceClassification
tokenizer = BertTokenizerFast.from_pretrained("osiria/bert-tweet-italian-uncased-sentiment")
model = BertForSequenceClassification.from_pretrained("osiria/bert-tweet-italian-uncased-sentiment")
from transformers import pipeline
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}]
<h3>References</h3>
[1] https://arxiv.org/abs/1810.04805
<h3>Limitations</h3>This model was trained on tweets, so it's mainly suitable for general-purpose social media text processing, involving short texts written in a social network style. It might show limitations when it comes to longer and more structured text, or domain-specific text.
<h3>License</h3>The model is released under <b>Apache-2.0</b> license