GithubHelp home page GithubHelp logo

c00renut / wiki-enhanced-stance-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zihaohe123/wiki-enhanced-stance-detection

0.0 0.0 0.0 9.27 MB

Python 69.76% Jupyter Notebook 30.24%

wiki-enhanced-stance-detection's Introduction

Infusing Wikipedia Knowledge to Enhance Stance Detection

his repo is the implemention of our paper "Infusing Wikipedia Knowledge to Enhance Stance Detection", where we propose to utilize the background knowledge from Wikipedia about the target to improve stance detection.

Dataset Preparation

In this paper, we experiment on three datasets: PStance, COVID19-Stance, and VAST.

  1. VAST is publicly available at here and thus the data is also included in this repo.
  2. The authors of PStance did not make the dataset readily accessible on the Internet. To gain access to it, please contact the first author of the paper. After you have the data files (raw_{phase}_{target}.csv, phase $\in$ {train, val, test}, target $\in$ {bernie, trump, biden}), put them under data/pstance and run the jupyter notebook to pre-process the data.
  3. For COVID19-Stance, the author just made the tweet ids publicly available at here. To gain the tweet contents, you can either use Twitter API or contact the first author. After you have the data files, put them under data/covid19-stance

Installation

Install Pytorch and Huggingface Transformers.

Run

PStance, target-specific stance detection, Biden

python run_pstance_biden.py

COVID19-Stance, target-specific stance detection, face mask

python run_covid_fauci.py

PStance, cross-target stance detection, Biden $\rightarrow$ Sanders

python run_pstance_biden2sanders.py

VAST, zero/few-shot stance detection

python run_vast.py

Citation

@inproceedings{he2022infusing,
  title={Infusing Knowledge from Wikipedia to Enhance Stance Detection},
  author={He, Zihao and Mokhberian, Negar and Lerman, Kristina},
  booktitle={Proceedings of the 12th Workshop on Computational Approaches to Subjectivity, Sentiment \& Social Media Analysis},
  pages={71--77},
  year={2022}
}

wiki-enhanced-stance-detection's People

Contributors

zihaohe123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.