license:mit region:us
---
license: mit
dataset_info:
- config_name: original
  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
  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
  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: 842528
    num_examples: 787
  - name: test
    num_bytes: 178001
    num_examples: 169
  - name: validation
    num_bytes: 181071
    num_examples: 169
  download_size: 1890439
  dataset_size: 1201600
---

# 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 TROPICO 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...