Published May 14, 2019 | Version v1.0

Sarcasm Detection in Tweets using Machine Learning

Authors/Creators

Description

This is a machine learning project that aims at classifying the tweets as "sarcastic" or "non-sarcastic" using traditional machine learning methods.

If you are interested in knowing more about the project, you can download the .zip folder given below. After extracting the folders from the .zip file, you will find the raw data in the folder Data/raw_data. The project is divided into two parts:

  1. Feature generation
  2. Model Building.

Please execute the scripts in the following order:

  1. combine_datasets.py: this script will generate two datasets (sarcasm_data.txt, nonsarcasm_data.txt)
  2. data_cleaning.py: this script will perform the data cleaning and generate two files (sarcasm_clean.txt and nonsarcasm_clean.txt) to the /Data folder.
  3. generate_features.py: this script will generate lexical, pragmatic, and sentiment-based features from the tweets.
  4. classifiers.py: this file is located at /Model/classifiers.py. On executing this script, the models will be trained and tested and you will see a graph of evaluation metrics of all the models.

To ensure the proper execution of the project, please make sure that you are executing this project using python 3.5 or above and you have all the required libraries installed.

Files

darshan22/Sarcasm-Detection-Machine-Learning-v1.0.zip

Files (5.4 MB)

Additional details