Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
parquet
Sub-tasks:
open-domain-qa
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Commit
•
e969d01
1
Parent(s):
4b3c61e
Convert dataset to Parquet (#1)
Browse files- Convert dataset to Parquet (72112ee8ef9e57ecede00ddfa000cde9de421ba6)
- Add light data files (788845f32591342633c60167a81b60d521790efb)
- Delete loading script (a202432ef5aa99a29d0304a530a93877e1ffcfac)
- Delete legacy dataset_infos.json (1681964e138ab7f6961e9114974f6761fcfd0466)
- README.md +40 -26
- ambig_qa.py +0 -150
- dataset_infos.json +0 -1
- full/train-00000-of-00001.parquet +3 -0
- full/validation-00000-of-00001.parquet +3 -0
- light/train-00000-of-00001.parquet +3 -0
- light/validation-00000-of-00001.parquet +3 -0
README.md
CHANGED
@@ -21,7 +21,7 @@ task_ids:
|
|
21 |
paperswithcode_id: ambigqa
|
22 |
pretty_name: 'AmbigQA: Answering Ambiguous Open-domain Questions'
|
23 |
dataset_info:
|
24 |
-
- config_name:
|
25 |
features:
|
26 |
- name: id
|
27 |
dtype: string
|
@@ -39,16 +39,32 @@ dataset_info:
|
|
39 |
dtype: string
|
40 |
- name: answer
|
41 |
sequence: string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
splits:
|
43 |
- name: train
|
44 |
-
num_bytes:
|
45 |
num_examples: 10036
|
46 |
- name: validation
|
47 |
-
num_bytes:
|
48 |
num_examples: 2002
|
49 |
-
download_size:
|
50 |
-
dataset_size:
|
51 |
-
- config_name:
|
52 |
features:
|
53 |
- name: id
|
54 |
dtype: string
|
@@ -66,31 +82,29 @@ dataset_info:
|
|
66 |
dtype: string
|
67 |
- name: answer
|
68 |
sequence: string
|
69 |
-
- name: viewed_doc_titles
|
70 |
-
sequence: string
|
71 |
-
- name: used_queries
|
72 |
-
sequence:
|
73 |
-
- name: query
|
74 |
-
dtype: string
|
75 |
-
- name: results
|
76 |
-
sequence:
|
77 |
-
- name: title
|
78 |
-
dtype: string
|
79 |
-
- name: snippet
|
80 |
-
dtype: string
|
81 |
-
- name: nq_answer
|
82 |
-
sequence: string
|
83 |
-
- name: nq_doc_title
|
84 |
-
dtype: string
|
85 |
splits:
|
86 |
- name: train
|
87 |
-
num_bytes:
|
88 |
num_examples: 10036
|
89 |
- name: validation
|
90 |
-
num_bytes:
|
91 |
num_examples: 2002
|
92 |
-
download_size:
|
93 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
---
|
95 |
|
96 |
# Dataset Card for AmbigQA: Answering Ambiguous Open-domain Questions
|
|
|
21 |
paperswithcode_id: ambigqa
|
22 |
pretty_name: 'AmbigQA: Answering Ambiguous Open-domain Questions'
|
23 |
dataset_info:
|
24 |
+
- config_name: full
|
25 |
features:
|
26 |
- name: id
|
27 |
dtype: string
|
|
|
39 |
dtype: string
|
40 |
- name: answer
|
41 |
sequence: string
|
42 |
+
- name: viewed_doc_titles
|
43 |
+
sequence: string
|
44 |
+
- name: used_queries
|
45 |
+
sequence:
|
46 |
+
- name: query
|
47 |
+
dtype: string
|
48 |
+
- name: results
|
49 |
+
sequence:
|
50 |
+
- name: title
|
51 |
+
dtype: string
|
52 |
+
- name: snippet
|
53 |
+
dtype: string
|
54 |
+
- name: nq_answer
|
55 |
+
sequence: string
|
56 |
+
- name: nq_doc_title
|
57 |
+
dtype: string
|
58 |
splits:
|
59 |
- name: train
|
60 |
+
num_bytes: 43538533
|
61 |
num_examples: 10036
|
62 |
- name: validation
|
63 |
+
num_bytes: 15383268
|
64 |
num_examples: 2002
|
65 |
+
download_size: 30674462
|
66 |
+
dataset_size: 58921801
|
67 |
+
- config_name: light
|
68 |
features:
|
69 |
- name: id
|
70 |
dtype: string
|
|
|
82 |
dtype: string
|
83 |
- name: answer
|
84 |
sequence: string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
splits:
|
86 |
- name: train
|
87 |
+
num_bytes: 2739628
|
88 |
num_examples: 10036
|
89 |
- name: validation
|
90 |
+
num_bytes: 805756
|
91 |
num_examples: 2002
|
92 |
+
download_size: 1777867
|
93 |
+
dataset_size: 3545384
|
94 |
+
configs:
|
95 |
+
- config_name: full
|
96 |
+
data_files:
|
97 |
+
- split: train
|
98 |
+
path: full/train-*
|
99 |
+
- split: validation
|
100 |
+
path: full/validation-*
|
101 |
+
default: true
|
102 |
+
- config_name: light
|
103 |
+
data_files:
|
104 |
+
- split: train
|
105 |
+
path: light/train-*
|
106 |
+
- split: validation
|
107 |
+
path: light/validation-*
|
108 |
---
|
109 |
|
110 |
# Dataset Card for AmbigQA: Answering Ambiguous Open-domain Questions
|
ambig_qa.py
DELETED
@@ -1,150 +0,0 @@
|
|
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 |
-
|
16 |
-
"""AmbigQA: Answering Ambiguous Open-domain Questions"""
|
17 |
-
|
18 |
-
|
19 |
-
import json
|
20 |
-
import os
|
21 |
-
|
22 |
-
import datasets
|
23 |
-
|
24 |
-
|
25 |
-
_CITATION = """\
|
26 |
-
@inproceedings{ min2020ambigqa,
|
27 |
-
title={ {A}mbig{QA}: Answering Ambiguous Open-domain Questions },
|
28 |
-
author={ Min, Sewon and Michael, Julian and Hajishirzi, Hannaneh and Zettlemoyer, Luke },
|
29 |
-
booktitle={ EMNLP },
|
30 |
-
year={2020}
|
31 |
-
}
|
32 |
-
"""
|
33 |
-
|
34 |
-
_DESCRIPTION = """\
|
35 |
-
AmbigNQ, a dataset covering 14,042 questions from NQ-open, an existing open-domain QA benchmark. We find that over half of the questions in NQ-open are ambiguous. The types of ambiguity are diverse and sometimes subtle, many of which are only apparent after examining evidence provided by a very large text corpus. AMBIGNQ, a dataset with
|
36 |
-
14,042 annotations on NQ-OPEN questions containing diverse types of ambiguity.
|
37 |
-
We provide two distributions of our new dataset AmbigNQ: a full version with all annotation metadata and a light version with only inputs and outputs.
|
38 |
-
"""
|
39 |
-
_HOMEPAGE = "https://nlp.cs.washington.edu/ambigqa/"
|
40 |
-
_LICENSE = "CC BY-SA 3.0"
|
41 |
-
|
42 |
-
_URL = "https://nlp.cs.washington.edu/ambigqa/data/"
|
43 |
-
_URLS = {
|
44 |
-
"light": _URL + "ambignq_light.zip",
|
45 |
-
"full": _URL + "ambignq.zip",
|
46 |
-
}
|
47 |
-
|
48 |
-
|
49 |
-
class AmbigQa(datasets.GeneratorBasedBuilder):
|
50 |
-
"""AmbigQA dataset"""
|
51 |
-
|
52 |
-
VERSION = datasets.Version("1.0.0")
|
53 |
-
BUILDER_CONFIGS = [
|
54 |
-
datasets.BuilderConfig(
|
55 |
-
name="light",
|
56 |
-
version=VERSION,
|
57 |
-
description="AmbigNQ light version with only inputs and outputs",
|
58 |
-
),
|
59 |
-
datasets.BuilderConfig(
|
60 |
-
name="full",
|
61 |
-
version=VERSION,
|
62 |
-
description="AmbigNQ full version with all annotation metadata",
|
63 |
-
),
|
64 |
-
]
|
65 |
-
DEFAULT_CONFIG_NAME = "full"
|
66 |
-
|
67 |
-
def _info(self):
|
68 |
-
features_dict = {
|
69 |
-
"id": datasets.Value("string"),
|
70 |
-
"question": datasets.Value("string"),
|
71 |
-
"annotations": datasets.features.Sequence(
|
72 |
-
{
|
73 |
-
"type": datasets.Value("string"), # datasets.ClassLabel(names = ["singleAnswer","multipleQAs"])
|
74 |
-
"answer": datasets.features.Sequence(datasets.Value("string")),
|
75 |
-
"qaPairs": datasets.features.Sequence(
|
76 |
-
{
|
77 |
-
"question": datasets.Value("string"),
|
78 |
-
"answer": datasets.features.Sequence(datasets.Value("string")),
|
79 |
-
}
|
80 |
-
),
|
81 |
-
}
|
82 |
-
),
|
83 |
-
}
|
84 |
-
if self.config.name == "full":
|
85 |
-
|
86 |
-
detail_features = {
|
87 |
-
"viewed_doc_titles": datasets.features.Sequence(datasets.Value("string")),
|
88 |
-
"used_queries": datasets.features.Sequence(
|
89 |
-
{
|
90 |
-
"query": datasets.Value("string"),
|
91 |
-
"results": datasets.features.Sequence(
|
92 |
-
{
|
93 |
-
"title": datasets.Value("string"),
|
94 |
-
"snippet": datasets.Value("string"),
|
95 |
-
}
|
96 |
-
),
|
97 |
-
}
|
98 |
-
),
|
99 |
-
"nq_answer": datasets.features.Sequence(datasets.Value("string")),
|
100 |
-
"nq_doc_title": datasets.Value("string"),
|
101 |
-
}
|
102 |
-
features_dict.update(detail_features)
|
103 |
-
|
104 |
-
features = datasets.Features(features_dict)
|
105 |
-
|
106 |
-
return datasets.DatasetInfo(
|
107 |
-
description=_DESCRIPTION,
|
108 |
-
features=features,
|
109 |
-
supervised_keys=None,
|
110 |
-
homepage=_HOMEPAGE,
|
111 |
-
license=_LICENSE,
|
112 |
-
citation=_CITATION,
|
113 |
-
)
|
114 |
-
|
115 |
-
def _split_generators(self, dl_manager):
|
116 |
-
"""Returns SplitGenerators."""
|
117 |
-
# download and extract URLs
|
118 |
-
urls_to_download = _URLS
|
119 |
-
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
120 |
-
|
121 |
-
train_file_name = "train.json" if self.config.name == "full" else "train_light.json"
|
122 |
-
dev_file_name = "dev.json" if self.config.name == "full" else "dev_light.json"
|
123 |
-
|
124 |
-
return [
|
125 |
-
datasets.SplitGenerator(
|
126 |
-
name=datasets.Split.TRAIN,
|
127 |
-
gen_kwargs={"filepath": os.path.join(downloaded_files[self.config.name], train_file_name)},
|
128 |
-
),
|
129 |
-
datasets.SplitGenerator(
|
130 |
-
name=datasets.Split.VALIDATION,
|
131 |
-
gen_kwargs={"filepath": os.path.join(downloaded_files[self.config.name], dev_file_name)},
|
132 |
-
),
|
133 |
-
]
|
134 |
-
|
135 |
-
def _generate_examples(self, filepath):
|
136 |
-
"""Yields examples."""
|
137 |
-
|
138 |
-
with open(filepath, encoding="utf-8") as f:
|
139 |
-
data = json.load(f)
|
140 |
-
for example in data:
|
141 |
-
id_ = example["id"]
|
142 |
-
annotations = example["annotations"]
|
143 |
-
# Add this because we cannot have None values (all keys in the schema should be present)
|
144 |
-
for an in annotations:
|
145 |
-
if "qaPairs" not in an:
|
146 |
-
an["qaPairs"] = []
|
147 |
-
if "answer" not in an:
|
148 |
-
an["answer"] = []
|
149 |
-
|
150 |
-
yield id_, example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"light": {"description": "AmbigNQ, a dataset covering 14,042 questions from NQ-open, an existing open-domain QA benchmark. We find that over half of the questions in NQ-open are ambiguous. The types of ambiguity are diverse and sometimes subtle, many of which are only apparent after examining evidence provided by a very large text corpus. AMBIGNQ, a dataset with\n14,042 annotations on NQ-OPEN questions containing diverse types of ambiguity.\nWe provide two distributions of our new dataset AmbigNQ: a full version with all annotation metadata and a light version with only inputs and outputs.\n", "citation": "@inproceedings{ min2020ambigqa,\n title={ {A}mbig{QA}: Answering Ambiguous Open-domain Questions },\n author={ Min, Sewon and Michael, Julian and Hajishirzi, Hannaneh and Zettlemoyer, Luke },\n booktitle={ EMNLP },\n year={2020}\n}\n", "homepage": "https://nlp.cs.washington.edu/ambigqa/", "license": "CC BY-SA 3.0", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "annotations": {"feature": {"type": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "qaPairs": {"feature": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ambig_qa", "config_name": "light", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2739732, "num_examples": 10036, "dataset_name": "ambig_qa"}, "validation": {"name": "validation", "num_bytes": 805808, "num_examples": 2002, "dataset_name": "ambig_qa"}}, "download_checksums": {"https://nlp.cs.washington.edu/ambigqa/data/ambignq_light.zip": {"num_bytes": 1061383, "checksum": "3f5dada69dec05cef1533a64945cd7bafde1aa94b0cdd6fa9a22f881206220db"}, "https://nlp.cs.washington.edu/ambigqa/data/ambignq.zip": {"num_bytes": 18639517, "checksum": "e85cec5909f076c6f584322c7f05cae44dcacaec93758c110a26fcceaa8da0ce"}}, "download_size": 19700900, "post_processing_size": null, "dataset_size": 3545540, "size_in_bytes": 23246440}, "full": {"description": "AmbigNQ, a dataset covering 14,042 questions from NQ-open, an existing open-domain QA benchmark. We find that over half of the questions in NQ-open are ambiguous. The types of ambiguity are diverse and sometimes subtle, many of which are only apparent after examining evidence provided by a very large text corpus. AMBIGNQ, a dataset with\n14,042 annotations on NQ-OPEN questions containing diverse types of ambiguity.\nWe provide two distributions of our new dataset AmbigNQ: a full version with all annotation metadata and a light version with only inputs and outputs.\n", "citation": "@inproceedings{ min2020ambigqa,\n title={ {A}mbig{QA}: Answering Ambiguous Open-domain Questions },\n author={ Min, Sewon and Michael, Julian and Hajishirzi, Hannaneh and Zettlemoyer, Luke },\n booktitle={ EMNLP },\n year={2020}\n}\n", "homepage": "https://nlp.cs.washington.edu/ambigqa/", "license": "CC BY-SA 3.0", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "annotations": {"feature": {"type": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "qaPairs": {"feature": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "viewed_doc_titles": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "used_queries": {"feature": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "results": {"feature": {"title": {"dtype": "string", "id": null, "_type": "Value"}, "snippet": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "length": -1, "id": null, "_type": "Sequence"}, "nq_answer": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "nq_doc_title": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ambig_qa", "config_name": "full", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 43538733, "num_examples": 10036, "dataset_name": "ambig_qa"}, "validation": {"name": "validation", "num_bytes": 15383368, "num_examples": 2002, "dataset_name": "ambig_qa"}}, "download_checksums": {"https://nlp.cs.washington.edu/ambigqa/data/ambignq_light.zip": {"num_bytes": 1061383, "checksum": "3f5dada69dec05cef1533a64945cd7bafde1aa94b0cdd6fa9a22f881206220db"}, "https://nlp.cs.washington.edu/ambigqa/data/ambignq.zip": {"num_bytes": 18639517, "checksum": "e85cec5909f076c6f584322c7f05cae44dcacaec93758c110a26fcceaa8da0ce"}}, "download_size": 19700900, "post_processing_size": null, "dataset_size": 58922101, "size_in_bytes": 78623001}}
|
|
|
|
full/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d95567d551a8a3101b846f184320f0cbeaecf24aca7d2acf29fbb7c54e2951f0
|
3 |
+
size 23476142
|
full/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc99e779bbfc3049d0f42aaf90eccc055146dd4096d68950d87568215f2a001d
|
3 |
+
size 7198320
|
light/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7876a94a06706dd904b32f66aa0883301c6b3906991cb5fb4db7d820f96a7c95
|
3 |
+
size 1411343
|
light/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bdb0ad1c39e6df47372d38c9b82505d8d790053cd736d497fb7c387c2223121f
|
3 |
+
size 366524
|