This code is based on OpenNMT.
- We use Conda python 3.7 and strongly recommend that you create a new environment.
conda create -n pgn python=3.7.
- Run the following command.
pip install -r requirements.txt.
You can get data here. Put them under the dir data/*.
You can follow the following steps to reproduce the best results in our paper.
Download checkpoints here. Put the checkpoint under the dir ckpt/ami.pt.
sh ./scripts/infer.sh
- Change
pyrouge.Rouge155()to your local path.- Output format
>> ROUGE(1/2/L): xx.xx-xx.xx-xx.xx
- Output format
python test_rouge.py -c summaries/ami.txt
You will get following ROUGE scores.
| ROUGE-1 | ROUGE-2 | ROUGE-L | |
|---|---|---|---|
| AMI | 50.91 | 17.75 | 24.59 |
Run the following commands:
sh ./scripts/preprocess.shsh ./scripts/embedding.sh
Run the following command:
sh ./scripts/train.sh
Run the following command:
sh ./scripts/infer.sh- set up model_name param first.