## 3 Materials and Methods
### Automatic Labelling System  
Automatic labelling uses the sentiment lexicon approach to label data and to measure the sentiment polarity. In order to label a dataset in this work, SentiWordNet is applied. SentiWordNet is obtained from the WordNet dictionary where each word is associated with a numerical score. In this phase, for each sentence, the SentiWordNet dictionary is applied to determine the polarity of each word, and then the polarity of the whole sentence is calculated by adding the polarity of each word. If the word is not in the SentiWordNet dictionary, it is searched for in the WordNet dictionary. WordNet is an English language dictionary that contains synonym words gathered into a set called syn-set. Thus, the analogous words related to the word in WordNet are fetched and searched in the SentiWordNet dictionary such that their sentiment score is selected for polarity calculation. This procedure increases the efficiency and effectiveness of automatic labelling. Furthermore, some words, called negation words, may affect the sentiment orientation of other words in the sentence. Negation words are those words that reverse the polarity of the sentence when occurring in it. For example, in the text \"the food is not good\", the negation word \"not\" reverses the polarity of the sentence. To handle this issue, a negation is considered in the polarity calculation. The algorithm of the automatic labelling phase is illustrated in Algorithm 3. ```
Input: Sentences, SentiWordNet, WordNet, NegationWords Output: Labelled Dataset for each sentence \(S\):  taggedSentence = POS(S) for each WordCandidate (verb, adverb, and adjective) in taggedSentence  LookupSentiWordNet (WordCandidate) if WordCandidate not in SentiWordNet  LookupWordNet (WordCandidate) else if WordCandidate > 0  polarity (WordCandidate) \(\leftarrow\) positive else if WordCandidate < 0  polarity (WordCandidate) \(\leftarrow\) negative else if  polarity (WordCandidate) \(\leftarrow\) neutral else (there is NegationWords near WordCandidate)  polarity (WordCandidate) \(\leftarrow\) opposite (polarity (WordCandidate))  PolarityScore += LookupSentiWordNet (WordCandidate)  TotalWordCandidateCount++ AveragePolarity = PolarityScore/ TotalWordCandidateCount if AveragePolarity > 0  return 1 else return 0
```  
**Algorithm 3**Algorithm of the automatic labelling  
The result demonstrates the label (1 for positive and 0 for negative) and the sentiment polarity. Then, it is used for the next phase, which is the ensemble learning classifier. The labelled dataset is used to train the classification model. The ensemble learning classifier method is used for sentiment classification. Precisely, in the ensemble method, stacked generalization is employed on different classifier algorithms as explained in the next sub-section. Predicting Polarity of Largescale Social Data Using Supervised Learning (The Ensemble Learning Classifier Method)  
An ensemble algorithm is trained on the labelled dataset to classify the unseen reviews as positive or negative on the go. Up-to-date numerous ensemble learning methods have been developed and introduced to enhance the performance of classification tasks. The major purpose of the ensemble models is to combine a set of classifiers with the intention ofachieving a better and more reliable predictive performance than a single classifier [43]. The focus will be on the capability of an ensemble model to generate a better result compared to each baseline classifier. In this experiment, a stacked generalization method was used, as shown in Figure 3, because it minimizes generalization error. The idea of stacked generalization is meant to combine the prediction result of several base classifiers in the first level using a meta classifier in the next level in order to minimize the generalization error.