ashumishra commited on
Commit
3115b9e
·
verified ·
1 Parent(s): 7f0b675

Upload 3 files

Browse files
Sarcasm-Detection-NLP-master/README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sarcasm-Detection-NLP
2
+ ## Objective
3
+ To build a model to detect whether a sentence is sarcastic or not, using Bidirectional LSTMs
4
+ ## Problem Description
5
+ Past studies in Sarcasm Detection mostly make use of Twitter datasets collected using hashtag based supervision but such datasets are noisy in terms of labels and language. Furthermore, many tweets are replies to other tweets and detecting sarcasm in these requires the availability of contextual tweets.
6
+ ## Data Description
7
+ News Headlines dataset for Sarcasm Detection. The dataset is collected from two news websites, theonion.com and huffingtonpost.com. This new dataset has the following advantages over the existing Twitter datasets:
8
+ Since news headlines are written by professionals in a formal manner, there are no spelling mistakes and informal usage. This reduces the sparsity and also increases the chance of finding pre-trained embedding.
9
+ Furthermore, since the sole purpose of TheOnion is to publish sarcastic news, we get high-quality labels with much less noise as compared to Twitter datasets.
10
+ Unlike tweets that reply to other tweets, the news headlines obtained are self-contained. This would help us in teasing apart the real sarcastic elements
11
+ ## Content
12
+ Each record consists of three attributes:
13
+
14
+ - is_sarcastic: 1 if the record is sarcastic otherwise 0
15
+
16
+ - headline: the headline of the news article
17
+
18
+ - article_link: link to the original news article. Useful in collecting supplementary data
19
+ ## Steps to be followed
20
+ 1. Read and explore the data
21
+
22
+ 2. Drop one column
23
+
24
+ 3. Get length of each sentence
25
+
26
+ 4. Define parameters
27
+
28
+ 5. Get indices for words
29
+
30
+ 6. Create features and labels
31
+
32
+ 7. Get vocab size
33
+
34
+ 8. Create a weight matrix using GloVe embeddings
35
+
36
+ 9. Define and compile a Bidirectional LSTM model
37
+
38
+ 10. Fit the model and check the validation accuracy
Sarcasm-Detection-NLP-master/Sarcasm_Detection_NLP.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Sarcasm-Detection-NLP-master/Sarcasm_Headlines_Dataset.json ADDED
The diff for this file is too large to render. See raw diff