This repository was used in our paper:
Target-adaptive Graph for Cross-target Stance Detection
Bin Liang, Yonghao Fu, Lin Gui*, Min Yang, Jiachen Du, Yulan He, Ruifeng Xu*. Proceedings of WWW 2021
Please cite our paper and kindly give a star for this repository if you use this code.
- pytorch >= 0.4.0
- numpy >= 1.13.3
- sklearn
- python 3.6 / 3.7
- transformers
Download glove.42B.300d.zip from glove website and unzip in project root path.
- Install SpaCy package and language models with
pip install spacy
and
python -m spacy download en
- install requirements
pip install -r requirements.txt
- Train with command, optional arguments could be found in train.py
python3 train.py
--model_name senticgcn
--dataset rest16
--save True
--learning_rate 1e-3
--batch_size 16
--hidden_dim 300