Bu model https://github.com/stefan-it/turkish-bert'in; aşağıdaki 3 kategorinin olduğu metin sınıflandırma verilerine göre fine-tuned edilmiş halidir.

code_to_label={

'LABEL_0': 'olumlu ',

'LABEL_1': 'nötr ',

'LABEL_2': 'olumsuz' }

Eğitim ve validasyon verisi

Fine-tune işlemi için Gorengoz/tr-customerreview veri seti kullanılmıştır.

Hiperparametreler

model_args = { "num_train_epochs":3, "overwrite_output_dir":True}

model = ClassificationModel( 'bert', 'dbmdz/bert-base-turkish-128k-cased', num_labels=3, args=model_args, weight=[0.1, 0.25,0.65] )

Eğitim Metrikleri

Epochs Running Loss
1 0.0092
2 0.0087
3 0.0054

Nasıl Kullanılacağı

from transformers import AutoTokenizer, AutoModelForSequenceClassification,pipeline

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

nlp=pipeline("text-classification", model=model, tokenizer=tokenizer)

code_to_label={

'LABEL_0': 'olumlu ',

'LABEL_1': 'nötr ',

'LABEL_2': 'olumsuz' }

code_to_label[nlp("Ürün berbat, paranıza yazık olur.")[0]['label']]
Downloads last month
68
Safetensors
Model size
184M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Space using Gorengoz/bert-turkish-sentiment-analysis-cased 1