CoolFace
Modelpublic

Gorengoz/bert-turkish-sentiment-analysis-winvoker

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes6downloads
Model Card

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': 'olumsuz ',

'LABEL_1': 'nötr ',

'LABEL_2': 'olumlu' }

Eğitim ve validasyon verisi

Fine-tune işlemi için Gorengoz/tr-customerreview veri seti ve winvoker/turkish-sentiment-analysis-dataset kullanılmıştır. winvoker/turkish-sentiment-analysis-dataset'den her label için 5.000 cümle örneği alınarak iki veri seti birleştirilmiştir. Nihai veri seti ile model geliştirilmiştir.

Hiperparametreler

modelargs = { "numtrainepochs":3, "overwriteoutput_dir":True}

model = ClassificationModel( 'bert', 'dbmdz/bert-base-turkish-128k-cased', numlabels=3, args=modelargs )

Eğitim Metrikleri

EpochsRunning Loss
10.0052
20.0015
30.0011

Nasıl Kullanılacağı

from transformers import AutoTokenizer, AutoModelForSequenceClassification,pipeline

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

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

code_to_label={

'LABEL_0': 'olumsuz ',

'LABEL_1': 'nötr ',

'LABEL_2': 'olumlu' }

code_to_label[nlp("Ürün berbat, paranıza yazık olur.")[0]['label']]