May-03-2020, 07:57 PM
So I am trying to build a dictionary that maps the key value to a specific value in a txt file. Its a txt file about movie reviews and I am trying to separate it into random reviews by each author. The format of the text file is |reviewId userId itemId rating title content|. So how would I specify that I want 100 random reviews from each author (userID) and place each all the random reviews into separate text files for test/train data.