File size: 5,314 Bytes
fad867b 13b46df fad867b 5862bbf 235beeb fad867b 3cc13cd fad867b fd98f92 fad867b |
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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
---
license: apache-2.0
language:
- el
metrics:
- f1
- recall
- precision
- hamming_loss
pipeline_tag: text-classification
widget:
- text: >-
Δεν ξέρω αν είμαι ο μόνος αλλά πιστεύω πως όσο είμαστε απασχολημένοι με την όλη κατάσταση της αστυνομίας η κυβέρνηση προσπαθεί να καλύψει αλλά γεγονότα της επικαιρότητας όπως πανδημία και εξωτερική πολιτική.
example_title: Πολιτική
- text: >-
Άλλες οικονομίες, όπως η Κίνα, προσπαθούν να διατηρούν την αξία του νομίσματος τους χαμηλά ώστε να καταστήσουν τις εξαγωγές τους πιο ελκυστικές στο εξωτερικό. Γιατί όμως θεωρούμε πως η πτωτική πορεία της Τουρκικής λίρας είναι η "αχίλλειος πτέρνα" της Τουρκίας;
example_title: Οικονομία
- text: >-
Γνωρίζει κανείς γιατί δεν ψηφίζουμε πια για να βγει ποιο τραγούδι θα εκπροσωπήσει την Ελλάδα; Τα τελευταία χρόνια ο κόσμος είναι δυσαρεστημένος με τα τραγούδια που στέλνουν, γιατί συνεχίζεται αυτό;
example_title: Ψυχαγωγία/Κουλτούρα
model-index:
- name: IMISLab/Greek-Reddit-BERT
results:
- task:
type: text-classification
name: Text-classification
dataset:
name: GreekReddit
type: greekreddit
config: default
split: test
metrics:
- name: Precision
type: precision
value: 80.05
verified: true
- name: Recall
type: recall
value: 81.48
verified: true
- name: F1
type: f1
value: 80.61
verified: true
- name: Hamming Loss
type: hamming_loss
value: 19.84
verified: true
datasets:
- IMISLab/GreekReddit
library_name: transformers
tags:
- Social Media
- Reddit
- Topic Classification
- Text Classification
- Greek NLP
---
# Greek-Reddit-BERT
A Greek topic classification model based on [GREEK-BERT](https://huggingface.co/nlpaueb/bert-base-greek-uncased-v1).
This model is fine-tuned on [GreekReddit](https://huggingface.co/datasets/IMISLab/GreekReddit) as part of our research article:
[Mastrokostas, C., Giarelis, N., & Karacapilidis, N. (2024) Social Media Topic Classification on Greek Reddit](https://www.mdpi.com/2078-2489/15/9/521)
For more information see the evaluation section below.
<img src="Greek Reddit finetuning.svg" width="600"/>
## Training dataset
The training dataset of `Greek-Reddit-BERT` is [GreekReddit](https://huggingface.co/datasets/IMISLab/GreekReddit), which is a topic classification dataset.
Overall, [GreekReddit](https://huggingface.co/datasets/IMISLab/GreekReddit) contains 6,534 user posts collected from Greek subreddits belonging to various topics (i.e., society, politics, economy, entertainment/culture, sports).
## Training configuration
We fine-tuned `nlpaueb/bert-base-greek-uncased-v1` (113 million parameters) on the GreekReddit train split using the following parameters:
* GPU batch size = 16
* Total training epochs = 4
* Learning rate = 5e−5
* Dropout Rate = 0.1
* Number of labels = 10
* 32-bit floating precision
* Tokenization
* maximum input token length = 512
* padding = True
* truncation = True
## Evaluation
**Model**|**Precision**|**Recall**|**F1**|**Hamming Loss**
------------|-----------|-----------|-----------|-------------
Greek-Reddit-BERT|80.05|81.48|80.61|19.84
### Example code
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model_name = 'IMISLab/Greek-Reddit-BERT'
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
topic_classifier = pipeline(
'text-classification',
device = 'cpu',
model = model,
tokenizer = tokenizer,
truncation = True,
max_length = 512
)
text = 'Άλλες οικονομίες, όπως η Κίνα, προσπαθούν να διατηρούν την αξία του νομίσματος τους χαμηλά ώστε να καταστήσουν τις εξαγωγές τους πιο ελκυστικές στο εξωτερικό. Γιατί όμως θεωρούμε πως η πτωτική πορεία της Τουρκικής λίρας είναι η ""αχίλλειος πτέρνα"" της Τουρκίας;'
output = topic_classifier(text)
print(output[0]['label'])
```
## Contact
If you have any questions/feedback about the model please e-mail one of the following authors:
```
[email protected]
[email protected]
[email protected]
```
## Citation
```
@article{mastrokostas2024social,
title={Social Media Topic Classification on Greek Reddit},
author={Mastrokostas, Charalampos and Giarelis, Nikolaos and Karacapilidis, Nikos},
journal={Information},
volume={15},
number={9},
pages={521},
year={2024},
publisher={Multidisciplinary Digital Publishing Institute}
}
``` |