izhx commited on
Commit
d5e1387
1 Parent(s): ce3cfc5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -0
README.md CHANGED
@@ -1,3 +1,45 @@
1
  ---
2
  license: unknown
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: unknown
3
  ---
4
+
5
+ ## Openrice Sentiment Classification dataset
6
+
7
+ From [github.com/Christainx/Dataset_Cantonese_Openrice](https://github.com/Christainx/Dataset_Cantonese_Openrice).
8
+
9
+ The dataset includes 60k instances from Cantonese reviews in Openrice.
10
+
11
+ 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.
12
+
13
+ ### Code for the splits creation
14
+
15
+ ```
16
+ import datasets
17
+
18
+ def load_openrice():
19
+ # https://github.com/Christainx/Dataset_Cantonese_Openrice/blob/master/Openrice_Cantonese.7z
20
+ with open('Openrice_Cantonese.txt') as file:
21
+ for i, line in enumerate(file):
22
+ label = int(line[0])
23
+ text = line[1:].strip()
24
+ yield {'text': text, 'label': label}
25
+
26
+
27
+ ds = datasets.Dataset.from_generator(load_openrice)
28
+ print(ds)
29
+ dsd = ds.train_test_split(0.2, seed=42)
30
+ dsd['test'].to_json('data/test.jsonl', orient='records', force_ascii=False)
31
+ dsd['train'].to_json('data/train.jsonl', orient='records', force_ascii=False)
32
+ print(dsd)
33
+ ```
34
+
35
+ ## Citation
36
+ ```
37
+ @inproceedings{xiang2019sentiment,
38
+ title={Sentiment Augmented Attention Network for Cantonese Restaurant Review Analysis},
39
+ author={Xiang, Rong and Jiao, Ying and Lu, Qin},
40
+ booktitle={Proceedings of the 8th KDD Workshop on Issues of Sentiment Discovery and Opinion Mining (WISDOM)},
41
+ pages={1--9},
42
+ year={2019},
43
+ organization={KDD WISDOM}
44
+ }
45
+ ```