hyp1231 commited on
Commit
07417c0
1 Parent(s): c67224f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -91
README.md CHANGED
@@ -88,117 +88,66 @@ In the Amazon Reviews'23, we provide:
88
  | Unknown | 23.1M | 13.2M | 63.8M | 3.3B | 232.8M | <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/review_categories/Unknown.jsonl.gz' download> review</a>, <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/meta_categories/meta_Unknown.jsonl.gz' download> meta </a> |
89
 
90
 
91
- > Check Pure ID files and corresponding data splitting strategies in <b>[Common Data Processing](data_processing/index)</b> section.
92
 
93
  ## Quick Start
94
 
95
  ### Load User Reviews
96
 
97
 
98
- ```
99
- import json
100
 
101
- file = # e.g., "All_Beauty.jsonl", downloaded from the `review` link above
102
- with open(file, 'r') as fp:
103
- for line in fp:
104
- print(json.loads(line.strip()))
105
  ```
106
 
107
  ```text
108
- ......
109
- {
110
- "sortTimestamp": 1634275259292,
111
- "rating": 3.0,
112
- "helpfulVotes": 0,
113
- "title": "Meh",
114
- "text": "These were lightweight and soft but much too small for my liking. I would have preferred two of these together to make one loc. For that reason I will not be repurchasing.",
115
- "images": [
116
- {
117
- "smallImageUrl": "https://m.media-amazon.com/images/I/81FN4c0VHzL._SL256_.jpg",
118
- "mediumImageUrl": "https://m.media-amazon.com/images/I/81FN4c0VHzL._SL800_.jpg",
119
- "largeImageUrl": "https://m.media-amazon.com/images/I/81FN4c0VHzL._SL1600_.jpg",
120
- "attachmentType": "IMAGE"
121
- }
122
- ],
123
- "asin": "B088SZDGXG",
124
- "verifiedPurchase": true,
125
- "parent_asin": "B08BBQ29N5",
126
- "user_id": "AEYORY2AVPMCPDV57CE337YU5LXA"
127
- }
128
- ......
129
  ```
130
 
131
  ### Load Item Metadata
132
 
133
  ```
134
- import json
135
-
136
- file = # e.g., "meta_All_Beauty.jsonl", downloaded from the `meta` link above
137
- with open(file, 'r') as fp:
138
- for line in fp:
139
- print(json.loads(line.strip()))
140
  ```
141
 
142
  ```text
143
- ......
144
- {
145
- "main_category": "All Beauty",
146
- "title": "Lurrose 100Pcs Full Cover Fake Toenails Artificial Transparent Nail Tips Nail Art for DIY",
147
- "average_rating": 3.7,
148
- "rating_number": 35,
149
- "features": [
150
- "The false toenails are durable with perfect length. You have the option to wear them long or clip them short, easy to trim and file them to in any length and shape you like.",
151
- "ABS is kind of green enviromental material, and makes the nails durable, breathable, light even no pressure on your own nails.",
152
- "Fit well to your natural toenails. Non toxic, no smell, no harm to your health.",
153
- "Wonderful as gift for girlfriend, family and friends.",
154
- "The easiest and most efficient way to do your toenail tips for manicures or nail art designs. It's fashion, creative, a useful accessory brighten up your look, also as a gift."
155
- ],
156
- "description": [
157
- "Description",
158
- "The false toenails are durable with perfect length. You have the option to wear them long or clip them short, easy to trim and file them to in any length and shape you like. Plus, ABS is kind of green enviromental material, and makes the nails durable, breathable, light even no pressure on your own toenails. Fit well to your natural toenails. Non toxic, no smell, no harm to your health.",
159
- "Feature",
160
- "- Color: As Shown.- Material: ABS.- Size: 14.3 x 7.2 x 1cm.",
161
- "Package Including",
162
- "100 x Pieces fake toenails"
163
- ],
164
- "price": 6.99,
165
- "images": [
166
- {
167
- "hiRes": "https://m.media-amazon.com/images/I/41a1Sj7Q20L._SL1005_.jpg",
168
- "thumb": "https://m.media-amazon.com/images/I/31dlCd7tHSL._SS40_.jpg",
169
- "large": "https://m.media-amazon.com/images/I/31dlCd7tHSL.jpg",
170
- "variant": "MAIN"
171
- },
172
- {
173
- "hiRes": "https://m.media-amazon.com/images/I/510BWq7O95L._SL1005_.jpg",
174
- "thumb": "https://m.media-amazon.com/images/I/31sLajrdHOL._SS40_.jpg",
175
- "large": "https://m.media-amazon.com/images/I/31sLajrdHOL.jpg",
176
- "variant": "PT01"
177
- },
178
- ......
179
- ],
180
- "videos": [],
181
- "boughtTogether": null,
182
- "store": "Lurrose",
183
- "categories": [],
184
- "details": {
185
- "Color": "As Shown",
186
- "Size": "Large",
187
- "Material": "Acrylonitrile Butadiene Styrene (ABS)",
188
- "Brand": "Lurrose",
189
- "Style": "French",
190
- "Product Dimensions": "5.63 x 2.83 x 0.39 inches; 1.9 Ounces",
191
- "UPC": "799768026253",
192
- "Manufacturer": "Lurrose"
193
- },
194
- "parent_asin": "B07G9GWFSM"
195
- }
196
- ......
197
  ```
198
 
199
- ```{seealso}
200
- Check data loading examples and Huggingface datasets APIs in <b>[Common Data Loading](data_loading/index)</b> section.
201
- ```
202
 
203
 
204
  ## Data Fields
 
88
  | Unknown | 23.1M | 13.2M | 63.8M | 3.3B | 232.8M | <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/review_categories/Unknown.jsonl.gz' download> review</a>, <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/meta_categories/meta_Unknown.jsonl.gz' download> meta </a> |
89
 
90
 
91
+ > Check Pure ID files and corresponding data splitting strategies in <b>[Common Data Processing](https://amazon-reviews-2023.github.io/data_processing/index.html)</b> section.
92
 
93
  ## Quick Start
94
 
95
  ### Load User Reviews
96
 
97
 
98
+ ```python
99
+ from datasets import load_dataset
100
 
101
+ dataset = load_dataset("McAuley-Lab/Amazon-Reviews-2023", "raw_review_All_Beauty", trust_remote_code=True)
102
+ print(dataset["full"][0])
 
 
103
  ```
104
 
105
  ```text
106
+ {'rating': 5.0,
107
+ 'title': 'Such a lovely scent but not overpowering.',
108
+ 'text': "This spray is really nice. It smells really good, goes on really fine, and does the trick. I will say it feels like you need a lot of it though to get the texture I want. I have a lot of hair, medium thickness. I am comparing to other brands with yucky chemicals so I'm gonna stick with this. Try it!",
109
+ 'images': [],
110
+ 'asin': 'B00YQ6X8EO',
111
+ 'parent_asin': 'B00YQ6X8EO',
112
+ 'user_id': 'AGKHLEW2SOWHNMFQIJGBECAF7INQ',
113
+ 'timestamp': 1588687728923,
114
+ 'helpful_vote': 0,
115
+ 'verified_purchase': True}
 
 
 
 
 
 
 
 
 
 
 
116
  ```
117
 
118
  ### Load Item Metadata
119
 
120
  ```
121
+ dataset = load_dataset("McAuley-Lab/Amazon-Reviews-2023", "raw_meta_All_Beauty", split="full", trust_remote_code=True)
122
+ print(dataset[0])
 
 
 
 
123
  ```
124
 
125
  ```text
126
+ {'main_category': 'All Beauty',
127
+ 'title': 'Howard LC0008 Leather Conditioner, 8-Ounce (4-Pack)',
128
+ 'average_rating': 4.8,
129
+ 'rating_number': 10,
130
+ 'features': [],
131
+ 'description': [],
132
+ 'price': 'None',
133
+ 'images': {'hi_res': [None,
134
+ 'https://m.media-amazon.com/images/I/71i77AuI9xL._SL1500_.jpg'],
135
+ 'large': ['https://m.media-amazon.com/images/I/41qfjSfqNyL.jpg',
136
+ 'https://m.media-amazon.com/images/I/41w2yznfuZL.jpg'],
137
+ 'thumb': ['https://m.media-amazon.com/images/I/41qfjSfqNyL._SS40_.jpg',
138
+ 'https://m.media-amazon.com/images/I/41w2yznfuZL._SS40_.jpg'],
139
+ 'variant': ['MAIN', 'PT01']},
140
+ 'videos': {'title': [], 'url': [], 'user_id': []},
141
+ 'store': 'Howard Products',
142
+ 'categories': [],
143
+ 'details': '{"Package Dimensions": "7.1 x 5.5 x 3 inches; 2.38 Pounds", "UPC": "617390882781"}',
144
+ 'parent_asin': 'B01CUPMQZE',
145
+ 'bought_together': None,
146
+ 'subtitle': None,
147
+ 'author': None}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  ```
149
 
150
+ > Check data loading examples and Huggingface datasets APIs in <b>[Common Data Loading](https://amazon-reviews-2023.github.io/data_loading/index.html)</b> section.
 
 
151
 
152
 
153
  ## Data Fields