File size: 5,508 Bytes
1da4841
 
02008c5
1da4841
 
 
030c897
1da4841
 
 
 
9ec2a35
 
 
 
 
 
 
 
 
 
1da4841
 
 
 
 
9ec2a35
 
 
1da4841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5e381aa
1da4841
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5dda05
9ec2a35
 
a5dda05
1da4841
 
 
 
 
 
 
 
 
d7cd538
 
c5cc3e0
 
 
 
 
 
d7cd538
1da4841
 
d7cd538
 
 
 
 
 
 
 
 
 
 
1da4841
 
 
 
 
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
115
116
117
118
119
120
121
---
language:
- fra
license: 
- cc
size_categories:
- 100K<n<1M
task_categories:
- text-classification
tags:
- binary-sentiment-analysis
- DFP
- french prompts
annotations_creators:
- found
language_creators:
- found
multilinguality:
- monolingual
source_datasets:
- french_book_reviews
---

# french_book_reviews_fr_prompt_sentiment_analysis
## Summary

**french_book_reviews_fr_prompt_sentiment_analysis** is a subset of the [**Dataset of French Prompts (DFP)**](https://huggingface.co/datasets/CATIE-AQ/DFP).  
It contains **270,424** rows that can be used for a binary sentiment analysis task.  
The original data (without prompts) comes from the dataset [french_book_reviews](https://huggingface.co/datasets/Abirate/french_book_reviews) by Eltaief.  
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
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.

```
'Commentaire : "'+review+'" Le commentaire est-il positif ou négatif ?',  
"""Avis : " """+review+""" " L'avis est-il positif ou négatif ?""",  
'Critique : "'+review+'" La critique est-elle positive ou négative ?',  
"""Evaluation : " """+review+""" " L'évaluation est-elle positive ou négative ?""",  
'Ce commentaire sur le produit est-il positif ou négatif ? \nCommentaire : "'+review+'"\nRéponse :',  
'Cet avis sur le produit est-il positif ou négatif ? \nAvis : "'+review+'"\nRéponse :',  
'Cette critique sur le produit est-elle positive ou négative ? \nCritique : "'+review+'"\nRéponse :',  
'Cette évaluation sur le produit est-elle positive ou négative ? \nEvaluation : "'+review+'"\nRéponse :',  
'Commentaire : "'+review+'"\n Ce commentaire sur le produit exprime-t-il un sentiment négatif ou positif ?',  
'Avis : "'+review+'"\n Cet avis sur le produit exprime-t-il un sentiment négatif ou positif ?',  
'Critique : "'+review+'"\n Cette critique sur le produit exprime-t-il un sentiment négatif ou positif ?',  
'Evaluation : "'+review+'"\n Cette évaluation sur le produit exprime-t-il un sentiment négatif ou positif ?',  
'Ce commentaire sur le produit a-t-il un ton négatif ou positif ? \n Commentaire : "'+review+'"\n Réponse :',   
'Cet avis sur le produit a-t-il un ton négatif ou positif ? \n Avis : "'+review+'"\n Réponse :',   
'Cette critique sur le produit a-t-il un ton négatif ou positif ? \n Evaluation : "'+review+'"\n Réponse :',   
'Cette évaluation sur le produit a-t-il un ton négatif ou positif ? \n Avis : "'+review+'"\n Réponse :',   
"""Voici un commentaire laissé par un client sur un produit. Diriez-vous qu'il est négatif ou positif ? \nCommentaire : """+review,  
"""Voici un avis laissé par un client sur un produit. Diriez-vous qu'il est négatif ou positif ? \nAvis : """+review,  
"""Voici une critique laissée par un client sur un produit. Diriez-vous qu'elle est négative ou positive ? \nCritique : """+review,  
"""Voici une évaluation laissée par un client sur un produit. Diriez-vous qu'elle est négative ou positive ? \nEvaluation : """+review,  
'Commentaire du produit : "'+review+'" Ce commentaire dépeint le produit sous un angle négatif ou positif ?',  
'Avis du produit : "'+review+'" Cet avis dépeint le produit sous un angle négatif ou positif ?',  
'Critique du produit : "'+review+'" Cette critique dépeint le produit sous un angle négatif ou positif ?',  
'Evaluation du produit : "'+review+'" Cette évaluation dépeint le produit sous un angle négatif ou positif ?',  
'Le commentaire suivant exprime quel sentiment ?\n Commentaire' +review,  
"""L'avis suivant exprime quel sentiment ?\n Avis""" +review,  
'La critique suivante exprime quel sentiment ?\n Critique' +review,  
"""L'évaluation suivante exprime quel sentiment ?\n Evaluation""" +review
```

### Features used in the prompts
In the prompt list above, `review` and `targets` have been constructed from:
```
fbr = load_dataset('Abirate/french_book_reviews')
review = fbr['train']['reader_review'][i]
if fbr['train']['rating'][i] < 2.5:
   targets.append("neg")
else :
   targets.append("pos")
```



# Splits
- `train` with 270,424 samples
- no `valid` split
- no `test` split
  

# How to use?
```
from datasets import load_dataset
dataset = load_dataset("CATIE-AQ/french_book_reviews_fr_prompt_sentiment_analysis")
```

# Citation
## Original data
```
@misc {abir_eltaief_2023,  
	author       = { {Abir ELTAIEF} },  
	title        = { french_book_reviews (Revision 534725e) },  
	year         = 2023,  
	url          = { https://huggingface.co/datasets/Abirate/french_book_reviews },  
	doi          = { 10.57967/hf/1052 },  
	publisher    = { Hugging Face }}
```

## This Dataset
```
@misc {centre_aquitain_des_technologies_de_l'information_et_electroniques_2023,   
    author       = { {BOURDOIS, Loïck} },  
    organization  = { {Centre Aquitain des Technologies de l'Information et Electroniques} },  
    title        = { Dataset of French Prompts (DFP) (Revision 1d24c09) },  
    year         = 2023,  
    url          = { https://huggingface.co/datasets/CATIE-AQ/DFP },  
    doi          = { 10.57967/hf/1200 },  
    publisher    = { Hugging Face } }
```




## License
[CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/)