Update README.md
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ This dataset repo contains only the queries and relevance judgements. The corpus
|
|
| 24 |
|
| 25 |
|
| 26 |
# Dataset Structure
|
| 27 |
-
To download the files: The queries can be found under `ciral-{lang}/topics` and are in `.tsv` formats with each line in the form:
|
| 28 |
|
| 29 |
```
|
| 30 |
qid\tquery
|
|
@@ -34,7 +34,25 @@ To download the files: The queries can be found under `ciral-{lang}/topics` and
|
|
| 34 |
```
|
| 35 |
qid Q0 docid relevance
|
| 36 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
|
|
|
| 38 |
## Citation
|
| 39 |
|
| 40 |
...
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
# Dataset Structure
|
| 27 |
+
1. To download the files: The queries can be found under `ciral-{lang}/topics` and are in `.tsv` formats with each line in the form:
|
| 28 |
|
| 29 |
```
|
| 30 |
qid\tquery
|
|
|
|
| 34 |
```
|
| 35 |
qid Q0 docid relevance
|
| 36 |
```
|
| 37 |
+
2. To access the dataset via `datasets`:
|
| 38 |
+
|
| 39 |
+
```
|
| 40 |
+
ciral_dataset = load_datasets("ciral/ciral", lang="hausa") #or swahili, somali, yoruba
|
| 41 |
+
|
| 42 |
+
for data in ciral_dataset['train']: # or 'test'
|
| 43 |
+
query_id = data['query_id']
|
| 44 |
+
query = data['query']
|
| 45 |
+
qrels = data['judgements']
|
| 46 |
+
|
| 47 |
+
for qrel in qrels:
|
| 48 |
+
docid = qrel['docid']
|
| 49 |
+
judgement = qrel['judgement']
|
| 50 |
+
text = qrel['text']
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
|
| 54 |
|
| 55 |
+
|
| 56 |
## Citation
|
| 57 |
|
| 58 |
...
|