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
- numpy
- spacy
- torch
- scikit-learn
- matplotlib
- pytorch-pretrained-bert
- 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
- The affective knowledge used in this work is from SenticNet.
- The code in this repository partially relies on ADGCN and SenticGCN.
This repository is licensed under MIT License. See LICENSE for full licensing text.