Skip to content

Commit

Permalink
SCLSTM: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
truthless11 committed Jun 6, 2019
1 parent 9dfad17 commit 0378f12
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions convlab/modules/nlg/multiwoz/sc_lstm/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
# nlg-sclstm-multiwoz
pytorch implementation of semantically-conditioned LSTM on multiwoz data

Semantically-conditioned LSTM (SC-LSTM) is an NLG model that generates natural linguistically varied responses based on a deep, semantically controlled LSTM architecture. The code derives from [github](https://github.com/andy194673/nlg-sclstm-multiwoz). The original paper can be found at [ACL Anthology](https://aclweb.org/anthology/papers/D/D15/D15-1199/)

semantically-conditioned LSTM: https://arxiv.org/pdf/1508.01745.pdf

# Run the code
## Run the code

unzip [rar](https://drive.google.com/open?id=14EP8X-bcGgZqbOxQ_k2RSw_iJAMZvFiR) here



l=1

lr=0.005

model_path=./sclstm.pt

log=./sclstm.log

res=./sclstm.res



TRAIN
```
python3 run_woz.py --mode=train --model_path=$model_path --n_layer=$l --lr=$lr > $log
```bash
$ PYTHONPATH=../../../../.. python3 run_woz.py --mode=train --model_path=sclstm.pt --n_layer=1 --lr=0.005 > sclstm.log
```

TEST

```bash
$ PYTHONPATH=../../../../.. python3 run_woz.py --mode=test --model_path=sclstm.pt --n_layer=1 --beam_size=10 > sclstm.res
```

python3 run_woz.py --mode=test --model_path=$model_path --n_layer=$l --beam_size=10 > $res
Calculate BLEU

```bash
$ PYTHONPATH=../../../../.. python3 bleu.py --res_file=sclstm.res
```

Calculate BLEU
## Data

```
We use the multiwoz data (./resource/\*).

python3 bleu.py --res_file=$res
## Reference

```
```
@inproceedings{wen2015semantically,
title={Semantically Conditioned LSTM-based Natural Language Generation for Spoken Dialogue Systems},
author={Wen, Tsung-Hsien and Gasic, Milica and Mrk{\v{s}}i{\'c}, Nikola and Su, Pei-Hao and Vandyke, David and Young, Steve},
booktitle={Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
pages={1711--1721},
year={2015}
}
```

0 comments on commit 0378f12

Please sign in to comment.