File size: 1,428 Bytes
19dd1f6 d5e1387 1300d04 d5e1387 b8b9a3d d5e1387 |
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 |
---
license: unknown
---
## Openrice Review Classification dataset
From [github.com/Christainx/Dataset_Cantonese_Openrice](https://github.com/Christainx/Dataset_Cantonese_Openrice).
The dataset includes 60k instances from Cantonese reviews in Openrice.
The rating ranks from 1-star (very negative) to 5-star (very positive). The instances are shuffled in order to disperse reviews of same restaurant.
### Code for the splits creation
```
import datasets
def load_openrice():
# https://github.com/Christainx/Dataset_Cantonese_Openrice/blob/master/Openrice_Cantonese.7z
with open('Openrice_Cantonese.txt') as file:
for i, line in enumerate(file):
label = int(line[0])
text = line[1:].strip()
yield {'text': text, 'label': label}
ds = datasets.Dataset.from_generator(load_openrice)
print(ds)
dsd = ds.train_test_split(0.1, seed=42)
dsd['test'].to_json('data/test.jsonl', orient='records', force_ascii=False)
dsd['train'].to_json('data/train.jsonl', orient='records', force_ascii=False)
print(dsd)
```
## Citation
```
@inproceedings{xiang2019sentiment,
title={Sentiment Augmented Attention Network for Cantonese Restaurant Review Analysis},
author={Xiang, Rong and Jiao, Ying and Lu, Qin},
booktitle={Proceedings of the 8th KDD Workshop on Issues of Sentiment Discovery and Opinion Mining (WISDOM)},
pages={1--9},
year={2019},
organization={KDD WISDOM}
}
``` |