Question
Write code in Python using Pandas (read from CSV file) You have an Eco-hotel Data Set (https://archive.ics.uci.edu/ml/datasets/Eco-hotel) in the format of a comma-separated file (dataset-CalheirosMoroRita-2017.csv),
Write code in Python using Pandas (read from CSV file)
You have an Eco-hotel Data Set (https://archive.ics.uci.edu/ml/datasets/Eco-hotel) in the format of a comma-separated file (dataset-CalheirosMoroRita-2017.csv), it can be read and open in excel easily.
It is required that you observe the customer reviews sentiment of each syntax by weighing certain words. For example, the third row has the following syntax
"The hotel is fantastically built by the sea, living together with nature. The environment is great as well as people and service.
We fully enjoyed the place and the facilities.
Thanks for the ""cidreira"" and ""madalenas"" tea at reception"
Here the following keywords are important
fantastic (the hotel is fantastic ....) 2
nature (living together with nature) 1
great (Environment is great) 3
enjoy (we fully enjoyed the place) 1
thank 1
----------------------------------------------
Sentimental Score : (8/39)*100 = ceil(20.51) = 21
Where 8 is the total weight of these keywords
39 is the total words in this syntax
Your job is to define a map for these words first, for example, if you have only two syntaxes as shown above the map will be shown as follows
fantastic:2
nature:1
great:3
enjoy:1
thank:1
best:2
very nice:3
You will use this map to calculate the sentimental score, as shown in the above two examples. Now, your job is to find these words (mostly these words are common in all the syntax, so if you go through only 100 syntaxes that would be enough).
After finding the keywords and make a map out of them. Then you can calculate the sentimental score of all the syntax, with the help of this map. You will store it into a two-dimensional list such that the first column is syntax reference and the second is its corresponding score (you can use any other container like dictionary etc.)
for example
List: Syntax-1 : 21, Syntax-2 : 39, etc.
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
First we need to import the required libraries for this work Now we need to read the dataset using t...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