/Sarcasm-Detection-with-BERT-and-GCN

Sarcasm Detection using Bidirectional Encorder Representations for Transformers and Graph Convolutional Network

Primary LanguagePythonMIT LicenseMIT

Sarcasm Detection using Bidirectional Encoder Representations from Transformers and Graph Convolutional Network

This repository contains the code used in our paper:

Sarcasm Detection using Bidirectional Encoder Representations from Transformers and Graph Convolutional Network

Anuraj Mohan, Abhilash M Nair, Bhadra Jayakumar, Sanjay Muraleedharan
Department of Computer Science and Engineering, NSS College of Engineering, Palakkad, Kerala, India


Requirements

  • numpy
  • spacy
  • torch
  • scikit-learn
  • matplotlib
  • pytorch-pretrained-bert

Usage

  • Install the dependencies
pip3 install -r requirements.txt
  • Download spaCy language model
python3 -m spacy download en
  • Generate adjacency and affective dependency graphs
python3 graph.py
  • Train the model. Optional arguments can be found in train.py
python3 train.py

CREDITS

  • The affective knowledge used in this work is from SenticNet.
  • The code in this repository partially relies on ADGCN and SenticGCN.

LICENCE

This repository is licensed under MIT License. See LICENSE for full licensing text.