## 3 Methodology
### Proposed Target-Oriented Emotion and Sentiment Analysis  
We propose to use a dictionary-based approach to perform target-oriented emotion and sentiment analysis in this study. The proposed approach is illustrated in Figure 3. This system is able to automatically classify and perform sentiment analysis of travellers' Twitter posts in relation to targets and emotions concerning a tourist destination. In the proposed system, posts are initially crawled from Twitter and saved in a JSON format database. Only text content from a tweet is used for the analysis. In the pre-processing step, each tweet is cleaned by removing white spaces, hyperlinks, hashtag signs, and @names, and then converted to lowercase characters. The cleaned tweet is segmented into words, and stop words are removed from the list of words extracted from each tweet. Three different dictionaries, lexicon polarities, targets, and emotion words, are considered. For lexicon polarities, the proposed system uses VADER [24] dictionary, as one of the best lexicon dictionaries for sentiment analysis in the literature [15; 49]. The VADER dictionary comprises more than 7000 lexicons along with their associated sentiment intensity measures, which are specifically adapted to sentiment in microblog-like contexts, such as Twitter. The VADER sentiment analysis [24] uses five general rules, which embody grammatical and syntactical conventions for expressing and emphasising sentiment intensity, to compute the sentiment polarity. As mentioned before, the manual annotation work allowed us to create a target dictionary composed of 1932 words (each word may belong to more than one target) for target detection purposes. These targets were grouped into nine different targets: attraction, food and beverage, accommodation, holiday in general, people and culture, transport, weather, shopping and gift, and city facilities. The proposed system considered these nine key targets identified in the annotation step for target-oriented sentiment detection. Since in the pre-processing stage, a stemming procedure was applied to the extracted words of a post, the stemming process was also applied to the words in the target dictionary, and the stemmed target words were also included in the target words. A context-aware wordcount normalisation-based approach was proposed to assign a target label to each post. It is called a context-aware approach, as we compute this value considering the corresponding target dictionary. This method further provides a normalised wordcount value between 0 and 1 for each target to indicate the belongingness of a post to that target. To do so, let \(M\) be the number of words obtained from a post (\(R\)) after pre-processing. The likelihood of a tweet with \(M\) words that belongs to a class target \(T_{j}\left(D_{T_{j}}\right)\) is:  
\[P\Big{(}R_{T_{j}}\Big{)}=\sum_{i=1}^{M}p(w_{R}^{ij})\qquad;\qquad 0\leq P \Big{(}R_{T_{j}}\Big{)}\leq 1\]  
Figure 3: Block diagram of the proposed target-oriented sentiment detection system. Each word from the post \(R\) (\(w_{R}^{ij}\)) can contribute to this context-aware normalised wordcount value, \(P\Big{(}R_{T_{j}}\Big{)}\), using the following equation:  
\[p(w_{R}^{ij})=\left\{ \begin{array}{ll}\frac{1}{M},&\quad\quad\quad\quad\text{ if }w_{R}\in D_{T_{j}}\\ 0,&\quad\quad\quad\quad\text{otherwise}\end{array} \right.\]  
where \(p(w_{R}^{ij})\) is the normalised value of the word \((i)\) from the post \(R\) belongs to the class target \(T_{j}\) and \(D_{T_{j}}\) is the dictionary of the target class \(T_{j}\). As we have nine target dictionaries in our proposed target detection approach, \(j\) varies from 1 to 9, representing nine different targets. The class target with the highest normalised wordcount value is considered the target of the given tweet. For example, consider \"Can't wait for tomorrow. Tambourne mountains and glow worm caves and a long ass hike\" as the review \(R\).