iapp_wiki_qa_squad / README.md
chonlasit
Add dataset files and validation script; remove loading script
c4e4341
|
Raw
History Blame Contribute Delete
8.46 kB
---
annotations_creators:
- expert-generated
language_creators:
- found
language:
- th
license:
- mit
multilinguality:
- monolingual
size_categories:
- 1K<n<10K
source_datasets:
- extended|other-iapp-wiki-qa-dataset
task_categories:
- question-answering
task_ids:
- extractive-qa
- open-domain-qa
paperswithcode_id: null
pretty_name: IappWikiQaSquad
configs:
- config_name: iapp_wiki_qa_squad
data_files:
- split: train
path: data/train-00000-of-00001.parquet
- split: validation
path: data/validation-00000-of-00001.parquet
- split: test
path: data/test-00000-of-00001.parquet
dataset_info:
features:
- name: question_id
dtype: string
- name: article_id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: answers
sequence:
- name: text
dtype: string
- name: answer_start
dtype: int32
- name: answer_end
dtype: int32
config_name: iapp_wiki_qa_squad
splits:
- name: train
num_bytes: 16107505
num_examples: 5761
- name: validation
num_bytes: 2120732
num_examples: 742
- name: test
num_bytes: 2031980
num_examples: 739
download_size: 3550875
dataset_size: 20260217
---
# `iapp_wiki_qa_squad`
Extractive question answering over Thai Wikipedia articles, in SQuAD format.
7,242 questions across 1,912 articles, annotated by people iApp hired for the purpose.
```python
from datasets import load_dataset
dataset = load_dataset("iapp/iapp_wiki_qa_squad")
```
**This works again as of the August 2026 revision.** Until then it did not. The
repository carried a loading script and no data, and `datasets` dropped script support
at v3, so `load_dataset` failed and every datasets-server endpoint returned HTTP 500.
The data now lives in the repository as parquet, and the script is gone. Nothing about
the data changed — see "What changed, and what did not" below.
## Source and licence
| | |
|---|---|
| Underlying text | Thai Wikipedia, CC BY-SA |
| Questions and answer spans | iApp Technology, annotated 2019 |
| Canonical source | [`iapp-technology/iapp-wiki-qa-dataset`](https://github.com/iapp-technology/iapp-wiki-qa-dataset), `squad_format/data.zip` — MIT |
| SQuAD-format processing | [@cstorm125](https://github.com/cstorm125/) |
| This dataset | MIT, see `LICENSE` |
| DOI | [10.5281/zenodo.4539916](https://doi.org/10.5281/zenodo.4539916) |
The MIT grant covers iApp's contribution — the questions, the answer spans and the
assembly. It does not reach the `context` column, which is Wikipedia article text under
CC BY-SA and stays under CC BY-SA in any redistribution. `LICENSE` sets this out.
## Translation provenance
**Not a translation.** Every field is original Thai: the contexts are Thai Wikipedia
articles, and the questions and answers were written in Thai by human annotators. There
is no source language and no machine translation anywhere in this dataset.
This section exists because every `iapp/*` dataset card is required to answer the
question. Answering it with "not applicable, and here is why" is the answer.
## Fields
| field | |
|---|---|
| `question_id` | e.g. `0U2lA8nJQESIxbZrjZQc_000` |
| `article_id` | groups questions belonging to the same article |
| `title` | article title |
| `context` | article text, the passage the answer is extracted from |
| `question` | Thai |
| `answers` | `{text: [...], answer_start: [...], answer_end: [...]}`, one answer per question |
`answer_end` is an exclusive upper bound. Every question has exactly one answer; the
list shape follows the SQuAD convention rather than indicating multiple answers.
All 7,242 answer spans are exact: `context[answer_start:answer_end] == text` holds for
every row in every split, with no exceptions. `validate.py` checks it.
### An example
```python
{'question_id': '0U2lA8nJQESIxbZrjZQc_000',
'article_id': '0U2lA8nJQESIxbZrjZQc',
'title': 'สุวัฒน์ วรรณศิริกุล',
'context': 'นายสุวัฒน์ วรรณศิริกุล (1 พฤศจิกายน พ.ศ. 2476 - 31 กรกฎาคม พ.ศ. 2555) อดีตรอง'
'หัวหน้าพรรคพลังประชาชน อดีตประธานสมาชิกสภาผู้แทนราษฎร และประธานภาคกรุงเทพมหานคร '
'พรรคพลังประชาชน อดีตสมาชิกสภาผู้แทนราษฎรกรุงเทพมหานครหลายสมัย ...',
'question': 'สุวัฒน์ วรรณศิริกุล เกิดวันที่เท่าไร',
'answers': {'text': ['1 พฤศจิกายน พ.ศ. 2476'],
'answer_start': [24],
'answer_end': [45]}}
```
This is what `load_dataset` returns. Earlier revisions of this card printed an example
carrying three further keys — `created_by`, `created_on` and `is_pay` — which the loaded
dataset has never contained. See "Personal and sensitive information".
## Splits
| | train | validation | test |
|---|---|---|---|
| questions | 5,761 | 742 | 739 |
| articles | 1,529 | 191 | 192 |
The split is 80/10/10 **at article level**, so no article's questions are spread across
two splits. The `validation` split is named `validation`; the file it came from was
called `valid.jsonl`, and some older code assumes that name.
## How this was built
From the original `iapp-wiki-qa-dataset`, [@cstorm125](https://github.com/cstorm125/)
applied the following:
- select questions with one non-empty answer
- select questions whose answers match the `textDetection` fields
- select questions whose answers are 100 characters or shorter
- 80/10/10 train/validation/test split at article level
Annotators hired by [iApp](https://iapp.co.th/) were asked to write questions and mark
the answering span for each article. Contexts are Wikipedia authors' work.
## Personal and sensitive information
The contexts are public encyclopaedia text about, in many cases, public figures. Nothing
was collected about the readers of this dataset.
**The annotators are a different matter, and this needs stating plainly.** The records
in the canonical source carry three fields that the published dataset has never
exposed: `created_by`, a per-annotator account identifier resolving to 57 distinct
people; `created_on`; and `is_pay`, which holds the payment status and amount for each
annotated item. The loading script projected them away, and the parquet in this
repository reproduces that projection exactly — `validate.py` fails if it ever stops
doing so.
Earlier revisions of this card printed those three fields in its worked example,
including a real account identifier and a real payment record. That has been removed.
The claim in the same section that no personal information was involved was true of the
six published fields and false of the example printed above it.
## Verifying this card
`validate.py` checks the claims above against the canonical source, live:
```
pip install pyarrow
python validate.py
```
It fetches `squad_format/data.zip` from GitHub, applies the six-field projection itself,
and compares the result against the parquet in this repository row by row. It also
asserts that `created_by`, `created_on` and `is_pay` are absent from every file here,
that every answer span is its context slice, and that no article is spread across two
splits. Non-zero exit on any failure. At the current revision all 23 checks pass.
## What changed, and what did not
The August 2026 revision changed the packaging and not the data. Every row, every field
and every value is what the loading script produced, verified row by row against a run
of that script on `datasets` 2.x. A score computed on this dataset before the change is
comparable with one computed after it. `CHANGELOG.md` has the detail.
## Citation
```bibtex
@dataset{kobkrit_viriyayudhakorn_2021_4539916,
author = {Kobkrit Viriyayudhakorn and Charin Polpanumas},
title = {iapp_wiki_qa_squad},
month = feb,
year = 2021,
publisher = {Zenodo},
version = 1,
doi = {10.5281/zenodo.4539916},
url = {https://doi.org/10.5281/zenodo.4539916}
}
```
Please also attribute Thai Wikipedia for the article text, as CC BY-SA requires.