Datasets:
Tasks:
Question Answering
Sub-tasks:
multiple-choice-qa
Languages:
English
Size:
10K<n<100K
ArXiv:
License:
Commit
•
92376a0
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +177 -0
- dataset_infos.json +1 -0
- dummy/plain_text/1.1.0/dummy_data.zip +3 -0
- mc_taco.py +116 -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 |
+
- machine-generated
|
5 |
+
language_creators:
|
6 |
+
- crowdsourced
|
7 |
+
- found
|
8 |
+
languages:
|
9 |
+
- en
|
10 |
+
licenses:
|
11 |
+
- unknown
|
12 |
+
multilinguality:
|
13 |
+
- monolingual
|
14 |
+
size_categories:
|
15 |
+
- 10K<n<100K
|
16 |
+
source_datasets:
|
17 |
+
- original
|
18 |
+
task_categories:
|
19 |
+
- question-answering
|
20 |
+
task_ids:
|
21 |
+
- multiple-choice-qa
|
22 |
+
---
|
23 |
+
|
24 |
+
# Dataset Card Creation Guide
|
25 |
+
|
26 |
+
## Table of Contents
|
27 |
+
- [Dataset Description](#dataset-description)
|
28 |
+
- [Dataset Summary](#dataset-summary)
|
29 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
30 |
+
- [Languages](#languages)
|
31 |
+
- [Dataset Structure](#dataset-structure)
|
32 |
+
- [Data Instances](#data-instances)
|
33 |
+
- [Data Fields](#data-instances)
|
34 |
+
- [Data Splits](#data-instances)
|
35 |
+
- [Dataset Creation](#dataset-creation)
|
36 |
+
- [Curation Rationale](#curation-rationale)
|
37 |
+
- [Source Data](#source-data)
|
38 |
+
- [Annotations](#annotations)
|
39 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
40 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
41 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
42 |
+
- [Discussion of Biases](#discussion-of-biases)
|
43 |
+
- [Other Known Limitations](#other-known-limitations)
|
44 |
+
- [Additional Information](#additional-information)
|
45 |
+
- [Dataset Curators](#dataset-curators)
|
46 |
+
- [Licensing Information](#licensing-information)
|
47 |
+
- [Citation Information](#citation-information)
|
48 |
+
|
49 |
+
## Dataset Description
|
50 |
+
|
51 |
+
- **Homepage:** [MC-TACO](https://cogcomp.seas.upenn.edu/page/resource_view/125)
|
52 |
+
- **Repository:** [Github repository](https://github.com/CogComp/MCTACO)
|
53 |
+
- **Paper:** ["Going on a vacation" takes longer than "Going for a walk": A Study of Temporal Commonsense Understanding](https://arxiv.org/abs/1909.03065)
|
54 |
+
- **Leaderboard:** [AI2 Leaderboard](https://leaderboard.allenai.org/mctaco)
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
MC-TACO (Multiple Choice TemporAl COmmonsense) is a dataset of 13k question-answer pairs that require temporal commonsense comprehension. A system receives a sentence providing context information, a question designed to require temporal commonsense knowledge, and multiple candidate answers. More than one candidate answer can be plausible.
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
The task is framed as binary classification: givent he context, the question, and the candidate answer, the task is to determine whether the candidate answer is plausible ("yes") or not ("no").
|
63 |
+
|
64 |
+
Performance is measured using two metrics:
|
65 |
+
|
66 |
+
- Exact Match -- the average number of questions for which all the candidate answers are predicted correctly.
|
67 |
+
- F1 -- is slightly more relaxed than EM. It measures the overlap between one’s predictions and the ground truth, by computing the geometric mean of Precision and Recall.
|
68 |
+
|
69 |
+
### Languages
|
70 |
+
|
71 |
+
The text in the dataset is in English. The associated BCP-47 code is `en`.
|
72 |
+
|
73 |
+
## Dataset Structure
|
74 |
+
|
75 |
+
### Data Instances
|
76 |
+
|
77 |
+
An example looks like this:
|
78 |
+
|
79 |
+
```
|
80 |
+
{
|
81 |
+
"sentence": "However, more recently, it has been suggested that it may date from earlier than Abdalonymus' death.",
|
82 |
+
"question": "How often did Abdalonymus die?",
|
83 |
+
"answer": "every two years",
|
84 |
+
"label": "no",
|
85 |
+
"category": "Frequency",
|
86 |
+
}
|
87 |
+
```
|
88 |
+
|
89 |
+
### Data Fields
|
90 |
+
|
91 |
+
All fields are strings:
|
92 |
+
- `sentence`: a sentence (or context) on which the question is based
|
93 |
+
- `question`: a question querying some temporal commonsense knowledge
|
94 |
+
- `answer`: a potential answer to the question (all lowercased)
|
95 |
+
- `label`: whether the answer is a correct. "yes" indicates the answer is correct/plaussible, "no" otherwise
|
96 |
+
- `category`: the temporal category the question belongs to (among "Event Ordering", "Event Duration", "Frequency", "Stationarity", and "Typical Time")
|
97 |
+
|
98 |
+
### Data Splits
|
99 |
+
|
100 |
+
The development set contains 561 questions and 3,783 candidate answers. The test set contains 1,332 questions and 9,442 candidate answers.
|
101 |
+
|
102 |
+
From the original repository:
|
103 |
+
|
104 |
+
*Note that there is no training data, and we provide the dev set as the only source of supervision. The rationale is that we believe a successful system has to bring in a huge amount of world knowledge and derive commonsense understandings prior to the current task evaluation. We therefore believe that it is not reasonable to expect a system to be trained solely on this data, and we think of the development data as only providing a definition of the task.*
|
105 |
+
|
106 |
+
## Dataset Creation
|
107 |
+
|
108 |
+
### Curation Rationale
|
109 |
+
|
110 |
+
MC-TACO is used as a testbed to study the temporal commonsense understanding on NLP systems.
|
111 |
+
|
112 |
+
### Source Data
|
113 |
+
|
114 |
+
From the original paper:
|
115 |
+
|
116 |
+
*The context sentences are randomly selected from [MultiRC](https://www.aclweb.org/anthology/N18-1023/) (from each of its 9 domains). For each sentence, we use crowdsourcing on Amazon Mechanical Turk to collect questions and candidate answers (both correct and wrong ones).*
|
117 |
+
|
118 |
+
#### Initial Data Collection and Normalization
|
119 |
+
|
120 |
+
[More Information Needed]
|
121 |
+
|
122 |
+
#### Who are the source language producers?
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Annotations
|
127 |
+
|
128 |
+
From the original paper:
|
129 |
+
|
130 |
+
*To ensure the quality of the results, we limit the annotations to native speakers and use qualification tryouts.*
|
131 |
+
|
132 |
+
#### Annotation process
|
133 |
+
|
134 |
+
The crowdsourced construction/annotation of the dataset follows 4 steps described in Section 3 of the [paper](https://arxiv.org/abs/1909.03065): question generation, question verification, candidate answer expansion and answer labeling.
|
135 |
+
|
136 |
+
#### Who are the annotators?
|
137 |
+
|
138 |
+
Paid crowdsourcers.
|
139 |
+
|
140 |
+
### Personal and Sensitive Information
|
141 |
+
|
142 |
+
[More Information Needed]
|
143 |
+
|
144 |
+
## Considerations for Using the Data
|
145 |
+
|
146 |
+
### Social Impact of Dataset
|
147 |
+
|
148 |
+
[More Information Needed]
|
149 |
+
|
150 |
+
### Discussion of Biases
|
151 |
+
|
152 |
+
[More Information Needed]
|
153 |
+
|
154 |
+
### Other Known Limitations
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
## Additional Information
|
159 |
+
|
160 |
+
### Dataset Curators
|
161 |
+
|
162 |
+
[More Information Needed]
|
163 |
+
|
164 |
+
### Licensing Information
|
165 |
+
|
166 |
+
Unknwon
|
167 |
+
|
168 |
+
### Citation Information
|
169 |
+
|
170 |
+
```
|
171 |
+
@inproceedings{ZKNR19,
|
172 |
+
author = {Ben Zhou, Daniel Khashabi, Qiang Ning and Dan Roth},
|
173 |
+
title = {“Going on a vacation” takes longer than “Going for a walk”: A Study of Temporal Commonsense Understanding },
|
174 |
+
booktitle = {EMNLP},
|
175 |
+
year = {2019},
|
176 |
+
}
|
177 |
+
```
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"plain_text": {"description": "MC-TACO (Multiple Choice TemporAl COmmonsense) is a dataset of 13k question-answer\npairs that require temporal commonsense comprehension. A system receives a sentence\nproviding context information, a question designed to require temporal commonsense\nknowledge, and multiple candidate answers. More than one candidate answer can be plausible.\n\nThe task is framed as binary classification: givent he context, the question,\nand the candidate answer, the task is to determine whether the candidate\nanswer is plausible (\"yes\") or not (\"no\").", "citation": "@inproceedings{ZKNR19,\n author = {Ben Zhou, Daniel Khashabi, Qiang Ning and Dan Roth},\n title = {\u201cGoing on a vacation\u201d takes longer than \u201cGoing for a walk\u201d: A Study of Temporal Commonsense Understanding },\n booktitle = {EMNLP},\n year = {2019},\n}\n", "homepage": "https://cogcomp.seas.upenn.edu/page/resource_view/125", "license": "Unknown", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["no", "yes"], "names_file": null, "id": null, "_type": "ClassLabel"}, "category": {"num_classes": 5, "names": ["Event Duration", "Event Ordering", "Frequency", "Typical Time", "Stationarity"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "mc_taco", "config_name": "plain_text", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 1785553, "num_examples": 9442, "dataset_name": "mc_taco"}, "validation": {"name": "validation", "num_bytes": 713023, "num_examples": 3783, "dataset_name": "mc_taco"}}, "download_checksums": {"https://raw.githubusercontent.com/CogComp/MCTACO/master/dataset/dev_3783.tsv": {"num_bytes": 679912, "checksum": "8de54f6d3e0a6466e4ba2c5179c7f9ac3442eeba8683c46fd712f5f54751d6dd"}, "https://raw.githubusercontent.com/CogComp/MCTACO/master/dataset/test_9442.tsv": {"num_bytes": 1705225, "checksum": "47e12f88559eb0735eeca2af2d0a3ed48efb3bb2742ff31de9fcfc9a76094354"}}, "download_size": 2385137, "post_processing_size": null, "dataset_size": 2498576, "size_in_bytes": 4883713}}
|
dummy/plain_text/1.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:95b49c8911ceffd65aebac490daa338e902e1f8def741fcd132fc71535b9d650
|
3 |
+
size 711
|
mc_taco.py
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
"""MC-TACO Dataset."""
|
16 |
+
|
17 |
+
from __future__ import absolute_import, division, print_function
|
18 |
+
|
19 |
+
import csv
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
|
24 |
+
_CITATION = """\
|
25 |
+
@inproceedings{ZKNR19,
|
26 |
+
author = {Ben Zhou, Daniel Khashabi, Qiang Ning and Dan Roth},
|
27 |
+
title = {“Going on a vacation” takes longer than “Going for a walk”: A Study of Temporal Commonsense Understanding },
|
28 |
+
booktitle = {EMNLP},
|
29 |
+
year = {2019},
|
30 |
+
}
|
31 |
+
"""
|
32 |
+
|
33 |
+
_DESCRIPTION = """\
|
34 |
+
MC-TACO (Multiple Choice TemporAl COmmonsense) is a dataset of 13k question-answer
|
35 |
+
pairs that require temporal commonsense comprehension. A system receives a sentence
|
36 |
+
providing context information, a question designed to require temporal commonsense
|
37 |
+
knowledge, and multiple candidate answers. More than one candidate answer can be plausible.
|
38 |
+
|
39 |
+
The task is framed as binary classification: givent he context, the question,
|
40 |
+
and the candidate answer, the task is to determine whether the candidate
|
41 |
+
answer is plausible ("yes") or not ("no")."""
|
42 |
+
|
43 |
+
_LICENSE = "Unknown"
|
44 |
+
|
45 |
+
_URLs = {
|
46 |
+
"dev": "https://raw.githubusercontent.com/CogComp/MCTACO/master/dataset/dev_3783.tsv",
|
47 |
+
"test": "https://raw.githubusercontent.com/CogComp/MCTACO/master/dataset/test_9442.tsv",
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
class McTaco(datasets.GeneratorBasedBuilder):
|
52 |
+
"""MC-TACO Dataset: temporal commonsense knowledge."""
|
53 |
+
|
54 |
+
VERSION = datasets.Version("1.1.0")
|
55 |
+
|
56 |
+
BUILDER_CONFIGS = [
|
57 |
+
datasets.BuilderConfig(
|
58 |
+
name="plain_text",
|
59 |
+
description="Plain text",
|
60 |
+
version=VERSION,
|
61 |
+
),
|
62 |
+
]
|
63 |
+
|
64 |
+
def _info(self):
|
65 |
+
return datasets.DatasetInfo(
|
66 |
+
description=_DESCRIPTION,
|
67 |
+
features=datasets.Features(
|
68 |
+
{
|
69 |
+
"sentence": datasets.Value("string"),
|
70 |
+
"question": datasets.Value("string"),
|
71 |
+
"answer": datasets.Value("string"),
|
72 |
+
"label": datasets.ClassLabel(names=["no", "yes"]),
|
73 |
+
"category": datasets.ClassLabel(
|
74 |
+
names=["Event Duration", "Event Ordering", "Frequency", "Typical Time", "Stationarity"]
|
75 |
+
),
|
76 |
+
}
|
77 |
+
),
|
78 |
+
supervised_keys=None,
|
79 |
+
homepage="https://cogcomp.seas.upenn.edu/page/resource_view/125",
|
80 |
+
license=_LICENSE,
|
81 |
+
citation=_CITATION,
|
82 |
+
)
|
83 |
+
|
84 |
+
def _split_generators(self, dl_manager):
|
85 |
+
"""Returns SplitGenerators."""
|
86 |
+
data_dir = dl_manager.download_and_extract(_URLs)
|
87 |
+
return [
|
88 |
+
datasets.SplitGenerator(
|
89 |
+
name=datasets.Split.TEST,
|
90 |
+
gen_kwargs={
|
91 |
+
"filepath": data_dir["test"],
|
92 |
+
},
|
93 |
+
),
|
94 |
+
datasets.SplitGenerator(
|
95 |
+
name=datasets.Split.VALIDATION,
|
96 |
+
gen_kwargs={
|
97 |
+
"filepath": data_dir["dev"],
|
98 |
+
},
|
99 |
+
),
|
100 |
+
]
|
101 |
+
|
102 |
+
def _generate_examples(self, filepath):
|
103 |
+
""" Yields examples. """
|
104 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
105 |
+
csv_reader = csv.reader(
|
106 |
+
csv_file,
|
107 |
+
delimiter="\t",
|
108 |
+
)
|
109 |
+
for id_, row in enumerate(csv_reader):
|
110 |
+
yield id_, {
|
111 |
+
"sentence": row[0],
|
112 |
+
"question": row[1],
|
113 |
+
"answer": row[2],
|
114 |
+
"label": row[3],
|
115 |
+
"category": row[4],
|
116 |
+
}
|