mubaris / urban-robot

Reddit bot :computer: which replies to sarcastic comments :trollface: :trollface:
33 stars 15 forks source link
bot praw python reddit-bot sarcasm sentiment-analysis svm

Urban Robot

Urban Robot

Reddit bot which replies to sarcastic comments

Libraries

Features Used

Data Preprocessing

Model Training and Classification

Using above Features and Preprocessing 4 models are trained,

If a comment is predicted as 'sarcastic' by 3 out 4 models, it is treated as sarcastic.

Files

Running

  1. Register for new Reddit App here and fill details (username, password, client id, client secret) under name 'bot1' in praw.ini

  2. Run classifier.py with Python 3(Optional) or use pretrained models

  3. Run bot.py with Python 3 for the automated Reddit Bot

  4. Run cli_bot.py with Python 3 for an interactive version of the Reddit Bot.

That's it.

Logs can accessed at comment.log

How to fill praw.ini

Final accuracy of models are in final_accuracy.txt

Dataset

Dataset is available in container

Downloaded from here