This is a MXNet Gluon implementation of Tree-LSTM as described in the paper Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks by Kai Sheng Tai, Richard Socher, and Christopher Manning.
requirements.txt Note: Currently works with MXNet 1.3.0.Before delving into how to run the code, here is a quick overview of the contents:
fetch_and_preprocess.sh to download the SICK dataset, Stanford Parser and Stanford POS Tagger, and Glove word vectors (Common Crawl 840) -- Warning: this is a 2GB download!), and additionally preprocess the data, i.e. generate dependency parses using Stanford Neural Network Dependency Parser.main.pydoes the actual heavy lifting of training the model and testing it on the SICK dataset. For a list of all command-line arguments, have a look at python main.py -h.Next, these are the different ways to run the code here to train a TreeLSTM model.
If you have a working Python3 environment, simply run the following sequence of steps:
- bash fetch_and_preprocess.sh - python main.py