Skip to content

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 vanilla transformer-based approaches.

License

Notifications You must be signed in to change notification settings

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

Repository files navigation

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

This repository contains the code used in our paper:

International Conference on Machine Learning and Data Mining (ICMLDE), 2022

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.

About

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 vanilla transformer-based approaches.

Topics

Resources

License

Stars

Watchers

Forks

Languages