## 3 A Self-Supervised Learning Approach for Sentiment Analysis
### Lexicon-Based Label Generation  
The second step in our approach comprises the generation of highly accurate pseudo-labels to feed a supervised learning classifier. For specific testing, we employ the method LRSentia [14]. LRSentia is a lexicon-based method that allows assessing the semantic orientation of a review in an unsupervised manner (i.e., without labels).  
Given the translated corpus \(\tilde{X}=\{\tilde{x}_{i}\}_{i=1}^{N}\), LRSentiaA divide each translated document \(\tilde{x}_{i}\) into sentences. Accordingly, we have a set \(S_{i}=\{s_{1,i},\dots,s_{R_{i},i}\}\) containing the sentences conforming the document \(\tilde{x}_{i}\), where \(R_{i}\) is the number of sentences in document \(\tilde{x}_{i}\). Then, a pre-processing algorithm is applied over each sentence in order to exclude words that do not have significant relevance for the sentence polarity (for more details, see [11]). Once we have performed the pre-processing step, the sentiment polarity of each sentence \(P(s_{j,i})\) with \(j\in\{1,\dots R_{i}\}\) is computed.  
Given the polarity for all the sentences, \(P(s_{1,i}),\dots,P(s_{R_{i},i})\), the overall polarity for document \(\tilde{x}_{i}\) is estimated as \(P(S_{i})=\sum_{j=i}^{R_{i}}s_{j,i}\). Therefore, the semantic orientation for the \(i\)-th document is given as  
\[P(x_{i})=\begin{cases}1\ (\text{Positive}),&P(S_{i})\geq 0\\ -1\ (\text{Negative}),&P(S_{i})<0\end{cases}. \tag{1}\]  
Besides to the semantic orientation, LRSentiA provides the confidence score \(\rho_{i}\) for the predictions \(P(x_{i})\). The confidence score for the document \(x_{i}\) is estimated as follows:  
\[\rho_{i}=\frac{P(S_{i})}{\sum_{j=1}^{I}\text{abs}(P(s_{j,i}))}, \tag{2}\]  
where we recall that \(P(S_{i})=\sum_{j=i}^{R_{i}}s_{j,i}\). As the Equation (2) indicates, the confidence score of review \(i\), depends on the difference between the positive (\(s_{j,i}>0\)) and negative (\(s_{j,i}<0\)) polarities; hence, the presence of highly polarized documents points out a high confidence score. In summary, documents with high confidence scores are supposed to be less prone to misclassification and can be used as pseudo-labels to train a supervised learning algorithm [11].  
On the other hand, we define the vector \(\mathbf{\rho}\in\mathbb{R}^{N}\) containing the confidence scores for the documents in the corpus. Based on such vector, the confidence group \(\zeta_{i}\) for the \(i\)-th document is defined as  
\[\zeta_{i}=\begin{cases}\text{Very-high},&\rho_{i}>\delta\\ \text{High},&\delta-0.5\sigma_{\mathbf{\rho}}<\rho_{i}\leq\delta\\ \text{Low},&\delta-\sigma_{\mathbf{\rho}}<\rho_{i}\leq\delta-0.5\sigma_{\mathbf{\rho} }\,,\\ \text{Very-low},&0<\rho_{i}\leq\delta-\sigma_{\mathbf{\rho}}\\ \text{Zero},&\rho_{i}=0\end{cases} \tag{3}\]  
where \(\delta\) is the threshold used to define the confidence categories, which is computed as, \(\delta=\mu_{\mathbf{\rho}}+\sigma_{\mathbf{\rho}}\), being \(\mu_{\mathbf{\rho}}\), and \(\sigma_{\mathbf{\rho}}\) respectively the mean and standard deviation of vector \(\mathbf{\rho}\). The categorization shown in Equation (3) is intended to minimize incorrect predictions while maximizing the number of samples to train the supervised learning algorithm. Previous studies [11; 14] have shown the presence of a correlation between the confidence scores and the prediction accuracies.