cogsci13 commited on
Commit
37af0d7
·
verified ·
1 Parent(s): 5fec8f4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -41
README.md CHANGED
@@ -1,43 +1,143 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: rating
5
- dtype: float64
6
- - name: title
7
- dtype: string
8
- - name: text
9
- dtype: string
10
- - name: images
11
- list:
12
- - name: attachment_type
13
- dtype: string
14
- - name: large_image_url
15
- dtype: string
16
- - name: medium_image_url
17
- dtype: string
18
- - name: small_image_url
19
- dtype: string
20
- - name: asin
21
- dtype: string
22
- - name: parent_asin
23
- dtype: string
24
- - name: user_id
25
- dtype: string
26
- - name: timestamp
27
- dtype: int64
28
- - name: helpful_vote
29
- dtype: int64
30
- - name: verified_purchase
31
- dtype: bool
32
- splits:
33
- - name: full
34
- num_bytes: 16256753028
35
- num_examples: 29475453
36
- download_size: 9687898981
37
- dataset_size: 16256753028
38
- configs:
39
- - config_name: default
40
- data_files:
41
- - split: full
42
- path: data/full-*
43
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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", "raw_review_Books", trust_remote_code=True)
57
+ print(dataset["full"][0])
58
+ ```
59
+ ```json
60
+ {'rating': 5.0,
61
+ 'title': 'Such a lovely scent but not overpowering.',
62
+ '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!",
63
+ 'images': [],
64
+ 'asin': 'B00YQ6X8EO',
65
+ 'parent_asin': 'B00YQ6X8EO',
66
+ 'user_id': 'AGKHLEW2SOWHNMFQIJGBECAF7INQ',
67
+ 'timestamp': 1588687728923,
68
+ 'helpful_vote': 0,
69
+ 'verified_purchase': True}
70
+ ```
71
+ ### Load Item Metadata
72
+ ```python
73
+ dataset = load_dataset("cogsci13/Amazon-Reviews-2023-Books", "raw_meta_Books", split="full", trust_remote_code=True)
74
+ print(dataset[0])
75
+ ```
76
+ ```json
77
+ {'main_category': 'All Beauty',
78
+ 'title': 'Howard LC0008 Leather Conditioner, 8-Ounce (4-Pack)',
79
+ 'average_rating': 4.8,
80
+ 'rating_number': 10,
81
+ 'features': [],
82
+ 'description': [],
83
+ 'price': 'None',
84
+ 'images': {'hi_res': [None,
85
+ 'https://m.media-amazon.com/images/I/71i77AuI9xL._SL1500_.jpg'],
86
+ 'large': ['https://m.media-amazon.com/images/I/41qfjSfqNyL.jpg',
87
+ 'https://m.media-amazon.com/images/I/41w2yznfuZL.jpg'],
88
+ 'thumb': ['https://m.media-amazon.com/images/I/41qfjSfqNyL._SS40_.jpg',
89
+ 'https://m.media-amazon.com/images/I/41w2yznfuZL._SS40_.jpg'],
90
+ 'variant': ['MAIN', 'PT01']},
91
+ 'videos': {'title': [], 'url': [], 'user_id': []},
92
+ 'store': 'Howard Products',
93
+ 'categories': [],
94
+ 'details': '{"Package Dimensions": "7.1 x 5.5 x 3 inches; 2.38 Pounds", "UPC": "617390882781"}',
95
+ 'parent_asin': 'B01CUPMQZE',
96
+ 'bought_together': None,
97
+ 'subtitle': None,
98
+ 'author': None}
99
+ ```
100
+ > 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.
101
+ ## Data Fields
102
+ ### For User Reviews
103
+ | Field | Type | Explanation |
104
+ | ----- | ---- | ----------- |
105
+ | rating | float | Rating of the product (from 1.0 to 5.0). |
106
+ | title | str | Title of the user review. |
107
+ | text | str | Text body of the user review. |
108
+ | 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. |
109
+ | asin | str | ID of the product. |
110
+ | 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> |
111
+ | user_id | str | ID of the reviewer |
112
+ | timestamp | int | Time of the review (unix time) |
113
+ | verified_purchase | bool | User purchase verification |
114
+ | helpful_vote | int | Helpful votes of the review |
115
+ ### For Item Metadata
116
+ | Field | Type | Explanation |
117
+ | ----- | ---- | ----------- |
118
+ | main_category | str | Main category (i.e., domain) of the product. |
119
+ | title | str | Name of the product. |
120
+ | average_rating | float | Rating of the product shown on the product page. |
121
+ | rating_number | int | Number of ratings in the product. |
122
+ | features | list | Bullet-point format features of the product. |
123
+ | description | list | Description of the product. |
124
+ | price | float | Price in US dollars (at time of crawling). |
125
+ | images | list | Images of the product. Each image has different sizes (thumb, large, hi_res). The “variant” field shows the position of image. |
126
+ | videos | list | Videos of the product including title and url. |
127
+ | store | str | Store name of the product. |
128
+ | categories | list | Hierarchical categories of the product. |
129
+ | details | dict | Product details, including materials, brand, sizes, etc. |
130
+ | parent_asin | str | Parent ID of the product. |
131
+ | bought_together | list | Recommended bundles from the websites. |
132
+ ## Citation
133
+ ```bibtex
134
+ @article{hou2024bridging,
135
+ title={Bridging Language and Items for Retrieval and Recommendation},
136
+ author={Hou, Yupeng and Li, Jiacheng and He, Zhankui and Yan, An and Chen, Xiusi and McAuley, Julian},
137
+ journal={arXiv preprint arXiv:2403.03952},
138
+ year={2024}
139
+ }
140
+ ```
141
+ ## Contact Us
142
+ - **Report Bugs**: To report bugs in the dataset, please file an issue on our [GitHub](https://github.com/hyp1231/AmazonReviews2023/issues/new).
143
+ - **Others**: For research collaborations or other questions, please email **yphou AT ucsd.edu**.