# Sentiment Analysis of Tourist Scenic Spots Internet Comments Based on LSTM

Authors: Maozheng Fu; Ling Pan
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

With the win-win development of tourism and the Internet, word-of-mouth ranking of tourist attractions is a valuable reference factor. We try to find a correlation between tourist reviews and taste ranking of tourist attractions. We study the sentiment features of tourist online reviews from the technical perspective of natural language processing, so we propose an improved long short-term memory (LSTM) framework for sentiment feature extraction of travel reviews. We abandon traditional dictionaries and machine learning methods. A deep neural network approach was chosen to decompose multisentiment travel reviews into different morpheme levels for classification. Then, through preprocessing, text sentiment topic detection, and sentiment classification network, an accurate grasp of the sentiment features of reviews is finally achieved. To test the performance of our method, we built a web review database by crawler for experimental validation. Experimental results show that our method maintains more than 90% accuracy in comment sentiment detection, significantly outperforming dictionary methods and machine learning methods.


---

## Body

## 1. Introduction

With the improvement of people’s quality of life, more and more people are traveling in addition to the necessary activities such as clothing, food, housing, and transportation. Tourism has gradually become a major economic industry in today’s society, and in addition to developed cities, there are many small cities where tourism is the mainstay industry. With the prevalence of tourism, the development of the Internet has brought more opportunities to the tourism industry. The empowerment of the e-commerce economy has brought convenient channels such as online ticketing to many tourist attractions, and with the opening of online ticketing channels, many consumers have started to provide travel tips and other comments on tourist attractions. Nowadays, people are used to checking traveler reviews of travel destinations as travel references before traveling. With the advent of the 5G era and the popularity of smartphones, tourist attraction review data increase as the number of visitors increases. [1]. This large number of reviews gives a different travel experience to each tourist attraction, which inadvertently forms a kind of electronic word of mouth. Based on consumer habits, electronic word of mouth will be the first reference condition that influences consumers’ choice of tourist destinations [2]. This electronic word-of-mouth is each traveler’s personal experiences that provide feedback not only to the staff of the destination but also to the consumers who are visiting it [3]. Each consumer review brings a more or less subjective sentiment element, and it is a challenging task to uncover the sentiment s of consumption from the many travel guide reviews, and only by correctly capturing the sentiment characteristics of the reviews can we inform important business decisions for the next step in the tourism industry [4].Tourist attraction tips and reviews can be positioned to the advanced level of the attraction, and the sentiment classification value of all the tourist tips and reviews is a part of mining the sentiment characteristics. The sentiment classification of travel tips can be broadly divided into positive, negative, and neutral sentiments. These reviews’ sentiment factors are more subjective and often influenced by weather, traveler mood, and unexpected events. Therefore, extracting sentiment features from online reviews and analyzing the sentiment distribution is a complex task [5]. Currently, a large number of researchers have carried out text sentiment mining, and in order to refine the volume of sentiment mining, the research is divided into three levels, with the early part of the study focusing on sentiment mining at the sentence level [6], the middle part of the study focusing on breaking through sentiment mining at the aspect level [7], and the later part of the study targeting sentiment mining at the document level. Some researchers have also found that text sentiment analysis can be based around the polarity of document evaluation as a starting point, and the approach has significant results for the initial classification of phrases and sentences. Researchers in the literature [8] found that text sentiment analysis methods are the text sentiment dictionary method and the machine learning method. The text sentiment dictionary method is the most primitive method for text sentiment analysis, which is effective but complex to operate and costly for labor. The most representative studies of this method are SentiWordNet [9], SenticNet [10], and OpinionFinder [11]. The text sentiment dictionary is a polarity-based sentiment classification method, which is not detailed enough for sentiment classification, but the classification effect is excellent and has a remarkable effect for primary classification of a large number of text sentiments.There are many researchers who have worked on textual sentiment mining studies of product reviews. In our study, we focus on sentiment mining and analysis research on tourist attraction reviews. This area is different from the sentiment analysis of other e-commerce product reviews. When a traveler leaves a review, such as travel feelings on a tourist attraction’s web page, he may not only describe what he saw and heard during the trip but may also involve suggestions for improving the tourist infrastructure, establishing appearances with friends, suggestions for spare parts, and so on. These additional comments make the sentiment analysis of tourist attraction reviews more complex. More studies on natural language processing were reviewed in order to refine the solution to the multilevel review sentiment features. Researchers in the literature [12] analyzed that when faced with the problem of classifying multiple review sentiment features, they proposed a hybrid model, combining text sentiment dictionary and natural language processing, and verified the efficiency of the model for classifying multiple review sentiment features through extensive experiments [13].In order to increase the coverage of the multiplicity of comment sentiment factors, some researchers have started to shift their studies to personal blogs and tweets to develop sentiment analysis from the daily sentiment tweets of Internet users to make the model’s sentiment capture more refined. Some researchers have also shifted their studies to news reports and popular searches, which is to enhance the generalizability of the model [14]. Based on the previous studies, we also found some problems. The subject of text sentiment analysis is users’ online comments, and the goal is to grasp the direction of users’ behavior and the motivation of their next actions. The traditional approach focuses on extracting polar opinions of customers and finding improvements from negative opinions based on user feedback. The current approach is to perform sentiment analysis of reviews based on user behavior, analyze the sentiment characteristics of the moment from the user’s perspective, and switch from a one-sided problem perspective to transpersonal thinking. In addition, the traditional method is hierarchical in text sentiment analysis according to the difficulty of the text, and the current method mostly uses multiple sentiment features extraction based on the concept level, which can cover the currently popular online comments and has a more accurate grasp of multiple sentiment features [15].In this paper, we study the sentiment characteristics of tourists’ online reviews from the technical perspective of natural language processing and correlate word-of-mouth ranking with the sentiment characteristics. We propose an improved LSTM framework for sentiment feature extraction from travel reviews. We do away with traditional dictionaries and machine learning methods. A deep neural network approach was chosen to decompose multisentiment travel reviews into different morpheme levels for classification. Then, through preprocessing, text sentiment topic detection, and sentiment classification network, an accurate grasp of the sentiment features of reviews is finally achieved.The remainder of this paper is laid out as follows. Section2 describes research related to sentiment analysis of online review texts. Section 3 details the principles and implementation procedures related to the improved LSTM text sentiment detection network. Section 4 presents the relevant experimental datasets and an analysis of the results. Finally, Section 5 reviews our findings and reveals some additional research.


## 2. Related Work

The integration of tourist attractions and the Internet has created popular online attractions, and to rank each tourist attraction, tourists’ travel tips and online reviews have become the most important reference factors. The Internet creates an electronic word of mouth with a certain weighting of tourists’ travel feelings and a recommendation index for tourist attractions. Electronic word-of-mouth of tourist attractions is a kind of online sharing by Internet users, which contains consumers’ opinions and suggestions about the products and also contains some of their feelings and subjective sentiments [16]. Currently, electronic word-of-mouth of tourist attractions is gradually becoming an important reference factor for investors, consumers, and operators of tourist attractions, as well as an important component in the operation of tourist attractions, and online visitors’ reviews of tourist attractions have become an important means of marketing topics of tourist attractions [17]. To realize the transformation of tourist attraction reviews from online digital information to economic value, natural language processing methods and related neural network algorithms become important tools.Some studies have found a direct relationship between reviews of tourist attractions on the revenue of tourist attractions. In previous review studies, only the polarization of reviews, the number of reviews, and the duration of reviews were focused on and then analyzed about future reports of tourist attraction footfall forecasts [18]. However, in the accelerated 5G era, reviews contain a large amount of image information and video information in addition to text information. Embedded online reviews are more informative and influential to some extent. Some researchers correlate online reviews with the number of ticket sales of tourist attractions and propose the bass model, which classifies all the reviews into sentiments and gives each type of sentiment an independent label, and each label represents a different weight. Finally, the combined weight will get the word-of-mouth rating of the tourist attraction [19]. Literature [20] proposed a sentiment mining algorithm based on the former study and finally proved through extensive experiments that the method significantly improved the accuracy of the connection between tourist attraction footfall and ticket sales.In text lexicon-based sentiment mining studies, vocabulary is used much more frequently than sentences and paragraphs, the coverage of vocabulary is broader, and the method of sentiment grading from vocabulary is more reliable [21]. The method of creating text dictionaries is tedious, and most sentiment dictionaries require manual classification, labeling, and archiving, which is a time-consuming and labor-intensive task. In a subsequent study, the lexical seed collection method was chosen to simplify the creation of manual dictionaries. The preferred choice is to select the root lexicon, from which the lexicon is dispersed at the level of affective polarity and words of the same type are archived with the same label, which greatly saves the cost and time of creating a textual sentiment lexicon [22]. Other researchers have proposed a corpus approach to text sentiment analysis, which has strict requirements on the size of the corpus. The accuracy of text sentiment classification is proportional to the size of the corpus [23]. The method has a clear association with syntactic rules, it does not generalize well enough compared to text dictionary methods, and it does not cover a wide range of texts, making its application scenarios more limited. The text sentiment dictionary method is used more frequently in text sentiment analysis in media reports, and the method is more detailed in classifying the sentiment level of media texts [24]. In the study of sentiment mining in product reviews, literature [25] proposed a positive and negative sentiment approach, where the authors constructed two polar text sentiment dictionaries separately and identified the dictionaries’ content in a collaborative effort of psychologists. The literature [26] proposed a socio-sentimental specified textual lexicon from contextual sentimental connections, focusing on social news sentiment distribution prediction with significant experimental results.The machine learning approach is more widely used in the research of sentiment mining and analysis in this paper, dividing the text sentiment dataset into training and test sets, obtaining good sentiment classification accuracy from supervised training, and then validating the model performance with the text sentiment test set [27]. Machine learning methods are more complex than sentiment text dictionaries in terms of mathematical principles but are more advantageous in dealing with large-scale text sentiment data. In literature [28], to deal with the polar distribution of movie reviews, the authors proposed the distributed machine learning method maximum entropy classification to deal with a large amount of review data. Article [29] used the SVM method to deal with polarized reviews in market research to provide more accurate value directions for company planning. In literature [30], for consumer sentiment impact in forums, the authors proposed a lexicographic approach to fine-grained classification of N-gram features of text sentiment and obtained excellent sentiment classification results after supervised training using SVM methods. In addition, considering the shortcomings of machine learning methods in terms of accuracy and speed, a large number of researchers have started to explore deep learning methods, which can greatly improve the accuracy of sentiment classification by learning text sentiment features through a neural network framework. Deep learning methods are also superior in text sentiment analysis.


## 3. Method

### 3.1. Text Sentiment Feature Extraction Network

Among the choices of deep neural network frameworks, we found that the long short-term memory network (LSTM) has an extremely strong local perception ability to learn text features with ultra-high efficiency in natural language processing and can store relevant features in the short term to prevent omissions in subsequent learning of new features. We found that some researchers have also chosen to use LSTM networks to parse textual sentiment features with good results. In this paper, we selected the LSTM network as the basic framework for sentiment feature extraction of tourist scenic reviews. The structure of the LSTM network is shown in Figure1.Figure 1
LSTM network.The text semantic features are input at the input of the LSTM network, and all point text semantic features will form a sequence of featuresM before moving to the next stage, having the following mathematical expression:(1)M=m1,m2,…,mt,where t represents the length of the feature sequence M. Natural language processing was initially dominated by recurrent neural networks (RNN), and as natural language processing requirements became more stringent, RNNs were unable to provide complete features for global information due to the omission and loss of textual information due to the framework architecture. Therefore, the LSTM framework was formed based on the optimization of RNN, and the emergence of this method solves the problem of the sequential mapping of text features and also provides local features for global information continuously. The LSTM network has a total of four gates and one memory unit, which are the input gate it, forgetting gate ft, output gate ot, and a memory unit ct for updating the hidden state ht, as follows:(2)it=σWixt+Viht−1+bi,ft=σWfxt+Vfht−1+bf,ot=σWoxt+Voht−1+bo,ct=ft⊙ct−1+it⊙tanhWcxt+Vcht−1+bc,ht=ot⊙tanhct,where ⊙ is a function similar to a multiplicative operation, V denotes the matrix associated with the weights, and b denotes the learning vector. In the process of natural language text information processing, LSTM needs to be trained in advance on the forgetting gate side of the semantic elements to obtain deeper text features and implicit features. The forward and reverse bidirectional semantic training allows text character features to be copied in advance before being passed to the next layer and stored inside the hidden memory unit in a tandem combination method.


### 3.2. Text Sentiment Topic Detection

Text sentiment topic detection is the transition between text features and sentiment features, and the character features between morphemes, words, sentences, and paragraphs can be fully mentioned in the text feature detection stage. In order to have each character feature mapped to the sentiment feature set, we adopt a labeling approach. In the data preprocessing phase, we reset all the text datasets to be trained and perform hierarchical classification of all text features with the support of professional linguists. We classify text at four levels: morpheme, word, sentence, and paragraph, and at each level, we manually annotate with different sentiment labels. Manual annotation is a huge project, in order to reduce the workload and improve efficiency, we adopt the word root dispersion method. The same word roots and their similar texts are encoded and predefined for the computer to achieve automatic annotation of text data.In the problematic sentiment topic assignment phase, we adopted the rule of identity, i.e., different text units share the same sentiment topic, which does not affect their sentiment topic labels in the subsequent text disassembly. In special cases, we also follow the specified coding units, such as the annotation of keywords, technical terms, and new vocabulary, and we will redesign the labeling procedure according to the actual situation. In our design, each lexeme, word, sentence, and paragraph have a unique label, but this does not affect the sentence-to-lexeme disassembly either. The disassembled label only changes at the text level, but its label corresponds to the text level and does not affect its label at the next level. The details of text sentiment topic detection are shown in Figure2.Figure 2
Text sentiment topic detection network.To meet our requirements for multilevel sentiment feature extraction of tourist attraction reviews, we finally chose the hierarchical cohesive clustering algorithm [31] through extensive experimental validation. We first cut the text for sentiment partitioning, then filter the sentiment features of lexemes by different thresholds, then use the text clustering similarity to judge the degree of matching between character features and text sentiment features, set a criterion line, and then adjust the similarity of extreme data according to the criterion line. The clustering of lexemes and words can be done at once, and the clustering of sentences and paragraphs requires two to three cycles to satisfy the clustering requirements. Literature [32] proposes two evaluation metrics to determine the effectiveness of text sentiment topic clustering in the same context. The mean value of similarity of lexemes discriminates whether the character features at the lexeme level meet the feature mapping condition. The mean value of maximum similarity between graphemes can judge whether the mapping between graphene features and topic features is within the specified threshold. The above two evaluation metrics have the following mathematical equation expressions:(3)simT1,T2=12∑w∈T1maxsimw,T2∗idfw∑w∈T1idfw+∑w∈T2maxsimw,T1∗idfw∑w∈T2idfw,where Ti represents a sentence and w represents a word contained in the sentence Ti. Considering that sentence- and paragraph-level clustering requires circular disambiguation and fairness of same-level clustering for bitwise N-dimensional character vectors, we additionally add cosine similarity as a weight.


### 3.3. Text Sentiment Classification

In the process of polar sentiment classification for tourist attraction reviews, we need to classify character hidden sentiment features for lexemes, words, sentences, and paragraphs. The hidden sentiment features at different character levels will have different responses. Considering the requirements of asynchronous homophily, we introduce an attention mechanism to monitor the abnormal states of different sequences and perform task control through classifier pointers to enable the improved LSTM network, to learn more character-level hidden sentiment features, and to improve the model’s recognition accuracy of text sentiment features. Meanwhile, we add character sentiment feature sharing in the improved LSTM network with a weighted representation of the associated feature sequences asht=σh⟶t,h←t. Character sentiment features at different graphene levels correspond to different feature encoders, and we assume that the sequence of shared character sentiment features is ht=h1,h2,…,ht, where t denotes the length of the sequence. We add the attention mechanism in the improved LSTM network to traverse around the feature αte of the time sequence t. Each graphene level corresponds to a weight of ht. The detailed mathematical expression of the equation is shown as follows:(4)αte=expfht∑t=1texpfht,where fh=WTh and W represent the parameters that can be trained. ce represents the weighted sum of the output sequences of the attention mechanism, and its weighting equation is as follows:(5)ce=∑t=1tαtht.In each lexical element layer, character features are input to the next layer in the form of high-level semantic featuresce, and then character sentiment features are classified. Tourist attraction reviews cover multiple sentiment features, and to distinguish different sentiment features, we use a multimodal sentiment classifier. In this classifier, a total of 128 nodes are set in the fully connected layer according to the character features in the lexical element layer, and the activation function is chosen as ReLU for nonlinear activation. Before outputting to the next layer, we added a random deactivation layer to prevent the activation function from causing overfitting of the sentiment features. In the final output layer, we take softmax activation character sentiment features and then filter them according to the weights to obtain the corresponding sentiment category of the text. The details of text sentiment classification are shown in Figure 3.Figure 3
Text sentiment classification network.


### 3.4. Improved LSTM for Comment Sentiment Detection

In the sentiment analysis of reviews of tourist attractions, we used the processing method of LSTM networks to develop the extraction of character sentiment features at the lexeme level through distributed vectors in the initial stage. To categorize the multiple sentiment features in the reviews, we manually built a character sentiment database for targeting each category of detailed polar sentiment. Each character vector contains a set of graphene sentiment features, all the character vectors are stacked to form a character vector matrix, and the matches of sentiment features are obtained by mapping the unknown vectors to graphemes in both directions. In the retrieval process, the index of the graphene can be traced in the projection layer by the character labels, and the graphene sentiment features can be associated with the look-up table.The deep neural network framework needs to obtain excellent detection accuracy in pretraining. Considering that model pretraining requires a large amount of web review data as support, we perform data crawling of web reviews from restaurant, hotel, bar, and amusement park industries as data input for pretraining. Considering the specificity of the character embedding stage, we split all words, sentences, and paragraphs into characters for embedding, provided that such splitting does not affect the integrity of text sentiment analysis. The detailed implementation network is shown in Figure4. All inputs are in the form of characters, starting from the left side of the split, and the character sentiment features at the lexeme level are projected to the next layer through bidirectional propagation and feedback of the LSTM network, where the number of splits is kept consistent for morphemes, words, sentences, and paragraphs. We also used the CRFs method to ensure that the neighboring tags of each text do not affect the final predicted values. To refine the local information in long sentences, we add CNN layer at the end to recursively feed character sentiment features to ensure the feature integrity of large-scale texts.Figure 4
Improved LSTM network for comment sentiment detection.


## 3.1. Text Sentiment Feature Extraction Network

Among the choices of deep neural network frameworks, we found that the long short-term memory network (LSTM) has an extremely strong local perception ability to learn text features with ultra-high efficiency in natural language processing and can store relevant features in the short term to prevent omissions in subsequent learning of new features. We found that some researchers have also chosen to use LSTM networks to parse textual sentiment features with good results. In this paper, we selected the LSTM network as the basic framework for sentiment feature extraction of tourist scenic reviews. The structure of the LSTM network is shown in Figure1.Figure 1
LSTM network.The text semantic features are input at the input of the LSTM network, and all point text semantic features will form a sequence of featuresM before moving to the next stage, having the following mathematical expression:(1)M=m1,m2,…,mt,where t represents the length of the feature sequence M. Natural language processing was initially dominated by recurrent neural networks (RNN), and as natural language processing requirements became more stringent, RNNs were unable to provide complete features for global information due to the omission and loss of textual information due to the framework architecture. Therefore, the LSTM framework was formed based on the optimization of RNN, and the emergence of this method solves the problem of the sequential mapping of text features and also provides local features for global information continuously. The LSTM network has a total of four gates and one memory unit, which are the input gate it, forgetting gate ft, output gate ot, and a memory unit ct for updating the hidden state ht, as follows:(2)it=σWixt+Viht−1+bi,ft=σWfxt+Vfht−1+bf,ot=σWoxt+Voht−1+bo,ct=ft⊙ct−1+it⊙tanhWcxt+Vcht−1+bc,ht=ot⊙tanhct,where ⊙ is a function similar to a multiplicative operation, V denotes the matrix associated with the weights, and b denotes the learning vector. In the process of natural language text information processing, LSTM needs to be trained in advance on the forgetting gate side of the semantic elements to obtain deeper text features and implicit features. The forward and reverse bidirectional semantic training allows text character features to be copied in advance before being passed to the next layer and stored inside the hidden memory unit in a tandem combination method.


## 3.2. Text Sentiment Topic Detection

Text sentiment topic detection is the transition between text features and sentiment features, and the character features between morphemes, words, sentences, and paragraphs can be fully mentioned in the text feature detection stage. In order to have each character feature mapped to the sentiment feature set, we adopt a labeling approach. In the data preprocessing phase, we reset all the text datasets to be trained and perform hierarchical classification of all text features with the support of professional linguists. We classify text at four levels: morpheme, word, sentence, and paragraph, and at each level, we manually annotate with different sentiment labels. Manual annotation is a huge project, in order to reduce the workload and improve efficiency, we adopt the word root dispersion method. The same word roots and their similar texts are encoded and predefined for the computer to achieve automatic annotation of text data.In the problematic sentiment topic assignment phase, we adopted the rule of identity, i.e., different text units share the same sentiment topic, which does not affect their sentiment topic labels in the subsequent text disassembly. In special cases, we also follow the specified coding units, such as the annotation of keywords, technical terms, and new vocabulary, and we will redesign the labeling procedure according to the actual situation. In our design, each lexeme, word, sentence, and paragraph have a unique label, but this does not affect the sentence-to-lexeme disassembly either. The disassembled label only changes at the text level, but its label corresponds to the text level and does not affect its label at the next level. The details of text sentiment topic detection are shown in Figure2.Figure 2
Text sentiment topic detection network.To meet our requirements for multilevel sentiment feature extraction of tourist attraction reviews, we finally chose the hierarchical cohesive clustering algorithm [31] through extensive experimental validation. We first cut the text for sentiment partitioning, then filter the sentiment features of lexemes by different thresholds, then use the text clustering similarity to judge the degree of matching between character features and text sentiment features, set a criterion line, and then adjust the similarity of extreme data according to the criterion line. The clustering of lexemes and words can be done at once, and the clustering of sentences and paragraphs requires two to three cycles to satisfy the clustering requirements. Literature [32] proposes two evaluation metrics to determine the effectiveness of text sentiment topic clustering in the same context. The mean value of similarity of lexemes discriminates whether the character features at the lexeme level meet the feature mapping condition. The mean value of maximum similarity between graphemes can judge whether the mapping between graphene features and topic features is within the specified threshold. The above two evaluation metrics have the following mathematical equation expressions:(3)simT1,T2=12∑w∈T1maxsimw,T2∗idfw∑w∈T1idfw+∑w∈T2maxsimw,T1∗idfw∑w∈T2idfw,where Ti represents a sentence and w represents a word contained in the sentence Ti. Considering that sentence- and paragraph-level clustering requires circular disambiguation and fairness of same-level clustering for bitwise N-dimensional character vectors, we additionally add cosine similarity as a weight.


## 3.3. Text Sentiment Classification

In the process of polar sentiment classification for tourist attraction reviews, we need to classify character hidden sentiment features for lexemes, words, sentences, and paragraphs. The hidden sentiment features at different character levels will have different responses. Considering the requirements of asynchronous homophily, we introduce an attention mechanism to monitor the abnormal states of different sequences and perform task control through classifier pointers to enable the improved LSTM network, to learn more character-level hidden sentiment features, and to improve the model’s recognition accuracy of text sentiment features. Meanwhile, we add character sentiment feature sharing in the improved LSTM network with a weighted representation of the associated feature sequences asht=σh⟶t,h←t. Character sentiment features at different graphene levels correspond to different feature encoders, and we assume that the sequence of shared character sentiment features is ht=h1,h2,…,ht, where t denotes the length of the sequence. We add the attention mechanism in the improved LSTM network to traverse around the feature αte of the time sequence t. Each graphene level corresponds to a weight of ht. The detailed mathematical expression of the equation is shown as follows:(4)αte=expfht∑t=1texpfht,where fh=WTh and W represent the parameters that can be trained. ce represents the weighted sum of the output sequences of the attention mechanism, and its weighting equation is as follows:(5)ce=∑t=1tαtht.In each lexical element layer, character features are input to the next layer in the form of high-level semantic featuresce, and then character sentiment features are classified. Tourist attraction reviews cover multiple sentiment features, and to distinguish different sentiment features, we use a multimodal sentiment classifier. In this classifier, a total of 128 nodes are set in the fully connected layer according to the character features in the lexical element layer, and the activation function is chosen as ReLU for nonlinear activation. Before outputting to the next layer, we added a random deactivation layer to prevent the activation function from causing overfitting of the sentiment features. In the final output layer, we take softmax activation character sentiment features and then filter them according to the weights to obtain the corresponding sentiment category of the text. The details of text sentiment classification are shown in Figure 3.Figure 3
Text sentiment classification network.


## 3.4. Improved LSTM for Comment Sentiment Detection

In the sentiment analysis of reviews of tourist attractions, we used the processing method of LSTM networks to develop the extraction of character sentiment features at the lexeme level through distributed vectors in the initial stage. To categorize the multiple sentiment features in the reviews, we manually built a character sentiment database for targeting each category of detailed polar sentiment. Each character vector contains a set of graphene sentiment features, all the character vectors are stacked to form a character vector matrix, and the matches of sentiment features are obtained by mapping the unknown vectors to graphemes in both directions. In the retrieval process, the index of the graphene can be traced in the projection layer by the character labels, and the graphene sentiment features can be associated with the look-up table.The deep neural network framework needs to obtain excellent detection accuracy in pretraining. Considering that model pretraining requires a large amount of web review data as support, we perform data crawling of web reviews from restaurant, hotel, bar, and amusement park industries as data input for pretraining. Considering the specificity of the character embedding stage, we split all words, sentences, and paragraphs into characters for embedding, provided that such splitting does not affect the integrity of text sentiment analysis. The detailed implementation network is shown in Figure4. All inputs are in the form of characters, starting from the left side of the split, and the character sentiment features at the lexeme level are projected to the next layer through bidirectional propagation and feedback of the LSTM network, where the number of splits is kept consistent for morphemes, words, sentences, and paragraphs. We also used the CRFs method to ensure that the neighboring tags of each text do not affect the final predicted values. To refine the local information in long sentences, we add CNN layer at the end to recursively feed character sentiment features to ensure the feature integrity of large-scale texts.Figure 4
Improved LSTM network for comment sentiment detection.


## 4. Experiment

### 4.1. Datasets

Online reviews of tourist attractions are idiosyncratic and do not share similar characteristics with reviews from other industries, and there is no publicly available dataset of research on the web for reviews of tourist attractions. To validate the performance of our method for sentiment detection of reviews, we first counted the daily traffic of major tourism websites and selected the most trafficked sites as data collection targets. After going for the permission of the travel websites, we crawled the review data of different tourist attractions for the last 1 year using a crawler technique. Then, we preprocessed each text data using a word splitting tool. Then, we used the abnormal data detection system to screen out the abnormal data and obtained the preliminary polarity training set and test set by manual calibration. The process of producing the dataset is shown in Figure5.Figure 5
Tourism review data production process.We also constructed character sentiment dictionaries to disambiguate all lexemes, words, sentences, and paragraphs to correspond to sentiment features in the form of characters. In the subsequent method of efficiency evaluation, we still used the accuracy, recall, and F1 score methods to evaluate the effectiveness of tourist attraction review sentiment detection. In the preliminary sentiment classification, we only classified the sentiments into positive, negative, and neutral, and we will refine each sentiment specifically in the subsequent experiments. Detailed information on the dataset is shown in Table1.Table 1
The detail of datasets.
DatasetsPositiveNegativeNeutralTrain395214310225863Test8631125017634Total481525560333497


### 4.2. Analysis of Results

To compare the performance effect of our method in comment sentiment detection, we also did parallel experiments on the dictionary method and machine learning method to verify the performance effect of the dictionary method (DK) and machine learning method (ML) in comment sentiment detection. In our experiments, we refined the polar sentiment operation, and each polar sentiment was refined into two more specific sentiments, and the experimental results are shown in Table2.Table 2
Text sentiment detection results of different methods.
PositiveNegativeNeutralRecommend (%)Worth (%)Disgust (%)Shortcoming (%)General (%)Fine (%)DK454342483238ML787479736365Ours919391908582From the refined sentiment detection accuracy results in Table2, it can be seen that our method maintains a detection accuracy of over 91% for both positive and negative sentiment classes, with a maximum improvement of 17 percentage points in comment detection accuracy compared to the machine learning method. The neutral sentiment detection accuracy stays above 82%, which is a maximum improvement of 22 percentage points over the machine learning method. The dictionary method performs poorly in comment sentiment detection accuracy. The dictionary method, as a traditional text sentiment detection method, relies too much on the construction of a manual text database and labeling and is slow in processing when facing a large amount of text data. For unfamiliar text elements, it is very easy to generate false recognition problems. This also causes the problem that the dictionary method has poor detection results in our experiments. From the data, it can be found that the detection accuracy regarding neutral sentiment is generally lower than polar sentiment. This is because our polar sentiment represents the most subjective attitude of consumers and is easier to fit in the character feature vector. For neutral sentiment is milder, it is more difficult to distinguish in the character feature vector, and activation functions need to be added to highlight its features, so the detection accuracy of neutral sentiment is less than that of polar sentiment. To verify the credibility of our experiments, we supplement the credibility verification experiments, and the experimental results are shown in Table 3.Table 3
Experimental reliability analysis results.
CrediblePlausibleFeasibleProbableRecommend1000Worth0100Disgust0100Shortcoming0010General0100Fine0010To verify the effectiveness of our method in more detail, we conducted a comprehensive verification from three indicators: recall rate, F1 score, and precision. According to our preliminary research, we found that polar sentiment reviews have a greater impact on the word-of-mouth ranking of scenic spots, so in the next experiments, we focused on polar sentiment. Based on our previous work on sentiment refinement, we again conducted sentiment refinement. The review sentiments were refined to the level of sentiments, mainly happy, surprised, frenzy, bored, sad, angry, and other refined sentiments. The experimental results are shown in Table4.Table 4
Comparison results of experiments on text sentiment feature sentiment.
PositiveNegativeHappySurprisedFrenzyBoredSadAngryPrecision0.910.890.880.840.900.91Recall0.810.820.790.830.850.82F10.880.850.890.830.890.87From the experimental results in the table above, it is clear that our method is not only more detailed in sentiment refinement but also more responsive to tourists’ objective feelings about tourist attractions from the perspective of sentiments. From the precision and recall data, we can see that our method performs well. Our method can give the sentiment category data of tourist attraction reviews, and according to the professional word-of-mouth evaluation agency, the sentiment characteristics of these reviews can be weighted and balanced. Finally, a ranking of tourist attraction word-of-mouth scores can be generated. Such word-of-mouth ranking results give tourists a detailed reference for their travel experience, shareholders a reference for their investment, and the management of the tourist attraction a reference for feedback.


## 4.1. Datasets

Online reviews of tourist attractions are idiosyncratic and do not share similar characteristics with reviews from other industries, and there is no publicly available dataset of research on the web for reviews of tourist attractions. To validate the performance of our method for sentiment detection of reviews, we first counted the daily traffic of major tourism websites and selected the most trafficked sites as data collection targets. After going for the permission of the travel websites, we crawled the review data of different tourist attractions for the last 1 year using a crawler technique. Then, we preprocessed each text data using a word splitting tool. Then, we used the abnormal data detection system to screen out the abnormal data and obtained the preliminary polarity training set and test set by manual calibration. The process of producing the dataset is shown in Figure5.Figure 5
Tourism review data production process.We also constructed character sentiment dictionaries to disambiguate all lexemes, words, sentences, and paragraphs to correspond to sentiment features in the form of characters. In the subsequent method of efficiency evaluation, we still used the accuracy, recall, and F1 score methods to evaluate the effectiveness of tourist attraction review sentiment detection. In the preliminary sentiment classification, we only classified the sentiments into positive, negative, and neutral, and we will refine each sentiment specifically in the subsequent experiments. Detailed information on the dataset is shown in Table1.Table 1
The detail of datasets.
DatasetsPositiveNegativeNeutralTrain395214310225863Test8631125017634Total481525560333497


## 4.2. Analysis of Results

To compare the performance effect of our method in comment sentiment detection, we also did parallel experiments on the dictionary method and machine learning method to verify the performance effect of the dictionary method (DK) and machine learning method (ML) in comment sentiment detection. In our experiments, we refined the polar sentiment operation, and each polar sentiment was refined into two more specific sentiments, and the experimental results are shown in Table2.Table 2
Text sentiment detection results of different methods.
PositiveNegativeNeutralRecommend (%)Worth (%)Disgust (%)Shortcoming (%)General (%)Fine (%)DK454342483238ML787479736365Ours919391908582From the refined sentiment detection accuracy results in Table2, it can be seen that our method maintains a detection accuracy of over 91% for both positive and negative sentiment classes, with a maximum improvement of 17 percentage points in comment detection accuracy compared to the machine learning method. The neutral sentiment detection accuracy stays above 82%, which is a maximum improvement of 22 percentage points over the machine learning method. The dictionary method performs poorly in comment sentiment detection accuracy. The dictionary method, as a traditional text sentiment detection method, relies too much on the construction of a manual text database and labeling and is slow in processing when facing a large amount of text data. For unfamiliar text elements, it is very easy to generate false recognition problems. This also causes the problem that the dictionary method has poor detection results in our experiments. From the data, it can be found that the detection accuracy regarding neutral sentiment is generally lower than polar sentiment. This is because our polar sentiment represents the most subjective attitude of consumers and is easier to fit in the character feature vector. For neutral sentiment is milder, it is more difficult to distinguish in the character feature vector, and activation functions need to be added to highlight its features, so the detection accuracy of neutral sentiment is less than that of polar sentiment. To verify the credibility of our experiments, we supplement the credibility verification experiments, and the experimental results are shown in Table 3.Table 3
Experimental reliability analysis results.
CrediblePlausibleFeasibleProbableRecommend1000Worth0100Disgust0100Shortcoming0010General0100Fine0010To verify the effectiveness of our method in more detail, we conducted a comprehensive verification from three indicators: recall rate, F1 score, and precision. According to our preliminary research, we found that polar sentiment reviews have a greater impact on the word-of-mouth ranking of scenic spots, so in the next experiments, we focused on polar sentiment. Based on our previous work on sentiment refinement, we again conducted sentiment refinement. The review sentiments were refined to the level of sentiments, mainly happy, surprised, frenzy, bored, sad, angry, and other refined sentiments. The experimental results are shown in Table4.Table 4
Comparison results of experiments on text sentiment feature sentiment.
PositiveNegativeHappySurprisedFrenzyBoredSadAngryPrecision0.910.890.880.840.900.91Recall0.810.820.790.830.850.82F10.880.850.890.830.890.87From the experimental results in the table above, it is clear that our method is not only more detailed in sentiment refinement but also more responsive to tourists’ objective feelings about tourist attractions from the perspective of sentiments. From the precision and recall data, we can see that our method performs well. Our method can give the sentiment category data of tourist attraction reviews, and according to the professional word-of-mouth evaluation agency, the sentiment characteristics of these reviews can be weighted and balanced. Finally, a ranking of tourist attraction word-of-mouth scores can be generated. Such word-of-mouth ranking results give tourists a detailed reference for their travel experience, shareholders a reference for their investment, and the management of the tourist attraction a reference for feedback.


## 5. Conclusion

In this paper, we first analyze the prospects of the integration of tourism and the Internet and then discuss the relationship between the online word-of-mouth of tourist attractions and tourists’ online reviews. Considering that the online word-of-mouth of tourist attractions is a valuable reference factor, we study the sentiment features of tourists’ online reviews from the technical perspective of natural language processing and plan to extend the word-of-mouth ranking from the sentimental features. In response to the above problems, we propose an improved LSTM framework for sentiment feature extraction of travel reviews. We do away with a traditional dictionary and machine learning methods. A deep neural network method is selected to decompose the multisentiment travel reviews into different morpheme levels for classification. Then, through preprocessing, text sentiment topic detection, and sentiment classification network, the final accurate grasp of the sentiment features of comments is achieved. To test the performance of our method, we established a web review database using crawler for experimental verification. Experimental results show that our method maintains more than 90% accuracy in comment sentiment detection, which is significantly better than the dictionary method and machine learning method.The volume of the most important dataset for pretrained deep neural network models. The collective volume of our data is far from sufficient for later studies, and we will continue to focus on the construction of the network review dataset in the next studies. For the optimization of the network, we will consider using a bidirectional recurrent neural network to process two polar character sentiment feature sequences to achieve better sentiment detection accuracy.



---

*Source: 5944954-2022-07-18.xml*