Helping brands to win the market using text analysis

post image

Text Analysis is a very important tool to understand your customer’s perception towards your product and brand. In text analysis we mostly use topic modelling, text embedding to understand better how our customer feels.

Here I have taken three famous hotels in Bangalore for comparison and tried to provide recommendation to the famous Leela Palace how they can beat their competition.

As the brand manager of The Leela Palace Bengaluru, which is the second-best luxury hotel in Bengaluru, my aim is to analyze the customer preferences and behaviour patterns of the current best hotel, Taj West End Bengaluru, and the third-best hotel, Grand Mercure. The goal is to identify strategies to surpass Taj West End and maintain our position ahead of Grand Mercure.

Steps followed for the analysis

post image

Extract relevant data of three firms

The Selenium framework was used for web scraping of the Trip Advisor website to extract relevant data for the three hotels — The Leela Palace Bengaluru, Taj West End Bengaluru, and Grand Mercure. Automated web browsing and data extraction were facilitated by Selenium.

A Python script was written to navigate to the Trip Advisor website and perform individual searches for each hotel. The search functionality was utilized to access the review pages of each hotel. Through iteration, the review text, title, and ratings were collected for each hotel.

Data fetching was accomplished by simulating user interactions, including scrolling through review pages and clicking on the “Load More” button to access additional reviews. The necessary information, such as review text, title, and ratings, was then extracted from the HTML elements on the page.

The collected data was stored in a structured format, such as a CSV file, for further analysis. This data formed the foundation for customer preference analysis, sentiment analysis, and topic modelling, enabling an understanding of customer behaviour patterns and preferences for each hotel.

Standard Text preparation

The text preparation process for the brand preference analysis involved several important steps to ensure the accuracy and effectiveness of the analysis. Firstly, the reviews and titles were converted to lowercase to maintain consistency and avoid discrepancies in the data. This step helps treat words with different cases as the same, avoiding duplication or misinterpretation of information.

Next, stop words were removed from the reviews and titles. Stop words are commonly used words in a language that do not add much value to the analysis, such as “and,” “the,” or “is.” Removing these words reduces noise and focuses on more meaningful and relevant content.

Lemmatization was then applied to further refine the text. Lemmatization reduces words to their base or root form. For example, words like “running” and “runs” are reduced to “run.” This step consolidates similar words and avoids redundancy in the analysis.

After these initial steps, a trigram of TF-IDF matrix was created. This matrix represents the frequency of each word, considering its importance in the entire corpus of reviews. Creating a trigram matrix captures more context and meaning in the analysis.

The resulting trigram matrix formed the foundation for further analysis and modeling. It provided a structured representation of the reviews and titles, allowing exploration and insights into customer preferences and behavior patterns. This prepared text data was then used for sentiment analysis, topic modeling, and other text analysis approaches to gain a comprehensive understanding of customers’ perspectives and preferences.

In summary, the text preparation process involved converting to lowercase, removing stop words, applying lemmatization, and creating a trigram of TF-IDF matrix. These steps ensured consistency, accuracy, and meaningfulness of the text data, enabling valuable insights and informed recommendations for the management of the focal firm.

Starting with Exploratory data analysis

Following text preprocessing, we are left with a refined collection of reviews for all three hotels, and preliminary data analysis has been conducted.

  1. We then proceeded to generate bigrams, which are combinations of two words used together. The primary objective of this step is to capture the relationship between adjacent words in the text, thereby adding an extra dimension to our analysis. This allows us to extract more nuanced insights from the reviews, as we can identify frequently used word pairs and better understand their contextual usage.

  2. Here are the following network graph drawn using the generated bigram

post image

From the diagram it can be inferred the key word like service positive words are associated like wonderful , amazing, great and exceptional. So we can say customer really enjoy the service provided by Taj west

post image

From the above network graph we can conclude that the service related to food is quite good in Leela palace and most of the customer reviews has mentions of service related to food.

post image

For Grand Mercure, service related to stay and room are excellent as most the link are related to characteristics of either the rooms or their stay in the hotel.

After network analysis of the bigrams, we tried to find the most 20 frequent words for each hotels.

post image

So we can easily see that the Taj west has good food and good stay as well and their staff has quite personalised touch especially with the mentions of names

post image

From the above graph we can conclude that food services like their restaurants are the best facilities and has been raved a lot about by the customers in their reviews.

post image

From grand mercure it prominent that the services related to room and stay is excellent and has been recommended again and again.

Topic Modelling — Model Building and Inferences

After initial making sense of the data trying to obtain some clues regarding the basic features of each hotels. We moved forward with more advanced nlp model building.

We started with the topic modelling as it is an excellent method for understanding customer preferences for the hotels because it allows us to identify the main themes present in the customer reviews. By identifying these themes, we can understand what aspects of the hotel experience customers value most.

Furthermore, topic modeling allows us to compare the main themes across different hotels. This can provide insights into the relative strengths and weaknesses of each hotel, informing strategies for improvement.

Finally, topic modeling is an unsupervised learning technique, meaning it does not require pre-labeled data. This makes it a practical choice for analyzing large amounts of text data.

Model Building and Parameter selection

We used LDA

LDA (Latent Dirichlet Allocation) was the best choice for our model . LDA is a generative probabilistic model that allows sets of observations to be explained by unobserved groups. In the context of text analysis, these unobserved groups or topics help explain why some parts of the data are similar.

For LDA model we need to decide the parameter like number of topics, alpha, eta. To find the most suitable parameter we chose perpexlity and coherence as the deciding factors. The perplexity of the model should be minimum for the model where as coherence should be high. As Perplexity is a measure of how well a probability distribution or probability model predicts a sample and coherence measures the degree of semantic similarity between high scoring words in the topic.

Together, these two metrics help us to identify the optimal number of topics for the LDA model by achieving a balance between the model’s predictive power (perplexity) and interpretability (coherence).

On fine tuning the model we found alpha at 0.7, beta as auto and topics as 14 has minimum perplexity and we decided to move forward with it.

Based on the above parameter model is build and followings are the inferences graph

For Taj West

post image
post image

For Taj West End Bengaluru, several key topics emerged from the topic modeling process. These topics give insight into the aspects of the hotel that customers frequently mention and likely influence their overall satisfaction.

  1. The first topic features words such as “staff”, “service”, “excellent”, and “room”. This suggests a high level of satisfaction with the service provided by the hotel staff, the quality of the rooms, and the overall exceptional experience at the hotel.

  2. The second topic includes words like “food”, “breakfast”, “restaurant”, and “good”. This implies that customers appreciate the food offerings at the hotel, particularly the breakfast and the quality of the hotel’s restaurants.

  3. The third topic contains words such as “stay”, “hotel”, “great”, and “experience”. This indicates that guests generally have a great experience during their stay at the hotel and value the overall quality of the hotel.

  4. The fourth topic has words like “garden”, “property”, “beautiful”, and “city”. This suggests that guests enjoy the hotel’s beautiful garden and property, and its location in the city is appealing.

Overall, customers of Taj West End Bengaluru appreciate the excellent service, quality food offerings, overall great experience, and beautiful property and location. These are key areas where the hotel is excelling and should maintain its focus.

post image
post image

For The Leela Palace Bengaluru, several key topics emerged from the topic modeling process. These topics provide insight into the aspects of the hotel that customers frequently mention and likely influence their overall satisfaction.

  1. The first topic highlights words such as “recommend”, “definitely visit”, “best menu”, and “spa experience”. This suggests that guests highly recommend The Leela Palace due to its menu and spa experience.

  2. The second topic includes words like “amazing”, “helpful”, “service”, and “breakfast”. This implies that guests appreciate the amazing service and breakfast at the hotel.

  3. The third topic contains words such as “food”, “excellent service”, and “good spread”. This indicates that guests enjoy the food and service at the hotel, and appreciate the variety of food offerings.

  4. The fourth topic has words like “mr”, “friendly”, “lunch”, and “made love”. This suggests that the hotel staff, particularly someone named Mr. Vaibhav, provide friendly service and made guests feel loved.

  5. The fifth topic features words such as “great service”, “food”, “family place”, and “zen”. This suggests that guests perceive The Leela Palace as a great place for family due to its service, food, and zen-like ambiance.

Overall, customers of The Leela Palace Bengaluru appreciate the excellent service, a variety of food offerings, friendly and attentive staff, and the hotel’s ambiance. These are key areas where the hotel is excelling and should maintain its focus.

post image
post image

For Grand Mercure, the topic modeling results capture a comprehensive picture of customer preferences and satisfaction. Guests highly appreciate the cleanliness of the hotel, especially the massage area, which contributes to a more enjoyable stay (Topic 2). The front office staff, particularly an individual named Laxmi, are commended for their exceptional service, significantly enhancing guests’ positive experiences (Topic 3). The overall stay at the hotel, including the reception staff and the general experience provided by the hotel, is greatly enjoyed by guests, indicating high customer satisfaction (Topic 4). These results suggest that Grand Mercure’s success lies in its attention to cleanliness, exceptional staff service, and commitment to providing a great overall experience for its guests.

Text Embedding — Bert Embedding , Cluster Analysis, Sentiment and Emotion Analysis

To improve our understanding of the reviews provided by the customers we decided to investigate further performing the text embedding on the reviews and separate them into clusters so that we can differentiate or create two different types of context for the reviews.

For Taj West

Cluster 1

post image

Cluster 2

post image

For Leela palace

Cluster 1

post image

Cluster 2

post image

For Grand Mercure

  1. Cluster 1

post image
  1. Cluster 2

post image

From the word cloud diagrams, we can draw the following inferences:

For Taj West:

Cluster 1: Words like “room”, “service”, “staff”, “stay”, “good”, and “excellent” stand out. This suggests that guests appreciate the excellent service provided by the staff, the quality of the rooms, and their overall stay at the hotel.

Cluster 2: Words such as “stay”, “service”, “room”, “food”, and “great” are prominent. This indicates that guests enjoyed their stay at the hotel, appreciated the service, found the rooms comfortable, and liked the food.

For Leela Palace:

Cluster 1: The words “good”, “service”, “room”, “staff”, “food”, and “excellent” stand out. This suggests that guests had a good experience with the service and the staff, found the rooms comfortable, and enjoyed the food.

Cluster 2: Words like “hotel”, “stay”, “room”, “service”, “good”, and “great” are noticeable. This suggests that guests appreciated their stay at the hotel, found the rooms comfortable, and had a good experience with the service.

For Grand Mercure:

Cluster 1: Words such as “room”, “good”, “stay”, “service”, “hotel”, and “clean” are prominent. This indicates that guests found the rooms clean and comfortable, had a good stay, and appreciated the service at the hotel.

Cluster 2: The words “service”, “room”, “staff”, “good”, “hotel”, and “stay” stand out. This suggests that guests appreciated the service provided by the staff, found the rooms comfortable, and had a good stay at the hotel.

From the above word clouds we could not found the exact theme these clusters are formed so we moved forward with the sentiment and emotion analysis. For each clusters reviews we labeled them based on the sentiments — postive or negative and emotions like joy , anger, surprised and neutral.

Followings are the inferences we drawn from the negative reviews for taj west hotel

From the negative reviews for Taj West, we can infer the following:

  1. Some guests had issues with the front office staff, describing them as “unwelcoming” and “miserable”. They felt the staff lacked training and were not up to the standards expected of the Taj brand.

  2. One guest reported an issue with the management of the hotel, particularly in relation to the handling of events and meetings. They felt they were dealing with novices and had to give reminders for everything.

  3. Issues were reported with the spa services, with guests feeling that the booking process was outdated and not automated. Guests had to manually confirm bookings and did not receive timely feedback.

  4. Some guests felt that certain staff members were rude and not in line with the Taj culture. In particular, a security guard named Mr. Mallesh was singled out.

  5. Despite these issues, many guests still praised the excellent and attentive service, the quality of the food, the comfort of the rooms, and the overall atmosphere of the hotel. Some guests even mentioned staff members by name, expressing gratitude for their service.

It’s important to note that while these reviews are labelled as “negative”, many of them contain positive sentiments as well. They highlight areas where improvement is needed, but also recognize the aspects of the hotel experience that are appreciated by guests.

Based on the negative reviews for The Leela Palace, the following issues can be inferred:

  1. One guest noted that although the spa treatment was good, there were concerns with the shampoo and shower room. They felt that the process was not as professional and required a more personalised approach.

  2. Some guests felt that the food could be improved, suggesting a greater variety of South Indian food. They felt that the overall food spread was old.

  3. There were complaints about service delays, particularly when requesting extra beds. Guests felt that staff were not taking responsibility for these delays and were quick to blame others. There were also concerns about the quality of desserts, with some guests feeling they were too sugary.

  4. Some guests felt that not all services were up to standard. There were delays in addressing requests and a perceived preference for serving foreigners over locals. This created a feeling of inequality and dissatisfaction among some guests.

  5. There were instances of room allocation errors, with guests shocked to find their allocated room already occupied. This, coupled with issues such as booked cabs not turning up and daily struggles with room service, led to a negative experience for some guests.

  6. A guest reported a disruptive experience where loud drilling noises could be heard from their room due to maintenance work in the hotel. Despite assurances from staff that the work would not continue, the noise persisted.

  7. One guest felt that the staff, particularly from housekeeping, were rude and contemptuous. This negative interaction significantly impacted their hotel experience.

Despite these issues, some guests still praised the quality of the food and the fast service. However, these negative reviews highlight areas where improvement is necessary.

Based on the negative reviews for Grand Mercure, the following issues can be inferred:

  1. One guest highlighted a lack of personal touch, something they felt was missing from many hotels in recent years. However, they appreciated the enthusiasm and welcome from the staff at Grand Mercure.

  2. A guest referred to the hotel as a “best two-star hotel” with poor facilities. They experienced delays during check-in, issues with room allocation, and technical problems with WiFi and air conditioning. The guest also reported slow room service and suggested avoiding the hotel.

  3. Another guest had a long stay at the hotel and mentioned that the staff, especially Shruthi and Vijay, made it super.

  4. One guest criticized the hotel’s food service, stating that the staff’s approach was off-putting and the food was too sweet. The review also mentioned a lack of response from the chef.

  5. Another guest praised the hotel and staff but mentioned that the food service was slow.

  6. A guest felt that the staff were willing to go beyond their limits to provide extra services, with Mustafaa receiving specific praise for his cleaning service.

  7. One guest mentioned that while the location and rooms were good, the food needed improvement. They also found the staff, especially Sidharth and Dipankar, to be helpful.

  8. Lastly, a guest had a pleasant stay but mentioned minor hiccups. They found the staff to be accommodating and praised the hotel’s respect for Covid-19 safety measures.

  9. It’s important to note that while these reviews are labelled as “negative”, many of them contain positive sentiments as well. They highlight areas where improvement is needed, but also recognize the aspects of the hotel experience that are appreciated by guests.

After sentiment analysis we moved forward towards the emotion analysis of the reviews provided by the customers we categorised the reviews in following categories — joy, anger, neutral, surprised and fear. With the assumption of joy neutral and surprise as positive emotion we focused more the negative emotions of the reviews

post image

On further checking into the negative emotions we could conclude that the customer reviews of a hotel, highlighting both positive experiences and areas for improvement. It mentions the warm and attentive service from staff, well-maintained property, and enjoyable stay. However, some criticisms include repetitive breakfast menus, inconsistent room service, and staff requiring training.

The negative emotions expressed in the reviews for Taj West End highlight issues with management, particularly with event organization, and a lack of professionalism. Some guests had a poor spa experience due to outdated booking procedures. There were also complaints about a security guard named Mr. Mallesh who was described as rude and not in line with the Taj culture.

post image

The reviews highlight positive experiences such as good professional spa treatments and helpful staff. However, they also point out areas for improvement such as outdated facilities like the shampoo and shower room, average food spreads, and slow service. There is also a mention of preferential treatment towards foreigners, leading to dissatisfaction among some guests.

post image

While guests generally appreciated the hotel’s amenities such as reflexology treatments and food services, some had unfortunate incidents like falls at the entrance which negatively impacted their experience.Some guests at the Leela Palace had their stay disrupted by noise from ongoing maintenance work and loud external events, despite reassurances from the staff.External factors such as street noise and loud parties within the hotel premises have reportedly detracted from the overall guest experience at the Leela Palace.

post image

The reviews highlight a range of experiences at the hotel, with several noting issues with facility services and room allocation. However, staff members are often praised for their excellent service and professionalism, contributing to a positive guest experience. Overall, the feedback suggests room for improvement in certain areas, but also recognition of the high-quality service provided by staff.

post image

Guest reviews generally highlight a positive experience at the hotel, appreciating the hospitality, room views, and proximity to malls and other places. However, there are areas for improvement such as attentiveness of the staff, particularly in regard to food service and check-in process. Despite initial hiccups, the overall service, specifically mentioned staff members, and hotel interiors are highly praised.

Recommendation for the Leela Palace

Based on the analysis of customer reviews, The Leela Palace Bengaluru has several areas that can be improved upon to enhance the overall guest experience. One key area is the revamping of certain facilities such as the shampoo and shower room. Upgrades in these areas could provide a more modern and comfortable experience for guests.

In addition, the hotel should look into automating certain services. Implementing more technologically advanced systems would not only streamline operations but also provide a more personalized and seamless experience for guests. This could cover areas such as room booking, spa appointments, and even food orders.

Another significant issue raised in the reviews is the perceived unequal treatment of guests. The Leela Palace should ensure that all guests, regardless of their nationality or status, are treated with the same high level of service. This would promote a more inclusive and satisfying experience for all.

Comparing with Taj West End, it is evident that the hotel’s main strength lies in its excellent service, quality food offerings, and overall great experience. These are areas that The Leela Palace could learn from and incorporate into their own operations. For example, focusing on improving their service quality by providing regular training for staff and ensuring that they are well-equipped to handle various customer needs and requests.

In terms of food offerings, The Leela Palace could take inspiration from the variety and quality of meals provided by Taj West End. This could involve introducing more diverse menu options or enhancing the quality of existing dishes.

From Grand Mercure, The Leela Palace can glean valuable insights about the importance of cleanliness, exceptional staff service, and commitment to providing a great overall experience for its guests. This could involve implementing stricter cleanliness standards, recognizing and rewarding exceptional staff service, and constantly innovating to provide an unforgettable experience for guests.

However, it is also important to note that The Leela Palace is outperforming Grand Mercure in certain areas such as providing a variety of food offerings, friendly and attentive staff, and the hotel’s ambiance. To maintain their competitive position, The Leela Palace should continue to excel in these areas.

This could involve regular menu updates, ongoing staff training, and the maintenance of the hotel’s unique ambiance. Furthermore, they should consistently monitor customer feedback to identify potential areas for improvement and swiftly address any issues that arise.

To sum up, while The Leela Palace has its strengths, learning from competitors and continuously improving upon its weaknesses will ensure the hotel maintains its competitive edge and continues to provide a high-quality experience for all its guests.

If you are more interested in knowing how these graph and code is written you can find the github link here