This repository has the code for ACL'18 paper: To Attend or not to Attend: A Case Study on Syntactic Structures for Semantic Relatedness by Amulya Gupta and Zhu Zhang. Please use below for
- bibtex citation:
@INPROCEEDINGS {gupta-zhang:2018:Long,
author = "Gupta, Amulya and Zhang, Zhu",
title = "To Attend or not to Attend: A Case Study on Syntactic Structures for Semantic Relatedness",
booktitle = "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
year = "2018",
publisher = "Association for Computational Linguistics",
pages = "2116--2125",
location = "Melbourne, Australia",
url = "http://aclweb.org/anthology/P18-1197"
}
- APA citation:
Gupta, A. and Zhang, Z. (2018). To Attend or not to Attend: A Case Study on Syntactic Structures for Semantic Relatedness. Proceedings of the 56th Annual Meeting of Association for Computational Linguistics.
- Python (tested on 2.7.13)
- Pytorch (tested on 0.2.0_3)
- tqdm
- numpy (tested on 1.14.0)
- scipy (tested on 1.0.0)
- SICK dataset
- TestData (including gold scores)
- TrainingData
- TrialData
- Glove embeddings
- Common Crawl (840B)
- I used Stanford Parser, Stanford POS Tagger, Stanford Dependency Parser and Stanford Constituency Parser.
Download any model(eg. linear_bilstm_attn) and please:
- Change value of default in –glove argument in config.py to point to the location of downloaded Glove embeddings.
- Change path of following in scripts/preprocess-sick.py to point to downloaded train, trial and test datasets(make sure that all the files are converted into csv before use), respectively:
- file0 ---- location of train dataset file
- file1 ---- location of trial(dev) dataset file
- file2 ---- location of test dataset file
- Put the downloaded library(lib) as shown above.
- Go to folder scripts and run command:
- Go to downloaded model folder and run command:
The code in this repository is an adaptation of PyTorch implementation available at: [https://github.com/dasguptar/treelstm.pytorch].