Update README.md
Browse files
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
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
for line in fp:
|
104 |
-
print(json.loads(line.strip()))
|
105 |
```
|
106 |
|
107 |
```text
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
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 |
-
|
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 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
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 |
-
|
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
|