You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

🇹🇷 Turkish Sentiment Analysis - BERT

Türkçe ürün yorumları için fine-tune edilmiş BERT modeli.

Model Açıklaması

Bu model, Türkçe metinlerde duygu analizi (sentiment analysis) yapmak için eğitilmiştir. İki sınıf arasında sınıflandırma yapar:

  • LABEL_1 (Positive): Olumlu yorumlar
  • LABEL_0 (Negative): Olumsuz yorumlar

Performans

Metric Score
Accuracy 100.00%
F1 Score 100.00%
Precision 100.00%
Recall 100.00%

Kullanım

from transformers import pipeline

# Pipeline oluştur
classifier = pipeline("sentiment-analysis", model="tugrulkaya/bert-turkish-sentiment-analysis")

# Tahmin yap
text = "Bu ürün harika, çok beğendim!"
result = classifier(text)
print(result)
# [{'label': 'LABEL_1', 'score': 0.9876}]

Detaylı Kullanım

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("tugrulkaya/bert-turkish-sentiment-analysis")
model = AutoModelForSequenceClassification.from_pretrained("tugrulkaya/bert-turkish-sentiment-analysis")

def predict_sentiment(text):
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
    outputs = model(**inputs)
    probs = torch.nn.functional.softmax(outputs.logits, dim=-1)
    prediction = torch.argmax(probs, dim=-1).item()
    
    label = "OLUMLU ✅" if prediction == 1 else "OLUMSUZ ❌"
    confidence = probs[0][prediction].item()
    
    return {"label": label, "confidence": confidence}

# Test
print(predict_sentiment("Harika bir ürün!"))
print(predict_sentiment("Berbat, tavsiye etmem."))

Eğitim Detayları

  • Base Model: savasy/bert-base-turkish-sentiment-cased
  • Dataset: Turkish Product Reviews
  • Task: Binary Text Classification
  • Epochs: 3
  • Batch Size: 16
  • Learning Rate: 2e-5
  • Max Length: 128 tokens

Sınırlamalar

  • Model sadece Türkçe metinler için optimize edilmiştir
  • Maksimum 128 token uzunluğunda metinler için tasarlanmıştır
  • Argo ve informal dil için sınırlı performans gösterebilir

Lisans

Apache 2.0

İletişim

Sorularınız için: Hugging Face Profili


Bu model Hugging Face Transformers kullanılarak eğitilmiştir.

Downloads last month
5
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train tugrulkaya/bert-turkish-sentiment-analysis

Evaluation results