Update README.md
Browse filesCreated the model card and readme.md
README.md
CHANGED
|
@@ -1,3 +1,56 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: tr
|
| 3 |
+
license: mit
|
| 4 |
+
---
|
| 5 |
+
# turkish-text-classification-model
|
| 6 |
+
|
| 7 |
+
https://huggingface.co/algumusrende/turkish-text-classification-model
|
| 8 |
+
|
| 9 |
+
This model is used for Sentiment Analysis, which is based on bert-base-turkish-sentiment-cased https://huggingface.co/savasy/bert-base-turkish-sentiment-cased
|
| 10 |
+
|
| 11 |
+
## Dataset
|
| 12 |
+
|
| 13 |
+
The dataset is taken from https://www.kaggle.com/datasets/burhanbilenn/duygu-analizi-icin-urun-yorumlari?select=magaza_yorumlari_duygu_analizi.csv
|
| 14 |
+
|
| 15 |
+
Containing product reviews of electronics stores in Turkish Language, with 3 categories["Olumlu(Positive)", "Olumsuz(Negative)", "Tarafsız(Neutral)"]2 columns and 11429 rows (3 NaN rows), encoded in "utf-16"
|
| 16 |
+
|
| 17 |
+
*Dataset*
|
| 18 |
+
|
| 19 |
+
| *size* | *data* |
|
| 20 |
+
|--------|----|
|
| 21 |
+
| 5713 |train.csv|
|
| 22 |
+
| 2856 |val.csv|
|
| 23 |
+
| 2857 |test.tsv|
|
| 24 |
+
| *11426* |*total*|
|
| 25 |
+
|
| 26 |
+
## Training and Results
|
| 27 |
+
|
| 28 |
+
|*index*|*eval\_loss*|*eval\_Accuracy*|*eval\_F1*|*eval\_Precision*|*eval\_Recall*|
|
| 29 |
+
|---|---|---|---|---|---|
|
| 30 |
+
|train|0\.41672539710998535|0\.8531419569403116|0\.8346503162224169|0\.842628684710363|0\.8315839726920476|
|
| 31 |
+
|val|0\.6787932515144348|0\.7545518207282913|0\.7277930570101517|0\.7311753495947505|0\.7293434379700242|
|
| 32 |
+
|test|0\.6885481476783752|0\.7434371718585929|0\.7170880702233838|0\.7189901255561661|0\.7180628887201386|
|
| 33 |
+
|
| 34 |
+
## Code Usage
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
| 38 |
+
|
| 39 |
+
model = AutoModelForSequenceClassification.from_pretrained("algumusrende/turkish-text-classification-model")
|
| 40 |
+
tokenizer= AutoTokenizer.from_pretrained("algumusrende/turkish-text-classification-model")
|
| 41 |
+
pipe = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 42 |
+
|
| 43 |
+
pipe("Son zamanlarda ekonomideki istikrar, borsa endeksine de olumlu yansıdı.")
|
| 44 |
+
# [{'label': 'Olumlu', 'score': 0.6654265522956848}]
|
| 45 |
+
|
| 46 |
+
pipe("Geçirdiğim diş operasyonu için çekilen röntgen filmleri sağlık yardımı kapsamında ödenmedi.")
|
| 47 |
+
# [{'label': 'Olumsuz', 'score': 0.9064584970474243}]
|
| 48 |
+
|
| 49 |
+
pipe("Eskiden bayramlarda çikolata dağıtlırdı, artık bunu göremiyoruz.")
|
| 50 |
+
# [{'label': 'Olumsuz', 'score': 0.7049197554588318}]
|
| 51 |
+
|
| 52 |
+
pipe("Ürün genel itibari ile iyi sayılır, ancak bazı eksikleri de var.")
|
| 53 |
+
# [{'label': 'Tarafsız', 'score': 0.9369649887084961}]
|
| 54 |
+
|
| 55 |
+
```
|
| 56 |
+
---
|