Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Add instructions of how to run our code
Browse files Browse the repository at this point in the history
  • Loading branch information
jinfengr authored Aug 16, 2019
1 parent 65caec7 commit 93aedcc
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ E2E | 42061 | 4672 | 4693 | 230

`Disc_Test` is a more challenging subset of our test set that contains discourse relations, which is also the subset we report results in `Disc` column in Table 7 in our paper. Note that there are some minor differences of data statistics to our paper, please use the statistics above.

## Code

Computing tree accuracy:

```
python compute_tree_acc.py -tsv example/seq2seq_out.tsv
```

This should give you 0.8511 tree accuracy. Output file should be tab-separated with columns `id, input, pred, target`.

### Constrained Decoding
You could port our `constrained_sequence_generator.py` into the [fairseq](https://github.com/pytorch/fairseq) repo to support constrained decoding.


### Results
We noticed that slightly higher numbers can be obtained by tuning hyper-parameters compared to the numbers we reported in our paper. Therefore, we update all the automatic numbers (BLEU and tree accuracy) here and please use numbers below when citing our results. For tree accuracy, we report the number on the whole test set, as well as on two disjoint subsets: **no-discourse** subset that contains examples without any discourse act; **discourse** subset contains example with 1+ discourse acts.

Expand All @@ -54,15 +68,5 @@ Dataset | BLEU | TreeAcc(whole) | TreeAcc(no-discourse) | TreeAcc(disc
S2S-Tree | 74.58 | 97.06 | 99.68 | 95.28
S2S-Constr | 74.69 | 99.25 | 99.89 | 97.78

## Code

Computing tree accuracy:

```
python compute_tree_acc.py -tsv ~/seq2seq_out.tsv
```

Output file should be tab-separated with columns `id, input, pred, target`.

### License
TreeNLG is released under [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode), see [LICENSE](LICENSE.md) for details.

0 comments on commit 93aedcc

Please sign in to comment.