yue-openrice-review / README.md
izhx's picture
Update README.md
1300d04 verified
---
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}
}
```