cogsci13 commited on
Commit
35db8e2
1 Parent(s): 544e3d3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +158 -59
README.md CHANGED
@@ -1,61 +1,160 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: main_category
5
- dtype: string
6
- - name: title
7
- dtype: string
8
- - name: average_rating
9
- dtype: float64
10
- - name: rating_number
11
- dtype: int64
12
- - name: features
13
- sequence: string
14
- - name: description
15
- sequence: string
16
- - name: price
17
- dtype: string
18
- - name: images
19
- sequence:
20
- - name: hi_res
21
- dtype: string
22
- - name: large
23
- dtype: string
24
- - name: thumb
25
- dtype: string
26
- - name: variant
27
- dtype: string
28
- - name: videos
29
- sequence:
30
- - name: title
31
- dtype: string
32
- - name: url
33
- dtype: string
34
- - name: user_id
35
- dtype: string
36
- - name: store
37
- dtype: string
38
- - name: categories
39
- sequence: string
40
- - name: details
41
- dtype: string
42
- - name: parent_asin
43
- dtype: string
44
- - name: bought_together
45
- dtype: string
46
- - name: subtitle
47
- dtype: string
48
- - name: author
49
- dtype: string
50
- splits:
51
- - name: full
52
- num_bytes: 13734265072
53
- num_examples: 4448181
54
- download_size: 7830866988
55
- dataset_size: 13734265072
56
- configs:
57
- - config_name: default
58
- data_files:
59
- - split: full
60
- path: data/full-*
61
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - recommendation
6
+ - reviews
7
+ size_categories:
8
+ - 100M<n<1B
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ---
10
+ # Amazon Reviews 2023 (Books Only)
11
+
12
+ **This is a subset of Amazon Review 2023 dataset. Please visit [amazon-reviews-2023.github.io/](https://amazon-reviews-2023.github.io/) for more details, loading scripts, and preprocessed benchmark files.**
13
+
14
+ **[April 18, 2024]** Update
15
+
16
+ 1. This dataset was created and pushed for the first time.
17
+
18
+ ---
19
+
20
+ <!-- Provide a quick summary of the dataset. -->
21
+
22
+ This is a large-scale **Amazon Reviews** dataset, collected in **2023** by [McAuley Lab](https://cseweb.ucsd.edu/~jmcauley/), and it includes rich features such as:
23
+ 1. **User Reviews** (*ratings*, *text*, *helpfulness votes*, etc.);
24
+ 2. **Item Metadata** (*descriptions*, *price*, *raw image*, etc.);
25
+
26
+ ## What's New?
27
+
28
+ In the Amazon Reviews'23, we provide:
29
+
30
+ 1. **Larger Dataset:** We collected 571.54M reviews, 245.2% larger than the last version;
31
+ 2. **Newer Interactions:** Current interactions range from May. 1996 to Sep. 2023;
32
+ 3. **Richer Metadata:** More descriptive features in item metadata;
33
+ 4. **Fine-grained Timestamp:** Interaction timestamp at the second or finer level;
34
+ 5. **Cleaner Processing:** Cleaner item metadata than previous versions;
35
+ 6. **Standard Splitting:** Standard data splits to encourage RecSys benchmarking.
36
+
37
+ ## Basic Statistics
38
+
39
+ > We define the <b>#R_Tokens</b> as the number of [tokens](https://pypi.org/project/tiktoken/) in user reviews and <b>#M_Tokens</b> as the number of [tokens](https://pypi.org/project/tiktoken/) if treating the dictionaries of item attributes as strings. We emphasize them as important statistics in the era of LLMs.
40
+
41
+ > We count the number of items based on user reviews rather than item metadata files. Note that some items lack metadata.
42
+
43
+
44
+ ### Grouped by Category
45
+
46
+ | Category | #User | #Item | #Rating | #R_Token | #M_Token | Download |
47
+ | ------------------------ | ------: | ------: | --------: | -------: | -------: | ------------------------------: |
48
+ | Books | 10.3M | 4.4M | 29.5M | 2.9B | 3.7B | <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/review_categories/Books.jsonl.gz' download> review</a>, <a href='https://datarepo.eng.ucsd.edu/mcauley_group/data/amazon_2023/raw/meta_categories/meta_Books.jsonl.gz' download> meta </a> |
49
+ meta </a> |
50
+ > 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.
51
+ ## Quick Start
52
+ ### Load User Reviews
53
+ ```python
54
+ from datasets import load_dataset
55
+
56
+ dataset = load_dataset("cogsci13/Amazon-Reviews-2023-Books-Review", "raw_review_Books", trust_remote_code=True)
57
+ print(dataset["full"][0])
58
+ ```
59
+ ```json
60
+ {'rating': {0: 1.0},
61
+ 'title': {0: 'Not a watercolor book! Seems like copies imo.'},
62
+ 'text': {0: 'It is definitely not a watercolor book. The paper bucked completely. The pages honestly appear to be photo copies of other pictures. I say that bc if you look at the seal pics you can see the tell tale line at the bottom of the page. As someone who has made many photocopies of pages in my time so I could try out different colors & mediums that black line is a dead giveaway to me. It’s on other pages too. The entire book just seems off. Nothing is sharp & clear. There is what looks like toner dust on all the pages making them look muddy. There are no sharp lines & there is no clear definition. At least there isn’t in my copy. And the Coloring Book for Adult on the bottom of the front cover annoys me. Why is it singular & not plural? They usually say coloring book for kids or coloring book for kids & adults or coloring book for adults- plural. Lol Plus it would work for kids if you can get over the grey scale nature of it. Personally I’m not going to waste expensive pens & paints trying to paint over the grey & black mess. I grew up in SW Florida minutes from the beaches & I was really excited about the sea life in this. I hope the printers & designers figure out how to clean up the mess bc some of the designs are really cute. They just aren’t worth my time to hand trace & transfer them, but I’m sure there are ppl that will be up to the challenge. This is one is a hard no. Going back. I tried.'},
63
+ 'images': {0: array([{'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/516HBU7LQoL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/516HBU7LQoL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/516HBU7LQoL._SL256_.jpg'},
64
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/71+XwcacMmL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/71+XwcacMmL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/71+XwcacMmL._SL256_.jpg'},
65
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/71RbTuvD1ZL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/71RbTuvD1ZL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/71RbTuvD1ZL._SL256_.jpg'},
66
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/71U63wdOeZL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/71U63wdOeZL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/71U63wdOeZL._SL256_.jpg'},
67
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/71WFEDyKcKL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/71WFEDyKcKL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/71WFEDyKcKL._SL256_.jpg'},
68
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/8109NwjpHKL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/8109NwjpHKL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/8109NwjpHKL._SL256_.jpg'},
69
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/814gxfh8wcL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/814gxfh8wcL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/814gxfh8wcL._SL256_.jpg'},
70
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81HC0vKRC2L._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81HC0vKRC2L._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81HC0vKRC2L._SL256_.jpg'},
71
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81Nx6BnRLxL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81Nx6BnRLxL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81Nx6BnRLxL._SL256_.jpg'},
72
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81QQMwBcVPL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81QQMwBcVPL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81QQMwBcVPL._SL256_.jpg'},
73
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81fgT3R3OwL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81fgT3R3OwL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81fgT3R3OwL._SL256_.jpg'},
74
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81mfzny0I5L._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81mfzny0I5L._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81mfzny0I5L._SL256_.jpg'},
75
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81nir7bf91L._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81nir7bf91L._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81nir7bf91L._SL256_.jpg'},
76
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81yLUo6ZL3L._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81yLUo6ZL3L._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81yLUo6ZL3L._SL256_.jpg'},
77
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/81zh9h5RwkL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/81zh9h5RwkL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/81zh9h5RwkL._SL256_.jpg'},
78
+ {'attachment_type': 'IMAGE', 'large_image_url': 'https://m.media-amazon.com/images/I/91yfcpFlEqL._SL1600_.jpg', 'medium_image_url': 'https://m.media-amazon.com/images/I/91yfcpFlEqL._SL800_.jpg', 'small_image_url': 'https://m.media-amazon.com/images/I/91yfcpFlEqL._SL256_.jpg'}],
79
+ dtype=object)},
80
+ 'asin': {0: 'B09BGPFTDB'},
81
+ 'parent_asin': {0: 'B09BGPFTDB'},
82
+ 'user_id': {0: 'AFKZENTNBQ7A7V7UXW5JJI6UGRYQ'},
83
+ 'timestamp': {0: 1642399598485},
84
+ 'helpful_vote': {0: 0},
85
+ 'verified_purchase': {0: True}}
86
+ ```
87
+ ### Load Item Metadata
88
+ ```python
89
+ dataset = load_dataset("cogsci13/Amazon-Reviews-2023-Books-Meta", "raw_meta_Books", split="full", trust_remote_code=True)
90
+ print(dataset[0])
91
+ ```
92
+ ```json
93
+ {'main_category': {0: 'Books'},
94
+ 'title': {0: 'Chaucer'},
95
+ 'average_rating': {0: 4.5},
96
+ 'rating_number': {0: 29},
97
+ 'features': {0: array([], dtype=object)},
98
+ 'description': {0: array([], dtype=object)},
99
+ 'price': {0: '8.23'},
100
+ 'images': {0: {'hi_res': array([None], dtype=object),
101
+ 'large': array(['https://m.media-amazon.com/images/I/41X61VPJYKL._SX334_BO1,204,203,200_.jpg'],
102
+ dtype=object),
103
+ 'thumb': array([None], dtype=object),
104
+ 'variant': array(['MAIN'], dtype=object)}},
105
+ 'videos': {0: {'title': array([], dtype=object),
106
+ 'url': array([], dtype=object),
107
+ 'user_id': array([], dtype=object)}},
108
+ 'store': {0: 'Peter Ackroyd (Author)'},
109
+ 'categories': {0: array(['Books', 'Literature & Fiction', 'History & Criticism'],
110
+ dtype=object)},
111
+ 'details': {0: '{"Publisher": "Chatto & Windus; First Edition (January 1, 2004)", "Language": "English", "Hardcover": "196 pages", "ISBN 10": "0701169850", "ISBN 13": "978-0701169855", "Item Weight": "10.1 ounces", "Dimensions": "5.39 x 0.71 x 7.48 inches"}'},
112
+ 'parent_asin': {0: '0701169850'},
113
+ 'bought_together': {0: None},
114
+ 'subtitle': {0: 'Hardcover – Import, January 1, 2004'},
115
+ 'author': {0: "{'avatar': 'https://m.media-amazon.com/images/I/21Je2zja9pL._SY600_.jpg', 'name': 'Peter Ackroyd', 'about': ['Peter Ackroyd, (born 5 October 1949) is an English biographer, novelist and critic with a particular interest in the history and culture of London. For his novels about English history and culture and his biographies of, among others, William Blake, Charles Dickens, T. S. Eliot and Sir Thomas More, he won the Somerset Maugham Award and two Whitbread Awards. He is noted for the volume of work he has produced, the range of styles therein, his skill at assuming different voices and the depth of his research.', 'He was elected a fellow of the Royal Society of Literature in 1984 and appointed a Commander of the Order of the British Empire in 2003.', 'Bio from Wikipedia, the free encyclopedia.']}"}}
116
+ ```
117
+ > 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.
118
+ ## Data Fields
119
+ ### For User Reviews
120
+ | Field | Type | Explanation |
121
+ | ----- | ---- | ----------- |
122
+ | rating | float | Rating of the product (from 1.0 to 5.0). |
123
+ | title | str | Title of the user review. |
124
+ | text | str | Text body of the user review. |
125
+ | images | list | Images that users post after they have received the product. Each image has different sizes (small, medium, large), represented by the small_image_url, medium_image_url, and large_image_url respectively. |
126
+ | asin | str | ID of the product. |
127
+ | parent_asin | str | Parent ID of the product. Note: Products with different colors, styles, sizes usually belong to the same parent ID. The “asin” in previous Amazon datasets is actually parent ID. <b>Please use parent ID to find product meta.</b> |
128
+ | user_id | str | ID of the reviewer |
129
+ | timestamp | int | Time of the review (unix time) |
130
+ | verified_purchase | bool | User purchase verification |
131
+ | helpful_vote | int | Helpful votes of the review |
132
+ ### For Item Metadata
133
+ | Field | Type | Explanation |
134
+ | ----- | ---- | ----------- |
135
+ | main_category | str | Main category (i.e., domain) of the product. |
136
+ | title | str | Name of the product. |
137
+ | average_rating | float | Rating of the product shown on the product page. |
138
+ | rating_number | int | Number of ratings in the product. |
139
+ | features | list | Bullet-point format features of the product. |
140
+ | description | list | Description of the product. |
141
+ | price | float | Price in US dollars (at time of crawling). |
142
+ | images | list | Images of the product. Each image has different sizes (thumb, large, hi_res). The “variant” field shows the position of image. |
143
+ | videos | list | Videos of the product including title and url. |
144
+ | store | str | Store name of the product. |
145
+ | categories | list | Hierarchical categories of the product. |
146
+ | details | dict | Product details, including materials, brand, sizes, etc. |
147
+ | parent_asin | str | Parent ID of the product. |
148
+ | bought_together | list | Recommended bundles from the websites. |
149
+ ## Citation
150
+ ```bibtex
151
+ @article{hou2024bridging,
152
+ title={Bridging Language and Items for Retrieval and Recommendation},
153
+ author={Hou, Yupeng and Li, Jiacheng and He, Zhankui and Yan, An and Chen, Xiusi and McAuley, Julian},
154
+ journal={arXiv preprint arXiv:2403.03952},
155
+ year={2024}
156
+ }
157
+ ```
158
+ ## Contact Us
159
+ - **Report Bugs**: To report bugs in the dataset, please file an issue on our [GitHub](https://github.com/hyp1231/AmazonReviews2023/issues/new).
160
+ - **Others**: For research collaborations or other questions, please email **yphou AT ucsd.edu**.