NLP - Sarcasm_detection using CNN
Meta-Guide.com

NLP - Sarcasm_detection using CNN

Detection of sarcasm is an important task such as effective computing and sentiment analysis because such expressions can flip the polarity of a sentence.

Designing a model for successfully detecting sarcasm has been one of the most challenging task in the field of Natural Language Processing (NLP) because sarcasm detection is heavily dependent on the context of the utterance/statement and sometimes, even human beings are not able to detect the underlying sarcasm in the utterance. kindly follow the link for detail understanding about how are the sarcasm sentence flip the meaning of the sentences.

Here we use sarcasm dataset, we rely on CNNs to automatically learn features

  1. Apply deep learning to sarcasm detection
  2. Leverage user profiling, emotion, and sentiment features for sarcasm detection
  3. Apply pre-trained models for automatic feature extraction

CNNs plays important role at modeling hierarchy of local features to learn more global features, which is essential to learn context. Each Sentence is represented using word vectors and provided as input to CNN.

Use of 'word2vec-google-news-300' pre-trained Model.

Parameters for these word vectors are learned during the training phase.

Max pooling is then applied to the feature maps to generate features. A fully connected layer is applied followed by a softmax layer for getting output as a final prediction.

We get Training Accuracy as 90.93 % and Test Accuracy as 74.69 %

kindly refer the given PDF Attachment for Step by step python program:

We can play with the Model Hyper-parameters and observe the Training and Testing Accuracy, Focus on Testing Accuracy instead of training accuracy so that our Model should not Over fit the Data and leads to unexpected outcomes 

Recently I read the book from Packt publication title as "Hands-On Python Natural Language Processing" which has written by Mayank Rasu & Aman Kedia. I strongly recommend this book if any one wish to learn from basic to advance about NLP with hands ON. I am very much thankful to them for their valuable guidance.

If you would like this article please like it....Thanks for reading my article and do motivate me.

要查看或添加评论,请登录

Nilesh Gode的更多文章

社区洞察

其他会员也浏览了