SelectiveGeneration
Code base for Mei et al. NAACL 2016 paper
This codebase is revised from my original version and still under-tested, so I'd share my original code and data files through this Google drive:
https://drive.google.com/drive/folders/0BwqmV0EcoUc8OHpLd3NaU19Hb0E?usp=sharing
Dependencies
- Anaconda - Anaconda includes all the Python-related dependencies
- Theano - Computational graphs are built on Theano
- NLTK - Natural Language Toolkit
- JPype - Call Java in Python
- JDK - Java Development Toolkit
- ArgParse - Command line parsing in Python
Instructions
Here are the instructions to use the code base.
Prepare Data
Creat a folder called 'data' and copy data files (to be added) to it.
Prepare Eval Code
Creat a folder called 'dist'.
Download and compile the Java code from Gabor Angeli's 2010 EMNLP paper.
Copy the generation.jar file to the dist folder.
Train Models
To train the model with options, use the command line
python train_models.py --options
For the details of options, please check
python train_models.py --help
Test Models
Choose a model to evaluate on dev or test set, with the command line:
python test_models.py --options
For the details of options, please check
python test_models.py --help
License
This project is licensed under the MIT License - see the LICENSE.md file for details