## 5 Conclusions  
This research demonstrated the utility of employing a GA for the optimization of an LSTM self-attention architecture specifically applied to Portuguese sentiment analyses. The study's findings show that GAs provide an effective method for optimizing the complex hyperparameter space inherent in advanced deep learning models. This conclusion is particularly relevant for languages such as Portuguese, where the availability of extensively pre-tuned models or deep-language-specific NLP expertise may be less developed compared to high-resource languages. The GA-driven optimization process can identify effective architectural configurations that might otherwise require extensive manual tuning, thereby providing a more systematic approach to model development. The practical implications of this research extend to NLP tasks for minority or lesser-resourced languages. Specifically, the automation provided by GA optimization can lessen the human efforts and computational resources often associated with adapting and fine-tuning complex neural network models for new linguistic contexts. This can facilitate the achievement of robust results in settings with limited resource availability. Furthermore, as the GA explores a range of architectural parameters, it can then assist in developing models that better address the specific linguistic characteristics and nuances of a given minority language. Such an approach supports the development of NLP tools suitable for particular languages, rather than relying solely on the adaptation of models primarily trained on different linguistic structures. This work, therefore, contributes a methodological framework that can be considered for SA and other NLP tasks in various minority languages, potentially aiding in the creation of effective, language-specific NLP applications. Future investigations could focus on applying this methodology to other less-resourced languages and examining the transferability of the optimized architecture to other languages. There is also a need to address several aspects of the optimization procedure in the future to improve the performance of the neural network model for SA tasks. A potential method of exploration is to assess the scalability of the models to include the concatenation of 100-token chunks for sequential evaluation, followed by the usage of pooling layers or a weighted voting mechanism to aggregate the input sequences. Alternatively, it is possible to retrain the network while providing access to the recurrent encoder's initial and last hidden and cell states. In this way, information about the previous 100-token chunk can be provided without significantly changing the network architecture. Additionally, dimension reduction algorithms can be employed on initial embeddings to obtain a fixed-size representation, disregarding the initial and variable numbers of tokens. This requires the model's input to the altered to allow a customized initialization of the hidden state. This research was limited to LSTMs and self-attention mechanisms. Thus, future work might explore other configurations, such as combining CNNs and LSTMs for feature extraction and other attention mechanisms for encoding. Furthermore, it is important to prioritize the model's explainability in future research, as it remains a black box. Additionally, the next research step is to perform SA tasks at a deeper level of granularity, exploring sentence and aspect levels of classification. Conceptualization, D.P., F.M., S.M. and F.M.-D.; data curation, M.S. ; formal analysis, D.P. ; funding acquisition, F.M.-D.; investigation, D.P. ; methodology, D.P., F.M. and S.M. ; project administration, F.M.-D.; resources, F.M.-D.; software, D.P., A.B. and M.S. ; supervision, F.M. and F.M.-D.; validation, A.B. and F.M. ; visualization, D.P. ; writing--original draft, D.P. ; writing--review and editing, A.B., F.M., S.M. and F.M.-D. All authors have read and agreed to the published version of the manuscript.