Home

Awesome

TransCap

Code and dataset of our paper "Transfer Capsule Network for Aspect Level Sentiment Classification" accepted by ACL 2019.

1. Requirements

2. Usage

We incorporate the training and evaluation of TransCap in the main.py. Just run it as below.

CUDA_VISIBLE_DEVICES=0 python main.py --ASC restaurant --DSC yelp

3. Embeddings

We have generated the word-idx mapping file and the word embedding file in ./data/restaurant and ./data/laptop. If you want to generate them from scratch, follow the steps below. We take restaurant(ASC) + yelp(DSC) for an example.

4. Run TransCap on Other Datasets

If you want to run TransCap on a new-coming dataset (e.g., 'XXX'), follow the instructions below.

5. Citation

If you find our code and dataset useful, please cite our paper.

@inproceedings{chen2019transcap,
  author    = {Zhuang Chen and Tieyun Qian},
  title     = {Transfer Capsule Network for Aspect Level Sentiment Classification},
  booktitle = {ACL},
  pages     = {547--556},
  year      = {2019},
  url       = {https://doi.org/10.18653/v1/p19-1052}
}