Commit
·
85584e5
0
Parent(s):
Update files from the datasets library (from 1.16.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.16.0
- .gitattributes +27 -0
- README.md +177 -0
- dataset_infos.json +1 -0
- dummy/0.1.0/dummy_data.zip +3 -0
- riddle_sense.py +126 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- crowdsourced
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- other-non-commercial
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: RiddleSense
|
13 |
+
size_categories:
|
14 |
+
- 1K<n<10K
|
15 |
+
source_datasets:
|
16 |
+
- original
|
17 |
+
task_categories:
|
18 |
+
- question-answering
|
19 |
+
task_ids:
|
20 |
+
- multiple-choice-qa
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for RiddleSense
|
24 |
+
|
25 |
+
## Table of Contents
|
26 |
+
- [Dataset Description](#dataset-description)
|
27 |
+
- [Dataset Summary](#dataset-summary)
|
28 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
29 |
+
- [Languages](#languages)
|
30 |
+
- [Dataset Structure](#dataset-structure)
|
31 |
+
- [Data Instances](#data-instances)
|
32 |
+
- [Data Fields](#data-instances)
|
33 |
+
- [Data Splits](#data-instances)
|
34 |
+
- [Dataset Creation](#dataset-creation)
|
35 |
+
- [Curation Rationale](#curation-rationale)
|
36 |
+
- [Source Data](#source-data)
|
37 |
+
- [Annotations](#annotations)
|
38 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
39 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
40 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
41 |
+
- [Discussion of Biases](#discussion-of-biases)
|
42 |
+
- [Other Known Limitations](#other-known-limitations)
|
43 |
+
- [Additional Information](#additional-information)
|
44 |
+
- [Dataset Curators](#dataset-curators)
|
45 |
+
- [Licensing Information](#licensing-information)
|
46 |
+
- [Citation Information](#citation-information)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:** https://inklab.usc.edu/RiddleSense/
|
51 |
+
- **Repository:** https://github.com/INK-USC/RiddleSense/
|
52 |
+
- **Paper:** https://inklab.usc.edu/RiddleSense/riddlesense_acl21_paper.pdf
|
53 |
+
- **Leaderboard:** https://inklab.usc.edu/RiddleSense/#leaderboard
|
54 |
+
- **Point of Contact:** [Yuchen Lin](yuchen.lin@usc.edu)
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
Answering such a riddle-style question is a challenging cognitive process, in that it requires
|
59 |
+
complex commonsense reasoning abilities, an understanding of figurative language, and counterfactual reasoning
|
60 |
+
skills, which are all important abilities for advanced natural language understanding (NLU). However,
|
61 |
+
there is currently no dedicated datasets aiming to test these abilities. Herein, we present RiddleSense,
|
62 |
+
a new multiple-choice question answering task, which comes with the first large dataset (5.7k examples) for answering
|
63 |
+
riddle-style commonsense questions. We systematically evaluate a wide range of models over the challenge,
|
64 |
+
and point out that there is a large gap between the best-supervised model and human performance suggesting
|
65 |
+
intriguing future research in the direction of higher-order commonsense reasoning and linguistic creativity towards
|
66 |
+
building advanced NLU systems.
|
67 |
+
|
68 |
+
### Supported Tasks and Leaderboards
|
69 |
+
|
70 |
+
[Needs More Information]
|
71 |
+
|
72 |
+
### Languages
|
73 |
+
|
74 |
+
English
|
75 |
+
|
76 |
+
## Dataset Structure
|
77 |
+
|
78 |
+
### Data Instances
|
79 |
+
|
80 |
+
An example of 'train' looks as follows.
|
81 |
+
```
|
82 |
+
{
|
83 |
+
"answerKey": "E",
|
84 |
+
"choices": {
|
85 |
+
"label": ["A", "B", "C", "D", "E"],
|
86 |
+
"text": ["throw", "bit", "gallow", "mouse", "hole"]
|
87 |
+
},
|
88 |
+
"question": "A man is incarcerated in prison, and as his punishment he has to carry a one tonne bag of sand backwards and forwards across a field the size of a football pitch. What is the one thing he can put in it to make it lighter?"
|
89 |
+
}
|
90 |
+
```
|
91 |
+
|
92 |
+
### Data Fields
|
93 |
+
|
94 |
+
Data Fields
|
95 |
+
The data fields are the same among all splits.
|
96 |
+
|
97 |
+
default
|
98 |
+
- `answerKey`: a string feature.
|
99 |
+
- `question`: a string feature.
|
100 |
+
- `choices`: a dictionary feature containing:
|
101 |
+
- `label`: a string feature.
|
102 |
+
- `text`: a string feature.
|
103 |
+
|
104 |
+
### Data Splits
|
105 |
+
|
106 |
+
|name| train| validation| test|
|
107 |
+
|---|---|---|---|
|
108 |
+
|default| 3510| 1021| 1184|
|
109 |
+
|
110 |
+
## Dataset Creation
|
111 |
+
|
112 |
+
### Curation Rationale
|
113 |
+
|
114 |
+
[Needs More Information]
|
115 |
+
|
116 |
+
### Source Data
|
117 |
+
|
118 |
+
#### Initial Data Collection and Normalization
|
119 |
+
|
120 |
+
[Needs More Information]
|
121 |
+
|
122 |
+
#### Who are the source language producers?
|
123 |
+
|
124 |
+
[Needs More Information]
|
125 |
+
|
126 |
+
### Annotations
|
127 |
+
|
128 |
+
#### Annotation process
|
129 |
+
|
130 |
+
[Needs More Information]
|
131 |
+
|
132 |
+
#### Who are the annotators?
|
133 |
+
|
134 |
+
[Needs More Information]
|
135 |
+
|
136 |
+
### Personal and Sensitive Information
|
137 |
+
|
138 |
+
[Needs More Information]
|
139 |
+
|
140 |
+
## Considerations for Using the Data
|
141 |
+
|
142 |
+
### Social Impact of Dataset
|
143 |
+
|
144 |
+
[Needs More Information]
|
145 |
+
|
146 |
+
### Discussion of Biases
|
147 |
+
|
148 |
+
[Needs More Information]
|
149 |
+
|
150 |
+
### Other Known Limitations
|
151 |
+
|
152 |
+
[Needs More Information]
|
153 |
+
|
154 |
+
## Additional Information
|
155 |
+
|
156 |
+
### Dataset Curators
|
157 |
+
|
158 |
+
[Needs More Information]
|
159 |
+
|
160 |
+
### Licensing Information
|
161 |
+
|
162 |
+
The copyright of RiddleSense dataset is consistent with the terms of use of the fan websites and the intellectual property and privacy rights of the original sources. All of our riddles and answers are from fan websites that can be accessed freely. The website owners state that you may print and download material from the sites solely for non-commercial use provided that we agree not to change or delete any copyright or proprietary notices from the materials. The dataset users must agree that they will only use the dataset for research purposes before they can access the both the riddles and our annotations. We do not vouch for the potential bias or fairness issue that might exist within the riddles. You do not have the right to redistribute them. Again, you must not use this dataset for any commercial purposes.
|
163 |
+
|
164 |
+
### Citation Information
|
165 |
+
|
166 |
+
```
|
167 |
+
@InProceedings{lin-etal-2021-riddlesense,
|
168 |
+
title={RiddleSense: Reasoning about Riddle Questions Featuring Linguistic Creativity and Commonsense Knowledge},
|
169 |
+
author={Lin, Bill Yuchen and Wu, Ziyi and Yang, Yichi and Lee, Dong-Ho and Ren, Xiang},
|
170 |
+
journal={Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL-IJCNLP 2021): Findings},
|
171 |
+
year={2021}
|
172 |
+
}
|
173 |
+
```
|
174 |
+
|
175 |
+
### Contributions
|
176 |
+
|
177 |
+
Thanks to [@ziyiwu9494](https://github.com/ziyiwu9494) for adding this dataset.
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "Answering such a riddle-style question is a challenging cognitive process, in that it requires \ncomplex commonsense reasoning abilities, an understanding of figurative language, and counterfactual reasoning \nskills, which are all important abilities for advanced natural language understanding (NLU). However, \nthere is currently no dedicated datasets aiming to test these abilities. Herein, we present RiddleSense, \na new multiple-choice question answering task, which comes with the first large dataset (5.7k examples) for answering \nriddle-style commonsense questions. We systematically evaluate a wide range of models over the challenge, \nand point out that there is a large gap between the best-supervised model and human performance \u2014 suggesting \nintriguing future research in the direction of higher-order commonsense reasoning and linguistic creativity towards \nbuilding advanced NLU systems. \n\n", "citation": "@InProceedings{lin-etal-2021-riddlesense,\ntitle={RiddleSense: Reasoning about Riddle Questions Featuring Linguistic Creativity and Commonsense Knowledge},\nauthor={Lin, Bill Yuchen and Wu, Ziyi and Yang, Yichi and Lee, Dong-Ho and Ren, Xiang},\njournal={Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL-IJCNLP 2021): Findings},\nyear={2021}\n\n", "homepage": "https://inklab.usc.edu/RiddleSense/", "license": "", "features": {"answerKey": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "choices": {"feature": {"label": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "riddle_sense", "config_name": "default", "version": {"version_str": "0.1.0", "description": null, "major": 0, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 720715, "num_examples": 3510, "dataset_name": "riddle_sense"}, "validation": {"name": "validation", "num_bytes": 208276, "num_examples": 1021, "dataset_name": "riddle_sense"}, "test": {"name": "test", "num_bytes": 212790, "num_examples": 1184, "dataset_name": "riddle_sense"}}, "download_checksums": {"https://inklab.usc.edu/RiddleSense/riddlesense_dataset/rs_train.jsonl": {"num_bytes": 1293825, "checksum": "d82423612b706aace65f2ee5f1f0f2b71e2f6ea27102a74864a2f9dfada2fe1f"}, "https://inklab.usc.edu/RiddleSense/riddlesense_dataset/rs_dev.jsonl": {"num_bytes": 375327, "checksum": "6680e5998bdbe65d85b02f620e64c365c52830ee5bfeb4d82c9e2a7cf4675365"}, "https://inklab.usc.edu/RiddleSense/riddlesense_dataset/rs_test_hidden.jsonl": {"num_bytes": 413970, "checksum": "ea83bfeff23fa77da7a922fdb272e7c7bc8ec628d4e54b3eb463c93bcfee60cf"}}, "download_size": 2083122, "post_processing_size": null, "dataset_size": 1141781, "size_in_bytes": 3224903}}
|
dummy/0.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:902fac8bcdcc41f53b37da2be2ed8abf058cf66ffc099e8f41886cf360aab215
|
3 |
+
size 2342
|
riddle_sense.py
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
import datasets
|
4 |
+
|
5 |
+
|
6 |
+
_CITATION = """\
|
7 |
+
@InProceedings{lin-etal-2021-riddlesense,
|
8 |
+
title={RiddleSense: Reasoning about Riddle Questions Featuring Linguistic Creativity and Commonsense Knowledge},
|
9 |
+
author={Lin, Bill Yuchen and Wu, Ziyi and Yang, Yichi and Lee, Dong-Ho and Ren, Xiang},
|
10 |
+
journal={Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL-IJCNLP 2021): Findings},
|
11 |
+
year={2021}
|
12 |
+
}
|
13 |
+
"""
|
14 |
+
|
15 |
+
_DESCRIPTION = """\
|
16 |
+
Answering such a riddle-style question is a challenging cognitive process, in that it requires
|
17 |
+
complex commonsense reasoning abilities, an understanding of figurative language, and counterfactual reasoning
|
18 |
+
skills, which are all important abilities for advanced natural language understanding (NLU). However,
|
19 |
+
there is currently no dedicated datasets aiming to test these abilities. Herein, we present RiddleSense,
|
20 |
+
a new multiple-choice question answering task, which comes with the first large dataset (5.7k examples) for answering
|
21 |
+
riddle-style commonsense questions. We systematically evaluate a wide range of models over the challenge,
|
22 |
+
and point out that there is a large gap between the best-supervised model and human performance — suggesting
|
23 |
+
intriguing future research in the direction of higher-order commonsense reasoning and linguistic creativity towards
|
24 |
+
building advanced NLU systems.
|
25 |
+
|
26 |
+
"""
|
27 |
+
|
28 |
+
_LICENSE = """\
|
29 |
+
The copyright of RiddleSense dataset is consistent with the terms of use of the fan websites and the intellectual
|
30 |
+
property and privacy rights of the original sources. All of our riddles and answers are from fan websites that can be
|
31 |
+
accessed freely. The website owners state that you may print and download material from the sites solely for non
|
32 |
+
commercial use provided that we agree not to change or delete any copyright or proprietary notices from the
|
33 |
+
materials. The dataset users must agree that they will only use the dataset for research purposes before they can
|
34 |
+
access the both the riddles and our annotations. We do not vouch for the potential bias or fairness issue that might
|
35 |
+
exist within the riddles. You do not have the right to redistribute them. Again, you must not use this dataset for any
|
36 |
+
commercial purposes.
|
37 |
+
"""
|
38 |
+
|
39 |
+
_URL = "https://inklab.usc.edu/RiddleSense/riddlesense_dataset/"
|
40 |
+
_URLS = {
|
41 |
+
"train": _URL + "rs_train.jsonl",
|
42 |
+
"dev": _URL + "rs_dev.jsonl",
|
43 |
+
"test": _URL + "rs_test_hidden.jsonl",
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
class RiddleSense(datasets.GeneratorBasedBuilder):
|
48 |
+
|
49 |
+
VERSION = datasets.Version("0.1.0")
|
50 |
+
|
51 |
+
def _info(self):
|
52 |
+
# These are the features of your dataset like images, labels ...
|
53 |
+
features = datasets.Features(
|
54 |
+
{
|
55 |
+
"answerKey": datasets.Value("string"),
|
56 |
+
"question": datasets.Value("string"),
|
57 |
+
"choices": datasets.features.Sequence(
|
58 |
+
{
|
59 |
+
"label": datasets.Value("string"),
|
60 |
+
"text": datasets.Value("string"),
|
61 |
+
}
|
62 |
+
),
|
63 |
+
}
|
64 |
+
)
|
65 |
+
return datasets.DatasetInfo(
|
66 |
+
# This is the description that will appear on the datasets page.
|
67 |
+
description=_DESCRIPTION,
|
68 |
+
# datasets.features.FeatureConnectors
|
69 |
+
features=features,
|
70 |
+
# If there's a common (input, target) tuple from the features,
|
71 |
+
# specify them here. They'll be used if as_supervised=True in
|
72 |
+
# builder.as_dataset.
|
73 |
+
supervised_keys=None,
|
74 |
+
# Homepage of the dataset for documentation
|
75 |
+
homepage="https://inklab.usc.edu/RiddleSense/",
|
76 |
+
citation=_CITATION,
|
77 |
+
license=_LICENSE,
|
78 |
+
)
|
79 |
+
|
80 |
+
def _split_generators(self, dl_manager):
|
81 |
+
"""Returns SplitGenerators."""
|
82 |
+
|
83 |
+
download_urls = _URLS
|
84 |
+
|
85 |
+
downloaded_files = dl_manager.download_and_extract(download_urls)
|
86 |
+
|
87 |
+
return [
|
88 |
+
datasets.SplitGenerator(
|
89 |
+
name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"], "split": "train"}
|
90 |
+
),
|
91 |
+
datasets.SplitGenerator(
|
92 |
+
name=datasets.Split.VALIDATION,
|
93 |
+
gen_kwargs={
|
94 |
+
"filepath": downloaded_files["dev"],
|
95 |
+
"split": "dev",
|
96 |
+
},
|
97 |
+
),
|
98 |
+
datasets.SplitGenerator(
|
99 |
+
name=datasets.Split.TEST,
|
100 |
+
gen_kwargs={
|
101 |
+
"filepath": downloaded_files["test"],
|
102 |
+
"split": "test",
|
103 |
+
},
|
104 |
+
),
|
105 |
+
]
|
106 |
+
|
107 |
+
def _generate_examples(self, filepath, split):
|
108 |
+
"""Yields examples."""
|
109 |
+
with open(filepath, encoding="utf-8") as f:
|
110 |
+
for id_, row in enumerate(f):
|
111 |
+
data = json.loads(row)
|
112 |
+
question = data["question"]
|
113 |
+
choices = question["choices"]
|
114 |
+
labels = [label["label"] for label in choices]
|
115 |
+
texts = [text["text"] for text in choices]
|
116 |
+
stem = question["stem"]
|
117 |
+
if split == "test":
|
118 |
+
answerkey = ""
|
119 |
+
else:
|
120 |
+
answerkey = data["answerKey"]
|
121 |
+
|
122 |
+
yield id_, {
|
123 |
+
"answerKey": answerkey,
|
124 |
+
"question": stem,
|
125 |
+
"choices": {"label": labels, "text": texts},
|
126 |
+
}
|