5-Core Full Reviews?
Hi there,
I was hoping to use this dataset for an NLP final project in my master's program. I was specifically aiming to use the review text from the 5-core subset of the data. However, it seems that the 2023 version of the Amazon Reviews dataset only provides pure IDs for the 5-core subset. Is this correct, or am I simply not looking in the right place for the 5-core review text data?
If indeed the only 5-core data is the pure ID data, then does somebody here know of an easy way that I can get the text data for just the data points appearing in the 5-core datasets? Huggingface Datasets unfortunately do not seem to have an easy way to do a SQL-style join operation-- I wanted to join the 5-core and raw review datasets together on user_id and parent_asin.
Thank you all in advance!
That's correct β we didn't release a 5-core review subset this time because we have multiple data splits (based on timestamp or leave-last-out), so including a separate 5-core review set felt a bit redundant and might introduce too many links.
The easiest way would be to first load the raw review data, build a dictionary indexed by (user_id, parent_asin), and then use the 5-core rating data to retrieve the corresponding reviews.
I really appreciate the response. Thank you!
For reference, I am working on the Video Games subset of the data.
I went ahead and tried this method, and it was hugely helpful. Discovered something worth mentioning, though: (user_id, parent_asin) will not give you a specific review. For example, a base video game and its expansion pack seem to have the same parent_asin, so a user reviewing both will look like they have two records under these keys.
I expanded your suggested method to instead build a dictionary from (user_id, parent_asin, timestamp), and this seemed to keep the correct data. I noted that there were still duplicates: multiple entries with the same triplets of (user_id, parent_asin, timestamp). However, these indeed seemed to be duplicates, since for a given triplet, all other fields looked to be the same (I glanced at all of these onscreen; did not check it rigorously)
A follow up on my earlier comment, in case this helps anyone in the future:
I ultimately changed the 5-core and raw HF Datasets to Pandas dataframes, and just did the join (merge) in Pandas. Then I converted the merged dataframe back to a HF Dataset and saved that. This was memory intensive, but relatively easy to do (if you've got the RAM available).
Thank you again!
One other detail I forgot to mention:
The 'timestamp' columns in the pure ID/5-core dataset and the raw review dataset are different data types. If you do end up merging in pandas using the method that I did, then you will need to convert the datatype of the timestamp column in the pure ID 5-core dataframe to int64, so as to match the raw dataset in the merge operation. For example: pureid_5core_pandas_df = pureid_5core_pandas_df .astype({'timestamp': 'int64'})
Best of luck to whoever does this next!