Downloads · 30 days
5
5% of all-time downloads
yusufalt46/bert-turkish-sentiment-analysis
bert-turkish-sentiment-analysis is a text classification model from yusufalt46. 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.
This model is a fine-tuned version of dbmdz/bert-base-turkish-cased on the winvoker/turkish-sentiment-analysis-dataset.
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
93
Public
Parameters
111M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of dbmdz/bert-base-turkish-cased on the winvoker/turkish-sentiment-analysis-dataset.
This model is designed for Turkish sentiment analysis, classifying texts as either Positive (1) or Negative (0).
Training Details:
Training dataset
Training Procedure
Fine-tuned using Hugging Face Transformers Trainer
Evaluation
Label Mapping
LABEL_1 = Positive (1)
LABEL_0 = Negative (0)
Developed by: Yusuf Altunbaş
Model type: Sequence Classification
Language(s): Turkish
License: MIT
Finetuned from model: dbmdz/bert-base-turkish-cased
transformers library.from transformers import pipeline
text = "Bugün çok mutluyum!"
model_id = "yusufalt46/bert-turkish-sentiment-analysis"
classifier = pipeline("text-classification", model=model_id, tokenizer=model_id)
preds = classifier(text)
print(preds)
# Example output:
# [{'label': 'LABEL_1', 'score': 0.9823}] # 1 = Positive
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("yusufalt46/bert-turkish-sentiment-analysis")
model = AutoModelForSequenceClassification.from_pretrained("yusufalt46/bert-turkish-sentiment-analysis")
text = "Bu ürün harika!"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)
outputs = model(**inputs)
pred = torch.argmax(outputs.logits, dim=-1)
print(pred.item()) # 1: Positive, 0: Negative
Yusuf Altunbaş, bert-turkish-sentiment-analysis, Hugging Face Model Hub, 2025