File size: 9,903 Bytes
8ee3731
 
fc00322
c627568
 
 
187360a
c627568
187360a
c627568
187360a
c627568
 
 
187360a
c627568
187360a
c627568
187360a
c627568
 
 
187360a
c627568
187360a
c627568
187360a
aad2ee3
187360a
c627568
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187360a
c627568
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187360a
c627568
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ee3731
6152500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afe40fd
6152500
 
 
 
 
 
 
 
 
 
 
41d5d9b
6152500
 
 
 
 
 
 
 
 
 
 
 
 
 
41d5d9b
6152500
 
41d5d9b
6152500
 
 
 
 
 
 
 
 
 
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
---
license: mit
configs:
- config_name: original_dataset
  data_files:
  - split: train
    path: "original_dataset/train.jsonl"
  - split: test
    path: "original_dataset/test.jsonl"
  - split: validation
    path: "original_dataset/val.jsonl"
- config_name: overlapping_subset
  data_files:
  - split: train
    path: "overlapping_subset/train.jsonl"
  - split: test
    path: "overlapping_subset/test.jsonl"
  - split: validation
    path: "overlapping_subset/val.jsonl"
- config_name: no_overlapping_subset
  data_files:
  - split: train
    path: "no_overlapping_subset/train.jsonl"
  - split: test
    path: "no_overlapping_subset/test.jsonl"
  - split: validation
    path: "no_overlapping_subset/val.jsonl"
dataset_info:
- config_name: original_dataset
  features:
  - name: id_comment
    dtype: string
  - name: words
    sequence: string
  - name: triplets
    list:
    - name: aspect_term
      sequence: string
    - name: opinion_term
      sequence: string
    - name: aspect_position
      sequence: int32
    - name: opinion_position
      sequence: int32
    - name: polarity
      dtype:
        class_label:
          names:
            '0': POS
            '1': NEG
            '2': NEU
  - name: general_polarity
    dtype:
      class_label:
        names:
          '0': POS
          '1': NEG
          '2': NEU
  splits:
  - name: train
    num_bytes: 1115671
    num_examples: 1114
  - name: test
    num_bytes: 239799
    num_examples: 239
  - name: validation
    num_bytes: 237621
    num_examples: 239
  download_size: 2471854
  dataset_size: 1593091
- config_name: no_overlapping_subset
  features:
  - name: id_comment
    dtype: string
  - name: words
    sequence: string
  - name: triplets
    list:
    - name: aspect_term
      sequence: string
    - name: opinion_term
      sequence: string
    - name: aspect_position
      sequence: int32
    - name: opinion_position
      sequence: int32
    - name: polarity
      dtype:
        class_label:
          names:
            '0': POS
            '1': NEG
            '2': NEU
  - name: general_polarity
    dtype:
      class_label:
        names:
          '0': POS
          '1': NEG
          '2': NEU
  splits:
  - name: train
    num_bytes: 270313
    num_examples: 326
  - name: test
    num_bytes: 61779
    num_examples: 70
  - name: validation
    num_bytes: 59399
    num_examples: 71
  download_size: 581415
  dataset_size: 391491
- config_name: overlapping_subset
  features:
  - name: id_comment
    dtype: string
  - name: words
    sequence: string
  - name: triplets
    list:
    - name: aspect_term
      sequence: string
    - name: opinion_term
      sequence: string
    - name: aspect_position
      sequence: int32
    - name: opinion_position
      sequence: int32
    - name: polarity
      dtype:
        class_label:
          names:
            '0': POS
            '1': NEG
            '2': NEU
  - name: general_polarity
    dtype:
      class_label:
        names:
          '0': POS
          '1': NEG
          '2': NEU
  download_size: 1890439
  dataset_size: 1201600
task_categories:
- text-classification
language:
- fr
---

# Dataset Card for TROPICAL

## Table of Contents
- [Dataset Description](#dataset-description)
  - [Dataset Summary](#dataset-summary)
  - [Languages](#languages)
- [Dataset Structure](#dataset-structure)
  - [Data Instances](#data-instances)
  - [Data Fields](#data-fields)
  - [Data Configurations](#data-configurations)
- [Use this Dataset](#use-this-dataset)
- [Dataset Creation](#dataset-creation)
  - [Source Data](#source-data)
- [Additional Information](#additional-information)
  - [Dataset Curators](#dataset-curators)
  - [Licensing Information](#licensing-information)
  - [Citation Information](#citation-information)
  - [Contributions](#contributions)

## Dataset Description

- **Homepage:** 
- **Repository:** [TROPICAL dataset repository](https://github.com/GePaSud/TROPICAL)
- **Paper:**
- **Point of Contact:** 

### Dataset Summary

The TROPICAL dataset is a French-language dataset for sentiment analysis. The dataset contains comments left by French-speaking tourists' on TripAdvisor after their visit to French Polynesia, each review either concern a hotel or a guesthouse. The format is JSON.
The comments spanning from January 2001 to April 2023, the dataset contain 1592 comments along with 10729 ASTE triplets (aspect, opinion, sentiment). 
The unsplitted dataset is available in our Github repository.

### Languages

The text in the dataset is in French as it was written by French speakers.

## Dataset Structure

### Data Instances
Normaly the polarity of the triplets are either "POS", "NEG" or "NEU", due to using [ClassLabel](https://huggingface.co/docs/datasets/v2.13.0/en/package_reference/main_classes#datasets.ClassLabel) the polarity is represented by 0, 1 or 2.

| String label | Int label |
| ------------ | --------- |
| POS          | 0         | 
| NEG          | 1         | 
| NEU          | 2         | 

An example from the TROPICAL original dataset looks like the following:
```json
{
  "id_comment": "16752", 
  "words": ["Nous", "avons", "passé", "4", "nuits", "dans", "cet", "établissement", "Ce", "fut", "un", "très", "bon", "moment", "Le", "personnel", "très", "aimable", "et", "serviable", "Nous", "avons", "visité", "les", "plantations", "d'ananas", "en", "4/4", "et", "ce", "fut", "un", "agréable", "moment", "nous", "avons", "fait", "le", "tour", "de", "l'île", "et", "c't", "une", "splendeur", "Nous", "sommes", "revenus", "enchantés"], 
  "triplets": [
      {"aspect_term": ["Aspect inexistant"], "opinion_term": ["revenus", "enchantés"], "aspect_position": [-1], "opinion_position": [47, 48], "polarity": "POS"}, 
      {"aspect_term": ["tour", "de", "l'île"], "opinion_term": ["une", "splendeur"], "aspect_position": [38, 39, 40], "opinion_position": [43, 44], "polarity": "POS"}, 
      {"aspect_term": ["moment"], "opinion_term": ["agréable"], "aspect_position": [33], "opinion_position": [32], "polarity": "POS"}, 
      {"aspect_term": ["personnel"], "opinion_term": ["serviable"], "aspect_position": [15], "opinion_position": [19], "polarity": "POS"}, 
      {"aspect_term": ["personnel"], "opinion_term": ["très", "aimable"], "aspect_position": [15], "opinion_position": [16, 17], "polarity": "POS"}, 
      {"aspect_term": ["moment"], "opinion_term": ["très", "bon"], "aspect_position": [13], "opinion_position": [11, 12], "polarity": "POS"}
  ], 
  "general_polarity": "POS"
}
```
### Data Fields

- 'id_comment': a string containing the review id 
- 'words': an array of strings composing the comment
- 'triplets': a list of dictionnaries containing the following informations
    - 'aspect_term': an array of strings composing the aspect term (can be a single word or a multi-word expression)
    - 'opinion_term': an array of strings composing the opinion term (can be a single word or a multi-word expression)
    - 'aspect_position': an array of integers indicating the position of the aspect term in the words array (can be a single integer list or a list of integers)
    - 'opinion_position': an array of integers indicating the position of the opinion term in the review (can be a single integer list or a list of integers)
    - 'polartiy': an integer, either _0_, _1_, or _2_, indicating a _positive_, _negative_, or _neutral_ sentiment, respectively
- 'general_polarity': an integer, either _0_, _1_, or _2_, indicating a _positive_, _negative_, or _neutral_ sentiment, respectively

### Data configurations

The TROPICAL dataset has 3 configurations: _original_, _no overlapping_, and _overlapping_.The first one contains the 1592 comments. The overlapping dataset contains the comments that have at least one overlapping triplet. The no overlapping dataset contains the comments that have no overlapping triplet. 

| Dataset Configuration | Number of comments | Number of triplets | Positive triplets | Negative triplets | Neutral triplets |
| --------------------- | ------------------ | ------------------ | ----------------- | ----------------- | -----------------|
| original              | 1,592              | 10,729             | 9,889             | 734               | 106              |
| no_overlapping        | 467                | 2,235              | 2,032             | 184               | 19               |
| overlapping           | 1,125              | 8,494              | 7,857             | 550               | 87               |

The following table show the splits of the dataset for all configurations:

| Dataset Configuration | Train | Test | Val |
| --------------------- | ----- | ---- | --- |
| original              | 1,114 | 239  | 239 |
| no_overlapping        | 326   | 70   | 71  |
| overlapping           | 787   | 169  | 169 |

The split values for train, test, validation are 70%, 15%, 15% respectively. The seed used is 42.

## Use this dataset

```python
from datasets import load_dataset
dataset = load_dataset("TROPICAL", "original") # or "no_overlapping" or "overlapping" 
```

## Dataset Creation
### Source Data
All the comments were collected from the TripAdvisor website. The comments range from January 2001 to April 2023. The dataset contains 1592 comments along with 10729 ASTE triplets (aspect, opinion, sentiment).

### Who are the source language producers?
The dataset contains tourists' comments about French Polynesia stored on the [TripAdvisor](https://www.tripadvisor.com/) website. 
### Known limitations
The dataset contains only comments about French Polynesia. Moreover, the dataset is not balanced, the number of positive triplets is much higher than the number of negative and neutral triplets.
## Additional Information
### Licensing Information

The TROPICAL dataset is licensed under the [MIT License](https://opensource.org/licenses/MIT).

### Citation Information

> To be added...