This model implements the work in the following paper:
Jonathan Raiman and John Miller. Globally Normalized Reader. Empirical Methods in Natural Language Processing (EMNLP), 2017.
If you use the dataset/code in your research, please cite the above paper:
@inproceedings{raiman2015gnr,
author={Raiman, Jonathan and Miller, John},
booktitle={Empirical Methods in Natural Language Processing (EMNLP)},
title={Globally Normalized Reader},
year={2017},
}
You can also visit https://github.com/baidu-research/GloballyNormalizedReader to get more information.
- Please use docker image to install the latest PaddlePaddle, by running:
docker pull paddledev/paddle
- Download all necessary data by running:
cd data && ./download.sh && cd ..
- Preprocess and featurizer data:
python featurize.py --datadir data --outdir data/featurized --glove-path data/glove.840B.300d.txt
-
Configurate the model by modifying
config.pyif needed, and then run:python train.py 2>&1 | tee train.log
- Infer by a trained model by running:
python infer.py \ --model_path models/pass_00000.tar.gz \ --data_dir data/featurized/ \ --batch_size 2 \ --use_gpu 0 \ --trainer_count 1 \ 2>&1 | tee infer.log