File size: 1,309 Bytes
587dbf0 93850ec b09b051 cea4ad4 b09b051 d12b7a9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
---
license: mit
language:
- tr
---
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
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']]
``` |