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
Get step-by-step solutions from verified subject matter experts
