Skip to content

manashpratim/Sarcasm-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sarcasm-Detection

Can sarcastic sentences be identified?

Description

The goal of this project is to detect sarcasm in News Headlines. The dataset that I have used in this project is available for download at https://www.kaggle.com/rmisra/news-headlines-dataset-for-sarcasm-detection. The dataset contains headlines of news articles, link to the articles and the labels (1: Sarcastic,0: Not Sarcastic). I have used only the headlines to detect sarcasm due to resource constraints. However, I have provided the code to extract the articles from the links, in the notebook. The datset has 26709 headlines. I have split the data into 90:10 training (24038) and test (2671) sets. I have implemented three models namely Convolutional Neural Network (CNN), Bidirectional Gated Recurrent Unit (Bi-GRU) and Bidirectional Long Short Term Memory (Bi-LSTM) using tensorflow and Keras. Aong the models, CNN has the best training accuracy of 99.97% whereas Bi-LSTM has the best validation accuracy of 81.06%. Also, CNN is the most stable among the three models.All the models are trained for 20 epochs. The accuracies can be further improved by using the articles to detect sarcasm.