Sarcasm-Detection-with-BERT-and-GCN
Sarcasm-Detection-with-BERT-and-GCN copied to clipboard
A sarcasm detection model using Bidirectional Encoder Representations for Transformers (BERT) and Graph Convolutional Networks (GCN) has shown state-of-art results against conventional models and vani...
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
International Conference on Machine Learning and Data Mining (ICMLDE), 2022Anuraj 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.