Question
Have code that'll open and read reviews.txt file, scraped from online reviews of an actual Dominican Republic hotel on TripAdvisor. Write a Python script that
Have code that'll open and read reviews.txt file, scraped from online reviews of an actual Dominican Republic hotel on TripAdvisor. Write a Python script that counts and prints the number of times each of the following negative keywords appear at least once in that reviews file. Your output needs to be sorted in descending order by frequency (i.e., the word that occurs most often at the very top, and so on).
The negative keywords you need to look for are
awful, bad, beware, careless, decline, depressing, deteriorated, difficult, dirty, disappointing, disinterested, frightening, horrible, hostile, incompetent, inconsistent, indifferent, inferior, infuriating, lesson, mediocre, miscommunication, poor, rough, scary, suck, sullen, terrible, unclean, uncomfortable, uneven, unfriendly, unhygienic, unimpressive, uninterested, worst.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started