This page contains the code used in the work "Learning Explicit and Implicit Structures for Targeted Sentiment Analysis" published at EMNLP 2019.
Prerequisite: Python (3.5 or later), PyTorch (1.0 or later)
Run the following command to try out our model in the paper.
English
./exp_en.sh
Spanish
./exp_es.sh
After the training is complete, type the following command to display the result on test data. The performance outputed by conlleval.pl is shown as below.
tail -n 50 2019_en_ei.log
tail -n 50 2019_es_ei.log
The source code is written in PyTorch.
The data is stored in "data/ts" folder for English and Spanish.
The embedding files need to be stored in the folder "embedding".
Download English Embedding (Glove 100) [https://drive.google.com/file/d/18ivfhXW0GpsBnDwvao-XNfm0P0d9592b/view?usp=sharing]
Download Spanish Embedding [https://drive.google.com/file/d/1uYCPv3_-ZwcYJ2Ga8DcmPoxi4SgIeLX2/view?usp=sharing]
If you use this software for research, please cite our paper as follows:
@InProceedings{learning19li,
author = "Li, Hao and Lu, Wei",
title = "Learning Explicit and Implicit Structures for Targeted Sentiment Analysis",
booktitle = "Proc. of EMNLP2019",
year = "2019",
}
The code in this repository are based on Neural StatNLP framework: https://github.com/sutd-statnlp/statnlp-neural
Email to [email protected] if any inquery.