File size: 1,733 Bytes
1edda05
 
 
 
 
 
 
 
2affe44
 
 
 
 
 
 
1edda05
2affe44
 
 
1edda05
2affe44
 
1edda05
2affe44
 
1edda05
 
 
2affe44
 
1edda05
 
 
2affe44
1edda05
 
 
 
 
 
2affe44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40068af
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
66
67
68
---
license: mit
language:
- tr
metrics:
- accuracy
pipeline_tag: text-classification
---
language: 
- tr
tags:
- text-classification
- emotion
- pytorch
datasets:
- emotion
metrics:
- Accuracy, F1 Score
---
# bert-base-turkish-cased-emotion

## Model description:
[bert-base-turkish-cased](https://huggingface.co/dbmdz/bert-base-turkish-cased) finetuned on Turkish film comments shared in beyazperde.com with the help of BERTurk pretrained language model using PyTorch and Huggingface Transformers library.
```
 learning rate 2e-5, 
 batch size 32,
 num_train_epochs=5,
 optimizer=AdamW
```

## Model Performance

precision    recall  f1-score   support

           0       0.93      0.93      0.93      1333
           1       0.93      0.93      0.93      1333

    accuracy                           0.93      2666
   macro avg       0.93      0.93      0.93      2666
weighted avg       0.93      0.93      0.93      2666

## How to Use the model:
```python
from transformers import pipeline
classifier = pipeline("text-classification",
                       model='zafercavdar/distilbert-base-turkish-cased-emotion',
                       return_all_scores=True)
prediction = classifier("Bu kütüphaneyi seviyorum, en iyi yanı kolay kullanımı.", )
print(prediction)

"""
Output:
[
  [
    {'label': 'sadness', 'score': 0.0026786490343511105},
    {'label': 'joy', 'score': 0.6600754261016846},
    {'label': 'love', 'score': 0.3203163146972656},
    {'label': 'anger', 'score': 0.004358913749456406},
    {'label': 'fear', 'score': 0.002354539930820465},
    {'label': 'surprise', 'score': 0.010216088965535164}
  ]
]

"""
```

## Dataset:
[Beyazoerde.com reviews](https://huggingface.co/datasets/sinanyuksel/beyazperde).