Loïck commited on
Commit ·
1da4841
1
Parent(s): 5abfd64
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- fr
|
| 4 |
+
license:
|
| 5 |
+
- cc
|
| 6 |
+
size_categories:
|
| 7 |
+
- 10K<n<100K
|
| 8 |
+
task_categories:
|
| 9 |
+
- text-classification
|
| 10 |
+
tags:
|
| 11 |
+
- binary-sentiment-analysis
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# french_book_reviews_fr_prompt_sentiment_analysis
|
| 15 |
+
## Summary
|
| 16 |
+
|
| 17 |
+
**french_book_reviews_fr_prompt_sentiment_analysis** is a subset of the [**Dataset of French Prompts (DFP)**]().
|
| 18 |
+
It contains **X** rows that can be used for a binary sentiment analysis task.
|
| 19 |
+
The original data (without prompts) comes from the dataset [french_book_reviews](https://huggingface.co/datasets/Abirate/french_book_reviews) by Eltaief.
|
| 20 |
+
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.
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
## Prompts used
|
| 24 |
+
### List
|
| 25 |
+
28 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.
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
'Commentaire : "'+review+'" Le commentaire est-il positif ou négatif ?',
|
| 29 |
+
"""Avis : " """+review+""" " L'avis est-il positif ou négatif ?""",
|
| 30 |
+
'Critique : "'+review+'" La critique est-elle positive ou négative ?',
|
| 31 |
+
"""Evaluation : " """+review+""" " L'évaluation est-elle positive ou négative ?""",
|
| 32 |
+
'Ce commentaire sur le produit est-il positif ou négatif ? \nCommentaire : "'+review+'"\nRéponse :',
|
| 33 |
+
'Cet avis sur le produit est-il positif ou négatif ? \nAvis : "'+review+'"\nRéponse :',
|
| 34 |
+
'Cette critique sur le produit est-elle positive ou négative ? \nCritique : "'+review+'"\nRéponse :',
|
| 35 |
+
'Cette évaluation sur le produit est-elle positive ou négative ? \nEvaluation : "'+review+'"\nRéponse :',
|
| 36 |
+
'Commentaire : "'+review+'"\n Ce commentaire sur le produit exprime-t-il un sentiment négatif ou positif ?',
|
| 37 |
+
'Avis : "'+review+'"\n Cet avis sur le produit exprime-t-il un sentiment négatif ou positif ?',
|
| 38 |
+
'Critique : "'+review+'"\n Cette critique sur le produit exprime-t-il un sentiment négatif ou positif ?',
|
| 39 |
+
'Evaluation : "'+review+'"\n Cette évaluation sur le produit exprime-t-il un sentiment négatif ou positif ?',
|
| 40 |
+
'Ce commentaire sur le produit a-t-il un ton négatif ou positif ? \n Commentaire : "'+review+'"\n Réponse :',
|
| 41 |
+
'Cet avis sur le produit a-t-il un ton négatif ou positif ? \n Avis : "'+review+'"\n Réponse :',
|
| 42 |
+
'Cette critique sur le produit a-t-il un ton négatif ou positif ? \n Evaluation : "'+review+'"\n Réponse :',
|
| 43 |
+
'Cet évaluation sur le produit a-t-il un ton négatif ou positif ? \n Avis : "'+review+'"\n Réponse :',
|
| 44 |
+
"""Voici un commentaire laissé par un client sur un produit. Diriez-vous qu'il est négatif ou positif ? \nCommentaire : """+review,
|
| 45 |
+
"""Voici un avis laissé par un client sur un produit. Diriez-vous qu'il est négatif ou positif ? \nAvis : """+review,
|
| 46 |
+
"""Voici une critique laissée par un client sur un produit. Diriez-vous qu'elle est négative ou positive ? \nCritique : """+review,
|
| 47 |
+
"""Voici une évaluation laissée par un client sur un produit. Diriez-vous qu'elle est négative ou positive ? \nEvaluation : """+review,
|
| 48 |
+
'Commentaire du produit : "'+review+'" Ce commentaire dépeint le produit sous un angle négatif ou positif ?',
|
| 49 |
+
'Avis du produit : "'+review+'" Cet avis dépeint le produit sous un angle négatif ou positif ?',
|
| 50 |
+
'Critique du produit : "'+review+'" Cette critique dépeint le produit sous un angle négatif ou positif ?',
|
| 51 |
+
'Evaluation du produit : "'+review+'" Cette évaluation dépeint le produit sous un angle négatif ou positif ?',
|
| 52 |
+
'Le commentaire suivant exprime quel sentiment ?\n Commentaire' +review,
|
| 53 |
+
"""L'avis suivant exprime quel sentiment ?\n Avis""" +review,
|
| 54 |
+
'La critique suivante exprime quel sentiment ?\n Critique' +review,
|
| 55 |
+
"""L'évaluation suivante exprime quel sentiment ?\n Evaluation""" +review
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
### Features used in the prompts
|
| 59 |
+
In the prompt list above, `review` and `targets` have been constructed from:
|
| 60 |
+
```
|
| 61 |
+
fbr = load_dataset('Abirate/french_book_reviews')
|
| 62 |
+
review = fbr['train']['reader_review'][i]
|
| 63 |
+
if fbr['train']['rating'][i] < 2.5:
|
| 64 |
+
targets.append("neg")
|
| 65 |
+
else :
|
| 66 |
+
targets.append("pos")
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
# Splits
|
| 72 |
+
- train with X samples
|
| 73 |
+
- dev with Y samples
|
| 74 |
+
- test with Z samples
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
# How to use?
|
| 78 |
+
```
|
| 79 |
+
from datasets import load_dataset
|
| 80 |
+
dataset = load_dataset("CATIE-AQ/french_book_reviews_fr_prompt_sentiment_analysis")
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
# Citation
|
| 84 |
+
## Original data
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
## This Dataset
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
## License
|
| 93 |
+
[CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/)
|