Datasets:

Modalities:
Text
Formats:
parquet
Languages:
Arabic
ArXiv:
Libraries:
Datasets
Dask
License:
File size: 2,907 Bytes
195c263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
079bc20
 
 
 
 
 
 
 
195c263
079bc20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
dataset_info:
  features:
  - name: query
    dtype: string
  - name: positive
    dtype: string
  - name: negative
    dtype: string
  splits:
  - name: train
    num_bytes: 719317257
    num_examples: 362146
  download_size: 184143892
  dataset_size: 719317257
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
license: apache-2.0
task_categories:
- sentence-similarity
- feature-extraction
language:
- ar
size_categories:
- 100K<n<1M
---

# Arabic Mr. TyDi in Triplet Format

## Dataset Summary

This dataset is a transformed version of the Arabic subset of the [Mr. TyDi dataset](https://huggingface.co/datasets/castorini/mr-tydi), designed specifically for training retrieval and re-ranking models. Each query is paired with a positive passage and one of the multiple negative passages in a triplet format: `(query, positive, negative)`. This restructuring resulted in a total of 362,000 rows, making it ideal for pairwise ranking tasks and contrastive learning approaches.

The dataset maintains the original purpose of Mr. TyDi for monolingual retrieval, while offering a simplified and scalable format for learning-to-rank tasks.

## Dataset Structure

The dataset includes a train split, presented in the triplet format with the following fields:

- `query`: The query string.
- `positive`: The relevant passage for the query.
- `negative`: A non-relevant passage for the query.

### Example Data

#### Triplet Format

```json
{
  "query": "متى تم تطوير نظرية الحقل الكمي؟", 
  "positive": {
    "text": "بدأت نظرية الحقل الكمي بشكل طبيعي بدراسة التفاعلات الكهرومغناطيسية ..."
  },
  "negative": {
    "text": "تم تنفيذ النهج مؤخرًا ليشمل نسخة جبرية من الحقل الكمي ..."
  }
}
```

### Language Coverage
The dataset focuses exclusively on the **Arabic** subset of Mr. TyDi.

### Loading the Dataset

You can load the dataset using the **datasets** library from Hugging Face:

```python 
from datasets import load_dataset

dataset = load_dataset('NAMAA-Space/Ara-TyDi-Triplet')
dataset 
```


### Dataset Usage

The new format facilitates training retrieval and re-ranking models by providing explicit negative passage fields. This structure simplifies the handling of negative examples during model training and evaluation.

### Citation Information

If you use this dataset in your research, please cite the original Mr. TyDi paper and this dataset as follows:

```
@article{mrtydi,
      title={{Mr. TyDi}: A Multi-lingual Benchmark for Dense Retrieval}, 
      author={Xinyu Zhang and Xueguang Ma and Peng Shi and Jimmy Lin},
      year={2021},
      journal={arXiv:2108.08787},
}

@dataset{Namaa,
      title={Ara TyDi Triplet},
      author={Omer Nacar},
      year={2024},
      note={Hugging Face Dataset Repository}
}
```