Downloads · 30 days
13
1% of all-time downloads
yeniguno/democracy-sentiment-analysis-turkish-roberta
democracy-sentiment-analysis-turkish-roberta is a text classification model from yeniguno. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
13
1% of all-time downloads
All-time downloads
957
Public
Parameters
278M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This model is a fine-tuned version of cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual on the None dataset. It achieves the following results on the evaluation set:
This model is fine-tuned from the base model cardiffnlp/twitter-xlm-roberta-base-sentiment-multilingual for sentiment analysis in Turkish, specifically focusing on democracy-related text. The model classifies texts into three sentiment categories:
Positive Neutral Negative
This model is well-suited for analyzing sentiments in Turkish texts that discuss democracy, governance, and related political discourse.
The training dataset consists of 30,000 rows gathered from various sources, including: Kaggle, Hugging Face, Ekşi Sözlük, and synthetic data generated using state-of-the-art LLMs. The dataset is multilingual in origin, with texts in English, Russian, and Turkish. All non-Turkish texts were translated into Turkish. The data represents a broad spectrum of democratic discourse from 30 different sources.
To use this model for sentiment analysis, you can leverage the Hugging Face pipeline for text classification as shown below:
from transformers import pipeline
# Load the model from Hugging Face
sentiment_model = pipeline(model="yeniguno/democracy-sentiment-analysis-turkish-roberta", task='text-classification')
# Example text input
response = sentiment_model("En iyisi devletin tüm gücünü tek bir lidere verelim")
# Print the result
print(response)
# [{'label': 'negative', 'score': 0.9617443084716797}]
# Example text input
response = sentiment_model("Birçok farklı sesin çıkması zaman alıcı ve karmaşık görünebilir, ancak demokrasinin getirdiği özgürlük ve çeşitlilik, toplumun gerçek gücüdür.")
# Print the result
print(response)
# [{'label': 'positive', 'score': 0.958978533744812}]
# Example text input
response = sentiment_model("Bugün hava yağmurlu.")
# Print the result
print(response)
# [{'label': 'neutral', 'score': 0.9915837049484253}]
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.7236 | 1.0 | 802 | 0.4797 | 0.8039 | 0.8031 | 0.8037 | 0.8039 |
| 0.424 | 2.0 | 1604 | 0.4469 | 0.8184 | 0.8186 | 0.8224 | 0.8184 |