Datasets:

Sub-tasks:
extractive-qa
Languages:
Japanese
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
crowdsourced
found
Annotations Creators:
crowdsourced
Source Datasets:
original
ArXiv:
Tags:
License:
BHSo commited on
Commit
60e5462
1 Parent(s): 38885ff

Upload dataset

Browse files
JaQuAD.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+
4
+ import datasets
5
+
6
+
7
+ _CITATION = """\
8
+ @article{SkelterLabsInc:JaQuAD,
9
+ title={{JaQuAD}: Japanese Question Answering Dataset for Machine Comprehension},
10
+ author={Skelters Labs, Inc.},
11
+ year={2022},
12
+ }
13
+ """
14
+ _DESCRIPTION = """\
15
+ JaQuAD: Japanese Question Answering Dataset
16
+ We introduce a human-annotated Japanese Question Answering Dataset.
17
+ JaQuAD contains 39,696 question-answer pairs.
18
+ Finetuning BERT-Japanese on JaQuAD achieves 78.92% for an F1 score and 63.38% for an exact match.
19
+ Developed to provide a SQuAD-like QA dataset in Japanese.
20
+ Questions are original and contexts are based on Japanese Wikipedia articles.
21
+ """
22
+ _LICENSE = "CC BY-SA 3.0"
23
+ _HOMEPAGE=""
24
+ _URL = "https://huggingface.co/datasets/SkelterLabsInc/JaQuAD/raw/main/data/"
25
+
26
+
27
+ class JaQuAD(datasets.GeneratorBasedBuilder):
28
+
29
+ VERSION = datasets.Version("0.1.0")
30
+
31
+ def _info(self):
32
+
33
+ features = datasets.Features({
34
+ "id": datasets.Value("string"),
35
+ "title": datasets.Value("string"),
36
+ "context": datasets.Value("string"),
37
+ "question": datasets.Value("string"),
38
+ "question_type": datasets.Value("string"),
39
+ "answers": datasets.features.Sequence({
40
+ "text": datasets.Value("string"),
41
+ "answer_start": datasets.Value("int32"),
42
+ "answer_type": datasets.Value("string"),
43
+ }),
44
+ })
45
+ return datasets.DatasetInfo(
46
+ description=_DESCRIPTION,
47
+ features=features,
48
+ homepage=_HOMEPAGE,
49
+ license=_LICENSE,
50
+ citation=_CITATION,
51
+ )
52
+
53
+ def _split_generators(self, dl_manager):
54
+ urls_to_download = {
55
+ "train": [os.path.join(_URL, f"train/jaquad_train_{i:04d}.json") for i in range(30)],
56
+ "dev": [os.path.join(_URL, f"dev/jaquad_dev_{i:04d}.json") for i in range(4)],
57
+ }
58
+ downloaded_files = dl_manager.download_and_extract(urls_to_download)
59
+ return [
60
+ datasets.SplitGenerator(
61
+ name=datasets.Split.TRAIN,
62
+ gen_kwargs={"filepaths": downloaded_files["train"]},
63
+ ),
64
+ datasets.SplitGenerator(
65
+ name=datasets.Split.VALIDATION,
66
+ gen_kwargs={"filepaths": downloaded_files["dev"]},
67
+ ),
68
+ ]
69
+
70
+ def _generate_examples(self, filepaths):
71
+ for filename in filepaths:
72
+ with open(filename, encoding='utf-8') as f:
73
+ jaquad = json.load(f)
74
+ for article in jaquad['data']:
75
+ title = article.get('title', '').strip()
76
+ for paragraph in article['paragraphs']:
77
+ context = paragraph['context'].strip()
78
+ for qa in paragraph['qas']:
79
+ qa_id = qa["id"]
80
+ question = qa["question"].strip()
81
+ question_type = qa["question_type"]
82
+
83
+ answer_starts = [answer["answer_start"] for answer in qa["answers"]]
84
+ answer_texts = [answer["text"].strip() for answer in qa["answers"]]
85
+ answer_types = [answer["answer_type"] for answer in qa["answers"]]
86
+
87
+ assert len(answer_starts) == len(answer_texts) == len(answer_types) == 1
88
+
89
+ yield qa_id, {
90
+ "title": title,
91
+ "context": context,
92
+ "question": question,
93
+ "question_type": question_type,
94
+ "id": qa_id,
95
+ "answers": {
96
+ "text": answer_texts,
97
+ "answer_start": answer_starts,
98
+ "answer_type": answer_types,
99
+ },
100
+ }
README.md ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ - found
7
+ languages:
8
+ - ja
9
+ licenses:
10
+ - cc-by-sa-3.0
11
+ multilinguality:
12
+ - monolingual
13
+ paperswithcode_id: null
14
+ pretty_name: "JaQuAD: Japanese Question Answering Dataset"
15
+ size_categories:
16
+ - 10K<n<100K
17
+ source_datasets:
18
+ - original
19
+ task_categories:
20
+ - question-answering
21
+ task_ids:
22
+ - extractive-qa
23
+ ---
24
+
25
+ # Dataset Card for JaQuAD
26
+
27
+ ## Table of Contents
28
+
29
+ - [Table of Contents](#table-of-contents)
30
+ - [Dataset Description](#dataset-description)
31
+ - [Dataset Summary](#dataset-summary)
32
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
33
+ - [Languages](#languages)
34
+ - [Dataset Structure](#dataset-structure)
35
+ - [Data Instances](#data-instances)
36
+ - [Data Fields](#data-fields)
37
+ - [Data Splits](#data-splits)
38
+ - [Dataset Creation](#dataset-creation)
39
+ - [Curation Rationale](#curation-rationale)
40
+ - [Source Data](#source-data)
41
+ - [Annotations](#annotations)
42
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
43
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
44
+ - [Social Impact of Dataset](#social-impact-of-dataset)
45
+ - [Discussion of Biases](#discussion-of-biases)
46
+ - [Other Known Limitations](#other-known-limitations)
47
+ - [Additional Information](#additional-information)
48
+ - [Dataset Curators](#dataset-curators)
49
+ - [Licensing Information](#licensing-information)
50
+ - [Citation Information](#citation-information)
51
+ - [Contributions](#contributions)
52
+
53
+ ## Dataset Description
54
+
55
+ - **Repository:** https://github.com/SkelterLabsInc/JaQuAD
56
+ - **Paper:** [JaQuAD: Japanese Question Answering Dataset for Machine Reading Comprehension]()
57
+ - **Point of Contact:** [jaquad@skelterlabs.com](jaquad@skelterlabs.com)
58
+ - **Size of dataset files:** 24.6 MB
59
+ - **Size of the generated dataset:** 48.6 MB
60
+ - **Total amount of disk used:** 73.2 MB
61
+
62
+ ### Dataset Summary
63
+
64
+ JaQuAD: Japanese Question Answering Dataset
65
+ We introduce a human-annotated Japanese Question Answering Dataset.
66
+ JaQuAD contains 39,696 question-answer pairs.
67
+ Fine-tuning [BERT-Japanese](https://huggingface.co/cl-tohoku/bert-base-japanese) on JaQuAD achieves 78.92% for an F1 score and 63.38% for an exact match.
68
+ Developed to provide a SQuAD-like QA dataset in Japanese. Questions are original and contexts are based on Japanese Wikipedia articles.
69
+
70
+ ### Supported Tasks
71
+
72
+ - `extractive-qa`: This dataset is intended to be used for `extractive-qa`.
73
+
74
+ ### Languages
75
+
76
+ Japanese (`ja`)
77
+
78
+ ## Dataset Structure
79
+
80
+ ### Data Instances
81
+
82
+ - **Size of dataset files:** 24.6 MB
83
+ - **Size of the generated dataset:** 48.6 MB
84
+ - **Total amount of disk used:** 73.2 MB
85
+
86
+ An example of 'validation':
87
+ ```python
88
+ {
89
+ "id": "de-001-00-000",
90
+ "title": "イタセンパラ",
91
+ "context": "イタセンパラ(板鮮腹、Acheilognathuslongipinnis)は、コイ科のタナゴ亜科タナゴ属に分類される淡水>魚の一種。\n別名はビワタナゴ(琵琶鱮、琵琶鰱)。",
92
+ "question": "ビワタナゴの正式名称は何?",
93
+ "question_type": "Multiple sentence reasoning",
94
+ "answers": {
95
+ "text": "イタセンパラ",
96
+ "answers_start": 0,
97
+ "answer_type": "Object",
98
+ },
99
+ },
100
+ ```
101
+
102
+ ### Data Fields
103
+
104
+ - `id`: a `string` feature.
105
+ - `title`: a `string` feature.
106
+ - `context`: a `string` feature.
107
+ - `question`: a `string` feature.
108
+ - `question_type`: a `string` feature.
109
+ - `answers`: a dictionary feature containing:
110
+ - `text`: a `string` feature.
111
+ - `answers_start`: a `int32` feature.
112
+ - `answer_type`: a `string` feature.
113
+
114
+ ### Data Splits
115
+
116
+ The JaQuAD dataset has 3 splits: `train`, `validation`, and `test`. The splits contain disjoint sets of articles. However, the `test` split is not publicly released yet. The following table shows the statistics of each split.
117
+
118
+ Dataset Split | Number of Articles | Number of Contexts | Number of Questions
119
+ --------------|--------------------|--------------------|--------------------
120
+ Train | 691 | 9713 | 31748
121
+ Validation | 101 | 1431 | 3939
122
+ Test | 109 | 1479 | 4009
123
+
124
+
125
+ ## Dataset Creation
126
+
127
+ ### Curation Rationale
128
+
129
+ The JaQuAD dataset was created by [Skelter Labs](https://skelterlabs.com/) to provide a SQuAD-like QA dataset in Japanese. Questions are original and based on Japanese Wikipedia articles.
130
+
131
+ ### Source Data
132
+
133
+ The articles used for the contexts are from [Japanese Wikipedia](https://ja.wikipedia.org/). 88.7% of articles are from the curated list of Japanese high-quality Wikipedia articles, e.g., [featured articles](https://ja.wikipedia.org/wiki/Wikipedia:%E8%89%AF%E8%B3%AA%E3%81%AA%E8%A8%98%E4%BA%8B) and [good articles](https://ja.wikipedia.org/wiki/Wikipedia:%E7%A7%80%E9%80%B8%E3%81%AA%E8%A8%98%E4%BA%8B).
134
+
135
+ ### Annotations
136
+
137
+ Wikipedia articles were scrapped and divided into one more multiple paragraphs as contexts.
138
+ Annotations (questions and answer spans) are written by fluent Japanese speakers, including natives and non-natives.
139
+ Annotators were given a context and asked to generate non-trivial questions about information in the context.
140
+
141
+ ### Personal and Sensitive Information
142
+
143
+ No personal or sensitive information is included in this dataset. Dataset annotators has been manually verified it.
144
+
145
+ ## Considerations for Using the Data
146
+
147
+ Users should consider that the articles are sampled from Wikipedia articles but not representative of all Wikipedia articles.
148
+
149
+ ### Social Impact of Dataset
150
+
151
+ The social biases of this dataset have not yet been investigated.
152
+
153
+ ### Discussion of Biases
154
+
155
+ The social biases of this dataset have not yet been investigated. Articles and questions have been selected for quality and diversity.
156
+
157
+ ### Other Known Limitations
158
+
159
+ The JaQuAD dataset has limitations as follows:
160
+ - Most of them are short answers.
161
+ - Assume that a question is answerable using the corresponding context.
162
+
163
+ ## Additional Information
164
+
165
+ ### Dataset Curators
166
+
167
+ Skelter Labs: [https://skelterlabs.com/](https://skelterlabs.com/)
168
+
169
+ ### Licensing Information
170
+
171
+ The JaQuAD dataset is licensed under the [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) license.
172
+
173
+ ### Citation Information
174
+
175
+ TBA
176
+ ```bibtex
177
+ @article{SkelterLabsInc:2022JaQuAD,
178
+ author = {Byunghoon, So and Kyuhong, Byun and Kyungwon, Kang and Seongjin, Cho},
179
+ title = {{JaQuAD}: Japanese Question Answering Dataset for Machine Reading Comprehension},
180
+ year = 2022,
181
+ eid = {arXiv:###},
182
+ pages = {arXiv:###},
183
+ archivePrefix = {arXiv},
184
+ eprint = {###},
185
+ }
186
+ ```
187
+
188
+ ### Contributions
189
+
190
+ Thanks to [@ByunghoonSo](https://github.com/w4-ByunghoonSo), [@khbyun](https://github.com/w4-khbyun), [@kangnak](https://github.com/kangnak), and [@sjcho](https://github.com/w4-sjcho) for adding this dataset.
191
+
data/dev/jaquad_dev_0000.json ADDED
The diff for this file is too large to render. See raw diff
data/dev/jaquad_dev_0001.json ADDED
The diff for this file is too large to render. See raw diff
data/dev/jaquad_dev_0002.json ADDED
The diff for this file is too large to render. See raw diff
data/dev/jaquad_dev_0003.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0000.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0001.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0002.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0003.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0004.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0005.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0006.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0007.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0008.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0009.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0010.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0011.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0012.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0013.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0014.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0015.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0016.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0017.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0018.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0019.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0020.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0021.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0022.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0023.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0024.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0025.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0026.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0027.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0028.json ADDED
The diff for this file is too large to render. See raw diff
data/train/jaquad_train_0029.json ADDED
The diff for this file is too large to render. See raw diff