''' DS2000 Spring 2020 Source code from class - Sentiment analysis Sentiment Analysis -- analyzing a bunch of reviews. Did all those reviewers collectively love or hate the movie? February 7, 2020 ''' from rotten_critics import * MOVIE = "Cats the Musical" # Compilation of reviews from the audience STARS = [5, 4, 5, 5, 4, 3, 2, 3, 3, 1, 3, 1, 1, 1, 4, 2, 2, 3, 4, 5, 4, 5, 5, 4, 5, 5, 5, 4, 5, 3, 5, 5, 4, 3, 4, 5, 5, 5, 5, 4, 2, 2, 4, 5, 5, 4, 5, 3, 3, 3, 3, 3, 4, 3, 3, 1] # All critic reviews REVIEWS = ["cinematic disaster of epic proportions", "i had to resist the urge to throw a shoe at the screen", "cats is terrible but it’s also kind of great", "the most incredible cinematic experience of my life", "let the grinding monotony of cats stand as a measuring stick " "for future movies that hope to match its unparalleled bottom feeding " "dreadfulness", "this disaster of a movie shouldn’t happen to a dog", "you have to see cats", "cried both times planning on going two more times", "ludicrous pointless and quite frankly — simply not good enough", "there’s something weirdly wonderful about just how committed " "hooper is to his vision", "something quite magical and elegant", "cats is not so bad it’s good it’s just plain bad", "the movie is — forgive the critical jargon — pretty good", "i was like is this genius is this the best thing i have ever seen", "her face still looks like taylor swift but no she’s a monster", "a vibrant fun spark runs through thethreadbare plot", "the set looks terrific even though the scale is inconsistent"] def main(): while True: option = choose_menu(MOVIE) if option == AUDIENCE: rating = audience_rating(STARS) elif option == CRITIC: rating = critic_rating(REVIEWS) else: break print("Rating is", rating, "\n") print("Thanks for using our site!") main()