## 3 Proposed Models
### Building Training Datasets for Base Learners
#### 3.2.1 Extracting 'Surface Feature'  
**Weighted log-likelihood ratio statistics for sentiment words classification**: There are numerous different methods of classifying sentiment words. We apply the weighted log-likelihood ratio statistic method (WLLR) proposed in [PERSON] et al. (2015), the WLLR measurement shows a word \(t_{i}\)'s correspondence to class \(c_{j}\) through Formula (1):  
\[r\big{(}t_{i},c_{j}\big{)}\ =\ p\big{(}t_{i},c_{j}\big{)}\log\frac{p\big{(}t_{i},c_{ j}\big{)}}{p\big{(}t_{i},\vec{c}_{j}\big{)}} \tag{1}\]  
where:  
\(p\big{(}t_{i},c_{j}\big{)}\): word \(t_{i}^{\prime}\)_s probability_ of class \(c_{j}\) and  
\(p\big{(}t_{i},\vec{c}_{j}\big{)}\): word \(t_{i}^{\prime}\)_s probability_ of another class different from \(c_{j}\). * If \(r(t_{i})>0\), this word is introduced into the positive sentiment word set, labeled with the measurement \(r(t_{i})\), and ranked according to its measurement. * Otherwise, this word is introduced into the negative sentiment word set, labeled with the measurement \(|r(t_{i})|\), and ranked according to its measurement. Depending on the word ranking order, we build pairs of sentiment polarity. These pairs will be applied in negation elimination process. WLLR statistics will be also used to identify sentiment contrast sentence, as Formula (2) indicates:  
\[h(s_{i})=y\sum_{j=0}^{|s_{i}|}r\big{(}t_{j}\big{)} \tag{2}\]  
if \(h(s_{i})<0\): inconsistency sentence,  
otherwise: no_shift sentence. * \(y\): label (pos/neg) of the text
* \(s_{i}\): sentence \(s_{i}\) of the text
* \(|s_{i}|\): number of words in \(s_{i}\)
* \(r(t_{i})\): given by Formula (1)  
**Features forming negation dataset**: Negation structure is the most popular structure in polarity shifting. Table 3 demonstrates this structure's constant occurrences in the dataset, such as the word \"khong not\" taking place 9778 times in 3,829,253 words in total of the dataset of Vietnamese reviews collected about hotels. Identifying negation structure is realized by checking the occurrences of words in sentences, such as \"khong not\", \"chang no\", \"chai don't\". These identified sentences will be put into the D negation set, comprising of negation sentences. After identifying the negation word's positions in the D negation set's sentences, this negation word will be removed. The first sentiment word havingfollowed the negation word removed will be replaced with another word bearing contrast sentiment according to Formula (2). Sentiment words which gradually follow will be replaced if they manifest the same sentiment as the first one. Example: \"I do not like this hotel!\" will be replaced with \"I dislike this hotel!\"  
**Features forming contrast dataset:** Contrast structure is also a popular one in polarity shifting. Table 4 demonstrates the quite important frequency of the word \"nhung but\", which occupies 3728 places in 3,829,253 words in total of the dataset of reviews collected about hotels. These words are divided into two groups: the first one is called fore-contrast includes \"nhung but\" and \"tuy however\", and the second one is called post-contrast \"mac_du although\" and \"du though\". If a fore-contrast occurs in a sentence, the polarity shifting takes place in the phrase preceding the fore-contrast, and, in the case of post-contrast, sentences which contain post-contrast are shifted themselves. The contrast sentences will be put in the set Dcontrast. Example: \"Khach san rat dep, vi tri thuan loi tuy nhien gia hoi dat.\" (The hotel is very nice, its location is good but the price is quite expensive). The polarity shifting occurs in the phrase \"Khach san rat dep, vi tri thuan loi\" (The hotel is very nice, its location is good). **Features forming inconsistency dataset:** Sentiment inconsistency sentences are the ones which do not demonstrate grammatical polarity shifting but implicate the contrast to sentiment shown in the whole text. This inconsistency is caused by human language, such as implicit, ironical, and satirical sentences.