Emotional characteristics and theme mining of star-rated hotels from the perspective of social sensing: a case study of Nanchang City, China

Mining hotel social sensing data and analyzing its spatial and temporal characteristics can provide decision support for hotel managers. Present research on this topic is limited to the overall hotel industry and text mining. Here, we first obtain POI and reviews for star-rated hotels in Nanchang from 2018 to 2021. Secondly, the hotel POI (Point of Interest) is combined with the sentiment value of customer reviews. Finally, comparative analysis and topic mining of Spatio-temporal aspects of text reviews of different star-rated hotels are conducted using sentiment analysis, spatial analysis, and thematic social network analysis. Results show that: (1) Hotel star rating and hotel review sentiment value are significantly positively correlated. The seasonal trends of different star rating hotel sentiment values are similar, but are highest in summer and lower in autumn; (2) The highest sentiment value is seen for friends’ outings and the lowest is for business trips; (3) Customer reviews of star-rated hotels focus on three aspects: facilities, service, and location. Three-star hotels focus on the stay experience, while four-star hotels focus on the breakfast situation. Exploring hotel social sensing data can intuitively illustrate hotel selection’s behavioral patterns and spatial-temporal characteristics. The methods of this study can expand the application of social sensing data in different fields, such as the tourism and restaurant industries.


Introduction
Customer evaluation information helps potential consumers make purchasing decisions and helps managers improve hotel services' quality. Customers generally cannot judge the quality of products and services provided by hotel companies until they experience them, while the opinions expressed online by other customers are a more independent and trustworthy source of information than hotel advertisements (Muhammad et al., 2021;Wang et al., 2020). An increasing number of customers browse review data before travel to arrange they are itinerary and choose hotels (Chang et al., 2017;Valdivia et al., 2017). Therefore, how to analyze and study customer evaluation information is a key concern for hotel managers.
Currently, social sensing data mining for the hotel industry is mainly focused on the exploration of review data. Sentiment analysis of online reviews can yield customer preferences for hotels (Zhang, Ma, et al., 2021). Stringam et al. explored what factors increase hotel consumer ratings by evaluating consumer ratings and online review data (Stringam & Gerdes, 2010). Yen et al. examine the impact of hotel attributes on consumer behavior in posting online reviews (Yen & Tang, 2018). Meanwhile, various research methods for online review of big data such as sentiment analysis (Jia & Chen, 2020; Page 2 of 12 Wang et al. Computational Urban Science (2022) Tan et al., 2021a) and topic mining (Luo & Yi, 2019;Wang et al., 2014) have provided new ideas and tools for hotel management. Sentiment dictionary (Rao et al., 2014), machine learning (Tang et al., 2019), and sentiment analysis tools (Tao et al., 2019) are primary methods of conducting sentiment analysis. Word frequency statistics (Reagan et al., 2017), semantic analysis (Han, & Chiu,, & Cheng., 2020), topic probability models (Blei et al., 2001), and machine learning (Rusanov et al., 2018) can be used for topic mining. There are natural differences in the hardware facilities and service environment of different-star hotels. Thus, the service expectations of customers are also different (Li et al., 2020). However, existing studies are inadequate in terms of both their content and methodology, specifically: on the one hand, most of the existing results study hotel customer evaluations as a whole, lacking a comparison of the differences in the influencing factors of different star-rated hotels; on the other hand, they generally focus on the analysis and research of review texts and have not yet fully explored the hotel location information. In recent years, various online booking platforms have provided a wealth of valuable socially-aware data. Proper exploitation of Spatio-temporal big data of the hotel industry to provide a theoretical and practical basis for social sensing research is a primary focus of current research. This study uses hotel POIs and customer reviews webcrawled under the Ctrip hotel platform as a database and then processes them to obtain hotel social sensing data. First, the BERT (Bidirectional Encoder Representation from Transformers) model is used to classify the reviews for sentiment, and then the hotel sentiment value is calculated by combining the hotel information to carry out data analysis in spatial and temporal dimensions. Second, kernel density analysis of the distribution characteristics and hotel sentiment values according to hotel POIs was conducted to study the spatial layout differences and sentiment distribution characteristics of different star hotels. Finally, theme mining of hotel review data by the LDA (Latent Dirichlet Allocation) theme model is combined with a social network analysis method to analyze the similarities and differences in customer attention given to different star hotels. Therefore, the research results can be used to provide theoretical guidance and practical reference for the effective management of different-star hotel managers.

Study area and data sources
Nanchang City is the administrative and cultural center of Jiangxi Province and has a large number of hotels, clearly-defined spatial distribution, and many customer reviews, which can reflect the current situation of the local hotel industry (Fig. 1). The Ctrip hotel platform is the domestic hotel booking industry benchmark and the online accommodation booking market (Wang et al., 2021). Its user base is large, hotel customers are active in their online reviews and the online information on the website reflects the basic profile of hotel users (Maomao et al., 2021). We use Python scripts for web crawling to collect online reviews and hotel POIs on the Ctrip hotel platform from September 2018 to September 2021 and select three-star and above-star hotel reviews in Nanchang. We focus on hotels with three or more stars since lower-rated hotels have few reviews. Since the number of reviews varies from hotel to hotel and some hotels have a very low number of reviews, hotels with less than 20 reviews were filtered in this study. In total, 362 (29 fivestar, 79 four-star, 254 three-star) hotels and 168,613 customer text reviews were obtained (Table 1). Each piece of data includes hotel ID, hotel name, review text, hotel coordinates, review time, and travel type label (Table 2). Among them, travel type is a label classified by the Ctrip hotel platform according to customers. As the subject of this study is hotels in Nanchang, China, non-Chinese reviews were filtered to ensure the accuracy of the findings.

BERT-based sentiment classification
The BERT model enhances its semantic representation with the masked language model and next sentence prediction tasks (Acheampong et al., 2021;Tan et al., 2021b). The core idea is the same as that of the Transformer model, which effectively removes distance constraints by combining the interconnections between words in the text to fully display the dependencies between the current word and the rest of the words in the sentence, thus better identifying the semantic information of the sentence. We use the BERT model to classify the sentiment of hotel review texts and use probability values [0, 1] (Zhang, Ma, et al., 2021) output from the model as sentiment scores. Where the closer the value to 1, the more positive the comment sentiment, and the closer to 0, the more negative the comment sentiment.
The encoding process of the model input is the summation of three vectors, the inputs of which are in the form of a vector representation of the corresponding word for each word in the text, the encoding of location information, and the marking of paragraph information (Fig. 2). At the same time, two special symbols, "CLS" and "SEP" are added. "CLS" is generally added to the first part of the text, where the feature can be extracted for use in the classification model. The "SEP" symbol Page 3 of 12 Wang et al. Computational Urban Science (2022) 2:10 indicates a clause break, which is used to break two sentences in the input text. The BERT base model structure is built by a 12-layer Transformer architecture, with the encoding dimension set to 768 dimensions, while the multi-head is set to 12 and the model has 110 million parameters. Due to the small comment corpus and to avoid parameter overload, the open-source shared BERT sentiment classification  model from the GitHub web platform is used here. 1 The model was built by a 6-layer Transformer architecture, with the coding dimension set to 384 dimensions, the multi-head set to 12, and is trained using the Chinese Wikipedia corpus. By manually labeling and sorting the emotional tendency of hotel review data, 5000 positive and negative hotel reviews are obtained as the review corpus, which is divided into a training set (95%) and a test set (5%) (Yang et al., 2019). The pre-trained model was fine-tuned to train the final sentiment classification model. The training process of the model and the main parameters are as follows. First, each epoch is trained with the training set and the model is evaluated using an AUC (area under the curve) method (Berrar, 2014). Second, the model uses a dynamic learning rate and early termination, with the initial learning rate set to 1e-6 and the Batch size set to 24. The process is as follows: after the current Epoch is trained, the current training result is measured using the test set and the AUC of the Epoch is noted, and if the current AUC does not improve over the previous Epoch, then the learning rate is reduced (by 20%) until the AUC of all 10 Epoch test sets did not improve, then training was stopped. In the end, the model was trained for 418 Epochs. To solve the overfitting problem, the model sets the dropout to 0.4 and uses the sigmoid function as an activation function to predict the target classification. The AUCs of both the training and test sets of the model were greater than 0.95 (Fig. 3).
To further investigate the accuracy of the model sentiment classification, this study compared the results of manual classification of a corpus of 200 hotel reviews by both groups of researchers with the model classification results (Table 3). First, two groups of four people, who were not in contact with each other, were separately identified for the sentiment of the hotel review corpus. Secondly, the researchers classified hotel reviews into two categories of affective polarity (positive and negative) based on the proportion of positive and negative emotion words appearing in the reviews and the overall context of the reviews, where the emotion words were referenced to the Chinese emotion dictionary How-Net. At the same time, the same comment corpus was classified for sentiment using the BERT model. Finally, the results of the manual classification were compared with the results of the BERT sentiment classification. It was found that the model classification results agreed with both sets of manual classification results by more than 85%. Therefore, the BERT model used in this study can discriminate the sentiment polarity of hotel review texts correctly and can be used to classify the sentiment of the review corpus for this study.

Topic-based social network analysis of commentary texts
Traditional topic mining methods mainly include word frequency analysis, co-word analysis, and citation analysis (He et al., 2018). These have a wide range of applications but are more subjective (Choi & Park, 2019). A more objective technique proposed by Blei for determining common themes in a set of texts to extract the distribution of themes and the distribution of subject words in the text uses the implicit Dirichlet distribution model (LDA) (Blei et al., 2001). It is a 3-layer Bayesian generative model of "document-topic-word", which can efficiently mine the topic information contained in a large number of documents and has no strict limitation on the text length. This approach can effectively and significantly discover the topic features of short texts (Zhao et al., 2020). We thus use the LDA topic model to mine the topics of hotel review texts, conceptualize the topics and their relationships as nodes and edges in the social network graph, and mine the core nodes and tight sub-clusters through graph mining methods to effectively identify text topics and their correlation structures (Maomao et al., 2021). In turn, we analyze the similarities and differences in customers' concerns about differentstar hotels. The specific approach used here is as follows: (1) Data pre-processing: The comment text is first desegmented, and the deactivated word database is constructed by selecting the deactivated word list of HIT and the deactivated word list of Baidu for deactivation and integration. Then, the Jieba package in Python is used to complete the word separation process of the comment text.
(2) LDA topic modeling: The classification topics of the text are established in the clustering results of the LDA model. Since the effect of LDA, topic extraction is directly related to the number of topics, we determine the optimal number of topics for each star hotel  review (the optimal number of topics for 3-star is 4, for 4-star is 5, and for 5-star is 3) based on the topic distribution through LDAvis visualization mapping (Goloshchapova et al., 2019). To ensure clear boundaries between topics, feature words that are unclear and appear in multiple topics (e.g., "hotel", "room", etc.) were removed, and six words with relatively high frequency were selected as topic representatives, and the names of topic descriptions were further confirmed based on the semantic relationships of feature words.
(3) Thematic social network analysis: First, the feature words of LDA are organized and summarized, and the feature words under the same topic are used as topic feature identifiers, to construct the external co-occurrence matrix of topic-topic (Table 4). The elements on the non-diagonal line of the coword matrix are the number of times two keywords appear in the same comment, and the elements on the diagonal line are the number of times the word appears in all comments. Second, an internal cooccurrence matrix was constructed based on the feature word-feature word co-occurrence relationship to reveal the feature word association relationship under a single topic (Table 5). Finally, the Gephi software was used to visualize the thematic social network of each star hotel review.

Spatio-temporal analysis
The kernel density analysis method can be used for surface density calculation and empirical analysis of aggregation class research. It calculates and estimates the data aggregation through the sample data and measures the density change of research elements through the established distance decay function, to explore the distribution and change characteristics of hot spots in the spatial region (Dong & Xu, 2020;Fang et al., 2021). We obtain the hotel location coordinates, count the distribution of each star hotel, spatialize the hotel sentiment value, and conduct kernel density analysis in ArcGIS software. Meanwhile, to explore the spatial distribution of the sentiment value of star-rated hotels in Nanchang, this study divided star-rated hotels into positive and negative hotels, where those with sentiment values higher than the average of star-rated hotels were positive hotels and vice versa (200 positive hotels and 162 negative hotels). The distribution of positive and negative hotels was subjected to kernel density analysis separately. The kernel density bandwidth was set at 2000 m according to the scope of this study area. Meanwhile, to explore the differences in emotions in the temporal order of each star hotel, this study conducted a comparative analysis of each star hotel by season (spring, summer, autumn, and winter). Among them, spring is March, April, May, summer is June, July, August, autumn is September, October, November, and winter is January, February, and December.

Timing analysis
The number of reviews for each star hotel is broken down by seasons (Fig. 4 left). The number of customer reviews for each-star hotel follows a similar seasonal trend, showing a gradual increase in spring, summer, and autumn, and a decrease in winter. At the same time, this study analyses the sentiment value of each star hotel statistically by season (Fig. 4 right). The results found that the change in sentiment values with the seasons was consistent across the star hotels: The same trend in sentiment values for four and five-star  hotels with the seasons, with the highest in summer and lower in autumn; Seasonal sentiment averages for 3-star hotels, are highest in summer and lowest in spring.
We also analyze the number of reviews by trip type and the sentiment value by star-rated hotels (Fig. 5). The number of reviews was essentially the same across all star categories, with business trips being the most frequent and solo travel the least frequent. In the comparison of sentiment values, the differences are broadly similar between the different types of travel, with leisure trips of friends being the highest and business trips the lowest in all star-rated hotels.

Spatial analysis
Each star-rated hotel is mainly distributed in the main urban area of Nanchang, showing an overall state of aggregation. A nuclear density analysis of the distribution of each star hotel (Fig. 6) shows that the spatial distribution range of different star hotels varies significantly, with its distribution range of three-star > four-star > five-star. The high-density area of the distribution of each starrated hotel is similar, mainly distributed in the central part of Honggu Tan along the Ganjiang River and the border area of Qingshan Lake, Xihu District, Donghu District, and Qingyunpu District. In terms of distribution focus, the higher the star rating of the hotel, the more the high-density area is skewed towards the central part of Honggu Tan along the Ganjiang River.
This study conducted a kernel density analysis of the spatial distribution of positive and negative hotels (Fig. 7). It was found that negative hotels were more spatially clustered than positive hotels, with high-density areas mainly located in the border areas of Qingshan Lake District, West Lake District, East Lake District, and Qingyunpu District. Positive hotels are more widely   Wang et al. Computational Urban Science (2022) 2:10 distributed than negative hotels, with high-density areas mainly located along the Ganjiang River in the central part of Honggu Tan and the border areas of Qingshan Lake, Xihu, Donghu, and Qingyunpu districts.

Topic mining
The results of the LDA model for star-rated hotels (Table 6), with the three-star hotel themes being average facilities, warm service, convenient location, and comfortable stay. Four-star themes are average facilities, warm service, convenient location, comfortable stay, and good breakfast; Five-star hotel themes are average facilities, warm service, and convenient location.
Social networks were further constructed based on the results of the LDA model to explore the association between the textual themes of different star-rated hotel reviews. The Gephi software was used to explore and visualize the relationship between topic-to-topic associations and the co-occurrence of feature words under a single topic (Fig. 8).
The size of the nodes in the graph is proportional to the number of topic occurrences, which means that the larger the node, the more user attention the topic will have. The general theme of facilities accounts for the largest proportion of themes in all-star hotels, indicating that customers in all-star hotels are more concerned about the general theme of facilities. The themes common to all-star hotels are general facilities, warm service and convenient location, the theme common to three-and four-star hotels are comfortable to stay, and the theme specific to four-star hotels is rich breakfast. This suggests that facilities, location, and service are aspects that are common concerns to all-star hotels. The thickness of the connecting lines between themes in the figure is proportional to the number of co-occurrence of themes in the corresponding nodes. This is reflected in the strong linkage between the three themes of average facilities, warm service, and comfortable stay in the social network map of the three-star hotels. The four-star thematic social network map shows strong links between the four themes of a comfortable stay, convenient location, average facilities, and warm service. For five-star hotels, the facilities are generally closely linked to the convenience of the location.
There is little variation in feature words under the same theme across star hotels. Most themes have a relatively even thickness of connecting lines between feature words, and individual themes have strong internal social network connections. This is evidenced by the fact that of the three and four-star hotel themes, the "passion for service" theme has the strongest internal social network links. Of the five-star hotel themes, the location facilitates closer social network connections. Words that clearly express emotions appear, such as "average, warm, bad", indicate the customer's emotional evaluation of various aspects of the hotel. This is evident in the general theme of facilities, where the presence of feature words such as "average, okay, and bad" indicate that customers do not rate hotel facilities highly. The presence of words such as "warm and comfortable" in the theme of enthusiasm for service indicates that customers are mostly positive about the hotel's service. In the convenience theme, the presence of words such as "convenient and handy" indicate that customers are satisfied with the location of the hotel.

Main contributions
The contribution of this study is mainly in the research methodology: this study combines hotel POI and hotel review information to calculate hotel sentiment value and conducts a comparative analysis of three-star to five-star hotels. Specifically, hotel customer evaluations are analyzed from the perspective of time and space respectively, and the Spatio-temporal dynamic characteristics of customer evaluations of hotels with different stars are studied. Previous literature mainly studied hotels as a whole, lacking the analysis of differences for different star-rated hotels. At the same time, most of them analyze for a single review text and have not fully explored the hotel location information.
Meanwhile, this study has practical implications, mainly by capturing and processing information from Ctrip's hotel platform to obtain hotel social sensing data, and then using sentiment analysis, spatial analysis, thematic social network analysis, and other methods to carry out a comparative analysis of different star-rated hotels in terms of space and time, as well as fine-grained mining of text reviews, ultimately providing decision support for hotel managers, as well as providing a reference for customers to choose hotels.

Practical insights
Our findings have practical implications for hotel managers: (1) Analyses of the changes in the number of occupants and the sentiment value of each star hotel with the seasons show that the number of customers staying in each star hotel has a similar trend as the seasons, showing a gradual increase in spring, summer, and autumn, and a decrease in winter. In addition, the sentiment value of each star hotel has a similar trend as the seasons, with an increase from spring to summer, a decrease from summer to autumn, and an increase from autumn to winter. Our results can thus provide hotel managers with the opportunity to implement corresponding management adjustments in response to seasonal changes, such as strengthening management and improving service quality in response to the situation that the number of occupants in each star hotel is the highest in autumn and the customer evaluations of the hotel are relatively low.
(2) Statistical analysis of the sentiment value of different types of customers in each star hotel showed that the sentiment value of different types of custom-ers in each star hotel is the highest for the "friends trip" type and the lowest for the "business trip" type. Therefore, hotel managers can make corresponding service improvements for different types of customers, such as focusing on the needs of business traveltype customers.
(3) Through the spatial distribution of each star hotel and the nuclear density analysis of positive and negative hotels, it is found that each star hotel is mainly distributed in the main urban area of Nanchang, and basically in the city center. The high-density areas of each star-rated hotel distribution are similar, mainly distributed in the central part of Honggu Tan along the Ganjiang River and the border areas of Qingshan Lake, Xihu, Donghu, and Qingyunpu districts. In terms of distribution focus, the higher the star rating of the hotel, the more the high-density area is skewed towards the central part of Honggu Tan along the Ganjiang River. At the same time, the high-density area of positive hotels is more inclined towards the river area in Honggu Tan than the high-density area of negative hotels. Therefore, the difference in the distribution of different star hotels and the difference in the distribution of positive hotels and negative hotels can provide a reference for hotel site selection. For example, there are many high-star hotels along the riverside of Honggu Tan and the sentiment value of the hotels is relatively high. Therefore, hotel managers need to focus on the competitive influence of the surrounding star-rated hotels when selecting a site.
(4) In this study, by subject mining the hotel review texts and performing social network analysis on the results, we found that the results of different star hotel subjects have similarities and differences, and the differences of feature words within each subject are not significant. Customers often rate multiple aspects of a hotel at the same time. Therefore, the customer evaluations for different-star hotels are improved accordingly. For example, when customers rate the hotel's facilities low but rate the service and location relatively high, hotel managers can focus on improving the facilities aspect of the hotel. At the same time, hotel managers can enhance the management of the aspects that customers focus on according to the differences in the themes that customers focus on in different-star hotels. For example, fourstar hotel customers pay more attention to breakfast, therefore, four-star hotel managers need to pay attention to the service and management of breakfast

Conclusion
We performed web-crawls and information processing from the Ctrip hotel platform to obtain hotel social sensing data. We then use sentiment analysis, spatial analysis, and thematic social network analysis to carry outa comparative analysis of different star-rated hotels in terms of space and time and topic mining of text reviews. We explored the similarities and differences in the Spatio-temporal dynamics of customer evaluation information and textual review themes of different star-rated hotels and provide theoretical guidance and practical reference for the effective management of different star-rated hotels. However, we did not analyze the influencing factors behind them here. Future research will consider the influencing factors of sentiment distribution with the help of relevant urban environments, socio-economic, and humanistic data.