Datasets:

Modalities:
Text
Formats:
parquet
Languages:
Khmer
License:
KQuAD / README.md
ChilyRan's picture
Update README
f940052 verified
|
Raw History Blame Contribute Delete
11.1 kB
---
dataset_info:
- config_name: com_seg
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: is_impossible
dtype: bool
- name: answers
struct:
- name: answer_start
list: int64
- name: text
list: string
splits:
- name: train
num_bytes: 41987498
num_examples: 14621
- name: validation
num_bytes: 11235991
num_examples: 3752
- name: test
num_bytes: 11331408
num_examples: 3700
download_size: 4326498
dataset_size: 64554897
- config_name: default
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: is_impossible
dtype: bool
- name: answers
struct:
- name: answer_start
list: int64
- name: text
list: string
splits:
- name: train
num_bytes: 39590171
num_examples: 14621
- name: validation
num_bytes: 10620124
num_examples: 3752
- name: test
num_bytes: 10661926
num_examples: 3700
download_size: 4154485
dataset_size: 60872221
- config_name: kcc_seg
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: is_impossible
dtype: bool
- name: answers
struct:
- name: answer_start
list: int64
- name: text
list: string
splits:
- name: train
num_bytes: 45565397
num_examples: 14621
- name: validation
num_bytes: 12172534
num_examples: 3752
- name: test
num_bytes: 12261852
num_examples: 3700
download_size: 4541790
dataset_size: 69999783
- config_name: mor_seg
features:
- name: id
dtype: string
- name: title
dtype: string
- name: context
dtype: string
- name: question
dtype: string
- name: is_impossible
dtype: bool
- name: answers
struct:
- name: answer_start
list: int64
- name: text
list: string
splits:
- name: train
num_bytes: 42494916
num_examples: 14621
- name: validation
num_bytes: 11362793
num_examples: 3752
- name: test
num_bytes: 11454776
num_examples: 3700
download_size: 4297888
dataset_size: 65312485
configs:
- config_name: com_seg
data_files:
- split: train
path: com_seg/train-*
- split: validation
path: com_seg/validation-*
- split: test
path: com_seg/test-*
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
- config_name: kcc_seg
data_files:
- split: train
path: kcc_seg/train-*
- split: validation
path: kcc_seg/validation-*
- split: test
path: kcc_seg/test-*
- config_name: mor_seg
data_files:
- split: train
path: mor_seg/train-*
- split: validation
path: mor_seg/validation-*
- split: test
path: mor_seg/test-*
language:
- km
task_categories:
- question-answering
pretty_name: KQuAD
license: cc-by-4.0
---
# KQuAD
KQuAD is a **Khmer Question Answering dataset** designed for evaluating and developing machine reading comprehension systems for the Khmer language.
The dataset follows the **extractive question answering** formulation: given a question and a corresponding context passage, a model must either identify the answer span within the context or determine that the question cannot be answered from the provided context.
KQuAD includes both **answerable and unanswerable questions**, following a SQuAD v2-style evaluation setting.
<!-- ## Dataset Description -->
<!-- - **Language:** Khmer (`km`, `khm`) -->
<!-- - **Task:** Extractive Question Answering -->
<!-- - **Question types:** Answerable and unanswerable -->
<!-- - **Format:** SQuAD 2.0-style -->
<!-- - **Splits:** Train, Validation, Test -->
<!-- - **Paper:** *KQuAD: A Khmer Question Answering Dataset for Reading Comprehension* -->
<!-- - **License:** Creative Commons Attribution 4.0 International (CC BY 4.0) -->
### Dataset Summary
KQuAD was developed to provide a benchmark for Khmer machine reading comprehension and question answering.
Each example consists of a context passage and a question associated with that context. For answerable questions, the dataset provides the text span containing the correct answer together with its character-level starting position. For unanswerable questions, no answer span is provided.
The dataset can therefore be used to evaluate two related capabilities:
1. **Answer extraction** — locating the correct answer span from a given Khmer context.
2. **Answerability detection** — determining whether sufficient information exists in the context to answer the question.
<!-- [TODO: Add 1–2 paragraphs from the paper explaining the motivation for constructing KQuAD and the gap it addresses for Khmer NLP.] -->
## Dataset Structure
### Data Instances
Each instance follows a structure similar to:
```python
## For an answerable example:
{
"id": "example-id",
"context": "Khmer context passage...",
"question": "Khmer question...",
"answers": {
"text": ["answer text"],
"answer_start": [123]
},
"is_impossible": False
}
## For an unanswerable example:
{
"id": "example-id",
"context": "Khmer context passage...",
"question": "Khmer question...",
"answers": {
"text": [],
"answer_start": []
},
"is_impossible": True
}
```
### Data Fields
| Field | Description |
|---|---|
| `id` | Unique identifier for each question-answer instance |
| `context` | Khmer passage containing information relevant to the question |
| `question` | Question associated with the context |
| `answers` | Answer annotation containing `text` and `answer_start` |
| `answers.text` | Extractive answer span; empty for unanswerable questions |
| `answers.answer_start` | Character offset of the answer in the context |
| `is_impossible` | Indicates whether the question is unanswerable from the given context |
## Dataset Configurations
KQuAD is released in four configurations. All configurations contain the same underlying articles, contexts, questions, answer annotations, and dataset splits. They differ only in the text segmentation format applied to the Khmer text.
| Configuration | Description |
|---|---|
| `default` | Original Khmer text without additional text segmentation. |
| `com_seg` | Khmer text segmented using the compound word segmentation format. |
| `mor_seg` | Khmer text segmented using the morpheme word segmentation format. |
| `kcc_seg` | Khmer text segmented using the Khmer Character Cluster (KCC) segmentation format. |
These configurations allow researchers to use or compare different Khmer text segmentation schemes while keeping the underlying dataset content and train-validation-test splits unchanged.
## Dataset Splits
The dataset contains three predefined splits:
| Split | Articles | Paragraphs | Questions | Answerable | Unanswerable |
|---|---:|---:|---:|---:|---:|
| Train | 96 | 954 | 14,621 | 8,798 (60.17%) | 5,823 |
| Validation | 28 | 260 | 3,752 | 2,326 (61.99%) | 1,426 |
| Test | 34 | 269 | 3,700 | 2,300 (62.16%) | 1,400 |
| **Total** | **158** | **1,483** | **22,073** | **13,424 (60.82%)** | **8,649** |
## Loading the Dataset
The dataset can be loaded using the Hugging Face `datasets` library:
```python
from datasets import load_dataset
# load default configuration
dataset = load_dataset("CADT-IDRI/KQuAD")
# load specific configuration
dataset = load_dataset(
"CADT-IDRI/KQuAD",
name="com_seg"
)
```
## Evaluation
KQuAD follows the standard **SQuAD v2-style extractive question answering evaluation**.
The primary evaluation metrics are:
- **Exact Match (EM):** measures the percentage of predictions that exactly match a reference answer after normalization.
- **F1 Score:** measures token-level overlap between the predicted answer and the reference answer.
- **HasAns EM / F1:** evaluates performance only on answerable questions.
- **NoAns EM / F1:** evaluates whether the model correctly predicts that no answer is available for unanswerable questions.
<!-- For answerable questions, the model is evaluated on its ability to identify the correct answer span from the context. For unanswerable questions, the correct prediction is an empty answer. :chatgpt-content-reference{index="0"} :chatgpt-content-reference{index="1"}
For models that produce an explicit no-answer confidence score, the no-answer threshold should be selected using the **validation set** and then kept fixed when evaluating the **test set**. -->
### Baseline Results
As an initial benchmark, four pretrained multilingual encoder models were fine-tuned and evaluated on KQuAD under the same extractive question answering setting: **LaBSE**, **XLM-RoBERTa-base**, **mmBERT-base**, and **BGE-M3**.
| Model | EM | F1 | HasAns EM | HasAns F1 | NoAns EM | NoAns F1 |
|---|---:|---:|---:|---:|---:|---:|
| [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) | **67.46** | **76.65** | **54.13** | **68.92** | 89.36 | 89.36 |
| [XLM-RoBERTa-base](https://huggingface.co/FacebookAI/xlm-roberta-base) | 64.97 | 74.20 | 51.04 | 65.88 | 87.86 | 87.86 |
| [mmBERT-base](https://huggingface.co/jhu-clsp/mmBERT-base) | 49.95 | 54.70 | 24.13 | 31.78 | **92.36** | **92.36** |
| [BGE-M3](https://huggingface.co/BAAI/bge-m3) | 67.30 | 76.38 | 53.74 | 68.35 | 89.57 | 89.57 |
Among the evaluated models, **LaBSE achieved the best overall F1 score of 76.65**, while **BGE-M3 performed very closely with 76.38 F1**. LaBSE also achieved the strongest performance on answerable questions, with 54.13 HasAns EM and 68.92 HasAns F1.
The baseline results also show a clear difference between answerable and unanswerable questions. All evaluated models perform considerably better on **NoAns** examples than on **HasAns** examples, indicating that detecting the absence of an answer is generally easier than locating and extracting the correct answer span from Khmer context passages.
## Intended Uses
KQuAD is intended primarily for research on:
- Khmer extractive question answering
- Khmer machine reading comprehension
- low-resource natural language processing
- cross-lingual transfer learning
- evaluation of pretrained multilingual language models
- answerability and unanswerable-question detection
The dataset may also be useful for comparing the Khmer capabilities of multilingual pretrained language models.
## Licensing
KQuAD is released under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license.
The dataset includes content derived from publicly available Khmer-language sources. Original source materials may remain subject to their respective copyright, licensing, and attribution requirements.
## Citation
If you use KQuAD in your research, please cite:
```bibtex
@article{TODO,
title = {[TODO: Paper title]},
author = {[TODO: Authors]},
journal = {[TODO]},
year = {[TODO]}
}
```