Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
qkaren committed Sep 13, 2019
2 parents b78e1d1 + f88ad82 commit d04bc7a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 22 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Lianhui (Karen) Qin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
53 changes: 31 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Code and data for "Counterfactual Story Reasoning and Generation"
<!--
Confidential, please do not redistribute. The code will be released under an MIT License. (What to do with this sentence?)
-->
Code and data for the following paper:
# Dataset and code for "Counterfactual Story Reasoning and Generation"

**Counterfactual Story Reasoning and Generation**
(https://arxiv.org/abs/1909.04076)
This repo contains the dataset and code for the following paper:

*Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark and Yejin Choi; EMNLP 2019*
[Counterfactual Story Reasoning and Generation](https://arxiv.org/abs/1909.04076)
*Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark and Yejin Choi*
EMNLP 2019

## Data
You can **download** the raw data from [here](https://drive.google.com/file/d/150jP5FEHqJD3TmTO_8VGdgqBftTDKn4w/view?usp=sharing) directly.
## Dataset: TimeTravel

Data files (see data description below):
1. `train_supervised_small.json`: supervised training set (the same size as in the paper)
2. `train_supervised_large.json`: supervised training set (different size from in paper as we collected more data)
The dataset can be **downloaded** from [here](https://drive.google.com/file/d/150jP5FEHqJD3TmTO_8VGdgqBftTDKn4w/view?usp=sharing).

**Data files includes** (see examples below):
1. `train_supervised_small.json`: supervised training set (the training set used in the paper experiments)
2. `train_supervised_large.json`: supervised training set (a *larger* supervised training set as we annotated more)
3. `train_unsupervised.json`: unsupervised training set
4. `dev_data.json`: Dev set
5. `test_data.json`: Test set

**Supervised training data example**
**Data format in each file**:

```
* Supervised training data example

```json
{
"story_id": "4fd7d150-b080-4fb1-a592-8c27fa6e1fc8",
"premise": "Andrea wanted a picture of her jumping.",
Expand All @@ -36,9 +36,9 @@ Data files (see data description below):
}
```

**Unsupervised training data example**
* Unsupervised training data example

```
```json
{
"story_id": "da0e85f1-c586-4236-a8a3-ee6421c8e71d",
"premise": "Charles' mother taught her son to carry a pre-paid cell phone.",
Expand All @@ -48,8 +48,9 @@ Data files (see data description below):
}
```

**Dev data example (the same format as test.)**
```
* Dev / test data example

```json
{
"story_id": "048f5a77-7c17-4071-8b0b-b8e43087132d",
"premise": "Neil was visiting Limerick in Ireland.",
Expand All @@ -76,14 +77,22 @@ Data files (see data description below):
}
```

## Code

## How do I cite Counterfactual Story Reasoning and Generation?
```
*(The code is still under cleanup. More details of code usage will be added soon.)*

* Run `run_[X].sh` for training/testing model `[X]`.
* The current code depends on [Texar v0.2.1](https://github.com/asyml/texar/releases/tag/v0.2.1)


## Citation

```bibtex
@inproceedings{qin-counterfactual,
title = "Counterfactual Story Reasoning and Generation",
author = "Qin, Lianhui and Bosselut, Antoine and Holtzman, Ari and Bhagavatula, Chandra and Clark, Elizabeth and Choi, Yejin",
booktitle = "2019 Conference on Empirical Methods in Natural Language Processing.",
month = nov,
month = "nov",
year = "2019",
address = "Hongkong, China",
publisher = "Association for Computational Linguistics",
Expand Down

0 comments on commit d04bc7a

Please sign in to comment.