File size: 6,193 Bytes
ec96e5c eb30b76 ec96e5c c4aeea8 eb30b76 ec96e5c eb30b76 ec96e5c 6425ffb ec96e5c c237a54 ec96e5c eb30b76 ec96e5c 4493d95 ec96e5c |
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 103 104 105 106 107 108 109 110 111 112 113 114 |
---
language:
- fr
license:
- cc-by-nc-4.0
size_categories:
- 1M<n<10M
task_categories:
- text-classification
tags:
- textual-entailment
- DFP
- french prompts
annotations_creators:
- found
language_creators:
- found
multilinguality:
- monolingual
source_datasets:
- xnli
---
# xnli_fr_prompt_textual_entailment
## Summary
**xnli_fr_prompt_textual_entailment** is a subset of the [**Dataset of French Prompts (DFP)**](https://huggingface.co/datasets/CATIE-AQ/DFP).
It contains **8,804,444** rows that can be used for a textual entailment task.
The original data (without prompts) comes from the dataset [xnli](https://huggingface.co/datasets/xnli) by Conneau et al. where only the French part has been kept.
A list of prompts (see below) was then applied in order to build the input and target columns and thus obtain the same format as the [xP3](https://huggingface.co/datasets/bigscience/xP3) dataset by Muennighoff et al.
## Prompts used
### List
22 prompts were created for this dataset. The logic applied consists in proposing prompts in the indicative tense, in the form of tutoiement and in the form of vouvoiement.
```
"""Prendre l'énoncé suivant comme vrai : " """+premise+""" "\n Alors l'énoncé suivant : " """+hypothesis+""" " est "vrai", "faux", ou "incertain" ?""",
"""Prends l'énoncé suivant comme vrai : " """+premise+""" "\n Alors l'énoncé suivant : " """+hypothesis+""" " est "vrai", "faux", ou "incertain" ?""",
"""Prenez l'énoncé suivant comme vrai : " """+premise+""" "\n Alors l'énoncé suivant : " """+hypothesis+""" " est "vrai", "faux", ou "incertain" ?""",
'"'+premise+'"\nQuestion : Cela implique-t-il que "'+hypothesis+'" ? "vrai", "faux", ou "incertain" ?',
'"'+premise+'"\nQuestion : "'+hypothesis+'" est "vrai", "faux", ou "peut-être" ?',
""" " """+premise+""" "\n D'après le passage précédent, est-il vrai que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
""" " """+premise+""" "\nSur la base de ces informations, l'énoncé est-il : " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
""" " """+premise+""" "\nEn gardant à l'esprit le texte ci-dessus, considérez : " """+hypothesis+""" "\n Est-ce que c'est "vrai", "faux", ou "incertain" ?""",
""" " """+premise+""" "\nEn gardant à l'esprit le texte ci-dessus, considére : " """+hypothesis+""" "\n Est-ce que c'est "vrai", "faux", ou "peut-être" ?""",
""" " """+premise+""" "\nEn utilisant uniquement la description ci-dessus et ce que vous savez du monde, " """+hypothesis+""" " est-ce "vrai", "faux", ou "incertain" ?""",
""" " """+premise+""" "\nEn utilisant uniquement la description ci-dessus et ce que tu sais du monde, " """+hypothesis+""" " est-ce "vrai", "faux", ou "incertain" ?""",
"""Étant donné que " """+premise+""" ", s'ensuit-il que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
"""Étant donné que " """+premise+""" ", est-il garanti que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
'Étant donné '+premise+', doit-on supposer que '+hypothesis+' est "vrai", "faux", ou "incertain" ?',
'Étant donné '+premise+', dois-je supposer que '+hypothesis+' est "vrai", "faux", ou "incertain" ?',
'Sachant que '+premise+', doit-on supposer que '+hypothesis+' est "vrai", "faux", ou "incertain" ?',
'Sachant que '+premise+', dois-je supposer que '+hypothesis+' est "vrai", "faux", ou "incertain" ?',
'Étant donné que '+premise+', il doit donc être vrai que '+hypothesis+' ? "vrai", "faux", ou "incertain" ?',
"""Supposons que " """+premise+""" ", pouvons-nous déduire que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
"""Supposons que " """+premise+""" ", puis-je déduire que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
"""Supposons qu'il est vrai que " """+premise+""" ". Alors, est-ce que " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?""",
"""Supposons qu'il soit vrai que " """+premise+""" ",\n Donc, " """+hypothesis+""" " ? "vrai", "faux", ou "incertain" ?"""
```
### Features used in the prompts
In the prompt list above, `premise`, `hypothesis` and `targets` have been constructed from:
```
xnli= load_dataset("xnli")
xnli['train']['premise'] = list(map(lambda i: i.replace(' . ','. ').replace(' .','. ').replace('( ','(').replace(' )',')').replace(' , ',', ').replace(', ',', ').replace("' ","'"), map(str,xnli['train']['premise'])))
xnli['train']['hypothesis'] = list(map(lambda x: x.replace(' . ','. ').replace(' .','. ').replace('( ','(').replace(' )',')').replace(' , ',', ').replace(', ',', ').replace("' ","'"), map(str,xnli['train']['hypothesis'])))
targets = str(xnli['train']['label'][i]).replace("0","vrai").replace("1","incertain").replace("2","faux")
```
# Splits
- `train` with 8,639,444 samples
- `valid` with 54,780 samples
- `test` with 110,220 samples
# How to use?
```
from datasets import load_dataset
dataset = load_dataset("CATIE-AQ/xnli_fr_prompt_textual_entailment")
```
# Citation
## Original data
> @InProceedings{conneau2018xnli,
author = {Conneau, Alexis
and Rinott, Ruty
and Lample, Guillaume
and Williams, Adina
and Bowman, Samuel R.
and Schwenk, Holger
and Stoyanov, Veselin},
title = {XNLI: Evaluating Cross-lingual Sentence Representations},
booktitle = {Proceedings of the 2018 Conference on Empirical Methods
in Natural Language Processing},
year = {2018},
publisher = {Association for Computational Linguistics},
location = {Brussels, Belgium},
}
## This Dataset
> @misc {centre_aquitain_des_technologies_de_l'information_et_electroniques_2023,
author = { {Centre Aquitain des Technologies de l'Information et Electroniques} },
title = { DFP (Revision 1d24c09) },
year = 2023,
url = { https://huggingface.co/datasets/CATIE-AQ/DFP },
doi = { 10.57967/hf/1200 },
publisher = { Hugging Face }
}
# License
[Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/) |