Downloads · 30 days
97.8K
6% of all-time downloads
j-hartmann/sentiment-roberta-large-english-3-classes
sentiment-roberta-large-english-3-classes is a text classification model from j-hartmann. Use it when you need a label for a piece of text. It is set up for transformers.
This RoBERTa-based model can classify the sentiment of English language text in 3 classes:
Downloads · 30 days
97.8K
6% of all-time downloads
All-time downloads
1.7M
Public
Repo size
2.9 GB
Likes
26
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
This RoBERTa-based model can classify the sentiment of English language text in 3 classes:
The model was fine-tuned on 5,304 manually annotated social media posts. The hold-out accuracy is 86.1%. For details on the training approach see Web Appendix F in Hartmann et al. (2021).
from transformers import pipeline
classifier = pipeline("text-classification", model="j-hartmann/sentiment-roberta-large-english-3-classes", return_all_scores=True)
classifier("This is so nice!")
Output:
[[{'label': 'negative', 'score': 0.00016451838018838316},
{'label': 'neutral', 'score': 0.000174045650055632},
{'label': 'positive', 'score': 0.9996614456176758}]]
Please cite this paper when you use our model. Feel free to reach out to [email protected] with any questions or feedback you may have.
@article{hartmann2021,
title={The Power of Brand Selfies},
author={Hartmann, Jochen and Heitmann, Mark and Schamp, Christina and Netzer, Oded},
journal={Journal of Marketing Research}
year={2021}
}