Skip to content

A Greek topic classification and title generation dataset based on Greek subreddits.

License

Notifications You must be signed in to change notification settings

NC0DER/GreekReddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Versions Open in HuggingFace Software-License

GreekReddit

This repository hosts code for the article:

About

This repository stores the data crawling and processing code for the GreekReddit dataset, as well as the training and evaluation code for the proposed models. The proposed models were trained and evaluated on GreekReddit. The dataset and best-performing models are hosted on HuggingFace.

Installation

pip install requirements.txt

Example Code

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'])

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}
}

Contributors

About

A Greek topic classification and title generation dataset based on Greek subreddits.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages