Skip to content

To Attend or not to Attend: A Case Study on Syntactic Structures for Semantic Relatedness

License

Notifications You must be signed in to change notification settings

amulyahwr/acl2018

Repository files navigation

Introduction

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.

Dependencies

How to run the code?

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. file_structure
  • Go to folder scripts and run command:
    • python preprocess-sick.py
    • If the command runs successfully, then you should see the output as follows: conf1
  • Go to downloaded model folder and run command:
    • python main.py
    • If the command runs successfully, then you should see the output as follows: conf2

Acknowledgement

The code in this repository is an adaptation of PyTorch implementation available at: [https://github.com/dasguptar/treelstm.pytorch].

About

To Attend or not to Attend: A Case Study on Syntactic Structures for Semantic Relatedness

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages