File size: 4,385 Bytes
7c9eba5
 
fa5770f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3e64999
 
 
 
 
 
 
7c9eba5
87b2a85
3e64999
 
b700614
3e64999
 
 
 
 
 
 
 
 
 
 
 
87b2a85
3e64999
 
 
 
 
87b2a85
b700614
3e64999
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87b2a85
3e64999
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87b2a85
3e64999
 
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
---
license: apache-2.0
dataset_info:
  features:
  - name: hotel_id
    dtype: int64
  - name: user_id
    dtype: string
  - name: title
    dtype: string
  - name: text
    dtype: string
  - name: overall
    dtype: float64
  - name: cleanliness
    dtype: float64
  - name: value
    dtype: float64
  - name: location
    dtype: float64
  - name: rooms
    dtype: float64
  - name: sleep_quality
    dtype: float64
  - name: stay_year
    dtype: int64
  - name: post_date
    dtype: timestamp[ns]
  - name: freq
    dtype: int64
  - name: review
    dtype: string
  - name: char
    dtype: int64
  - name: lang
    dtype: string
  splits:
  - name: train
    num_bytes: 368237342
    num_examples: 201295
  download_size: 220909380
  dataset_size: 368237342
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
task_categories:
- text-classification
language:
- en
pretty_name: sentiment
size_categories:
- 10K<n<100K
---
# TripAdvisor Easy Dataset

This repository contains a dataset of hotel reviews and ratings collected from TripAdvisor, which has been processed by us. The dataset includes reviews of various hotels along with metadata such as multiple-aspect ratings and review texts. 
Please refer to our GitHub repo[https://github.com/jniimi/tripadvisor_dataset](https://github.com/jniimi/tripadvisor_dataset).

The data is originally distributed by Jiwei Li et al. (2013) and is hosted on his website [http://www.cs.cmu.edu/~jiweil/html/hotel-review.html](http://www.cs.cmu.edu/~jiweil/html/hotel-review.html).

## Dataset Details

### Dataset Description

The contents of the two datasets (.csv and .pkl) are same; however, we recommend using pickle file (.pkl) which retains information on pandas variable types and np.nan for missing values, especially datetime. In the original data, the various variables were stored in JSON format, but we have reorganised them so that the reviews and ratings are combined in one line as a pandas data set.

Since the original dataset has various language, we used machine learning to extract posts where reviews are written in English. Specifically, we adopted \`fastText\` ([https://fasttext.cc](https://fasttext.cc)) by Meta, utilizing the pre-trained model [\`lid.176.bin\`](https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin).

- **Language(s) (NLP):** English
- **License:** Apache-2.0

### Dataset Sources [optional]

<!-- Provide the basic links for the dataset. -->

- **Repository:** [https://nlp.stanford.edu/~bdlijiwei/Code.html](https://nlp.stanford.edu/~bdlijiwei/Code.html)
- **Paper:** Li et al. (2023) (Details are shown in `Citation` section)

## Uses

You can load data using datasets package as:
```python
from datasets import load_dataset
df = load_dataset("jniimi/tripadvisor")
```

### Direct Use

This data is suitable for Aspect-based Sentiment Analysis (AbSA), as the same way that TripAdvisor data has already been used in many previous studies.

### Out-of-Scope Use

Please follow the policy of the [original data source](https://nlp.stanford.edu/~bdlijiwei/Code.html).

## Dataset Structure

The dataset includes the following columns in each line:
- `hotel_id`: Unique identifier for hotels.
- `user_id`: Unique identifier for users.
- `title`: Heading of the user review.
- `text`: Actual text of the review.
- `review`: reviews combined as follows: `title` \n `text`
- `overall`: The rating given by the user.
- `cleanliness`: The rating regarding the cleanliness.
- `value`: The rating regarding the value.
- `location`:  The rating regarding the location.
- `rooms`:  The rating regarding the rooms.
- `sleep_quality`:  The rating regarding the sleep quality.
- `date_stayed`: The date when the user stayed.
- `date`: The date when the review was posted.

## Dataset Creation

## Citation

**BibTeX:**

@misc{tripadvisor_dataset,
author = {Junichiro, Niimi},
title = {Hotel Review Dataset (English)},
year = {2024},
howpublished = {\url{https://github.com/jniimi/tripadvisor_dataset}}
}

**APA:**

Original paper:
- Li, J., Ott, M., & Cardie, C. (2013, October). Identifying manipulated offerings on review portals. In Proceedings of the 2013 conference on empirical methods in natural language processing (pp. 1933-1942). [https://aclanthology.org/D13-1199/](https://aclanthology.org/D13-1199/)

## Dataset Card Authors

jniimi (@JvckAndersen)