# Improving RE-SWOT Analysis with Sentiment Classification: A Case Study of Travel Agencies
## 3 The Proposed Method
* Collocations Collocation refers to a sequence of two or more consecutive words occurring more frequently than can be accidental. [PERSON] et al. [30] compared several statistic metrics to find collocations. Their experiment results showed that the likelihood ratio performs well relative to other metrics; therefore, this study adopted the likelihood ratio to identify collocations. After that, the collocations were sorted in descending order based on frequency, and the top 20 were selected as features. * Merging similar features It was possible that some of the features selected in the above step could be similar. Therefore, we checked the similarity manually and unified similar features. For example, the phrases \"high speed\" and \"speed rail\" both describe high-speed rail, so we always used \"high speed\". \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Tag** & **Part of Speech** & **Tag** & **Part of Speech** \\ \hline NN & Noun, singular or mass & VBN & Verb, past participle \\ \hline NNS & Noun, plural & VBP & Verb, non-3 rd person singular present \\ \hline NNP & Proper noun, singular & VBZ & Verb, 3 rd person singular present \\ \hline NNPS & Proper noun, plural & JJ & Adjective \\ \hline VB & Verb, base form & JJR & Adjective, comparative \\ \hline VBD & Verb, past tense & JJS & Adjective, superlative \\ \hline VBG & Verb, gerund, or present participle & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Some POS tags. Figure 3: Process used in the proposed method. Sentiment Analysis  
As mentioned previously, the user reviews extracted from the TripAdvisor forum were only text messages without user ratings. To calculate the FPS at the next stage, we first used VADER to generate a sentiment score for each user review and transformed the scores into a rating on a scale of \(-2\) to \(2\) according to [PERSON]'s method [PERSON] and [PERSON] (2018), as described in Section 2.3. SWOT analysis  
To generate the SWOT matrix, we needed to first calculate the FPS for each feature. Suppose that there are \(m_{1}\) and \(m_{2}\) user reviews related to the products of KKday and Klook, respectively, and that \(n\) features are generated at the stage of feature extraction. Let \(M_{k}\) be a \(m_{k}\)\(\times\)\(n\) binary matrix, \(R_{k}\) be a column vector of \(m_{k}\) entries, and \(B_{k}\) be a column vector in which all entries are the same constant, \(2\), where \(k\in\{1,\,2\}\). \(M_{k}[i,j]=1\) if feature \(j\) is mentioned in review \(i\), and \(R_{k}[i,0]\) is the rating of user review \(i\), where \(i=0\)\(\ldots\)\((m_{k}-1)\), and \(j=0\)\(\ldots\)\((n-1)\). The FPS of feature \(j\) is calculated using Equation (2):  
\[FPS_{k,j}=\frac{S_{k,j}\cdot\sum_{i=1}^{m_{k}}M_{k}[i,j]}{\sum_{k=1}^{2}\left| S_{k,j}\cdot\sum_{i=1}^{m_{k}}M_{k}[i,j]\right|}, \tag{2}\]  
where  
\[S_{k,j}=\frac{{R_{k}}^{T}\times M_{k}}{{B_{k}}^{T}\times M_{k}},\text{ and }k\ \in\ \{1,\,2\}. \tag{3}\]  
Based on the FPS, the four parts of SWOT matrix can be determined as follows. Let \(f_{s},f_{w},f_{o},\) and \(f_{t}\) be the set of features belong to strengths, weaknesses, opportunities, and threatens, respectively, and be defined as  
\[f_{s}=\{f_{j}|FPS_{1,j}\ \geq\ \sigma\text{ and }FPS_{1,j}-\overline{FPS_{1,j}}\geq\ \sigma\}, \tag{4}\]  
\[f_{w}=\{f_{j}|FPS_{1,j}\ \leq-\sigma\text{ and }FPS_{1,j}-\overline{FPS_{1,j}} \geq-\sigma\}, \tag{5}\]  
\[f_{o}=\{f_{j}|FPS_{2,j}\ \leq-\sigma\text{ and }FPS_{2,j}-\overline{FPS_{2,j}} \geq-\sigma\},\text{ and } \tag{6}\]  
\[f_{t}=\{f_{j}|FPS_{2,j}\ \geq\ \sigma\text{ and }FPS_{2,j}-\overline{FPS_{2,j}} \geq\ \sigma\}. \tag{7}\]  
The symbol \(\sigma\) is a user-defined parameter. The cardinality of the above sets is negatively related to the value of \(\sigma\); therefore, the setting of \(\sigma\) depends on how many features the manager expects to see.