# Technology Enhanced Learning Using Humanoid Robots
## 4 The Proposed Architectural Design
### Semantic Sentiment Analysis Module  
In this section, we will describe the two components (CC and SSSC) that constitute this module. Choregraphe Component (CC). The CC of the Semantic Sentiment Analysis module is responsible for interactions with humans through the sensors of the robot. It allows the robot to wait for natural language expressions spoken by the user which are converted into text by using speech-to-text technologies mentioned in Section 3. The Semantic Sentiment Analysis module is triggered when the user says \"_Play Sentiment Analysis_\". In such a case the robot is ready to perform sentiment analysis and waits for a further text from the user. From now on, the input text spoken by the user is first processed through speech-to-text technologies and then forwarded to the SSSC for the Sentiment Analysis classification task. To note that at this point the Semantic Sentiment Analysis Module takes over any other loaded module and any further sentence expressed by the user is processed for Sentiment Analysis only. The SSSC returns as output to the CC one among the positive, negative, or neutral class. The robot performs a different action according to the returned output class and then goes back in listening mode waiting for further input from the user to be processed for the Sentiment Analysis. To exit from the current behavior and to allow future user expressions activating other enabled modules as well, the user needs to simply say exit. Server-Side-Support Component (SSSC). The SSSC includes the Semantic Sentiment Analysis engine that has been developed following directions and insights of our previous works in [7; 8; 9; 10; 11; 12]. The engine has been significantly extended, augmented, tuned, and improved to achieve better performance in a general domain. The task we have addressed was the simple polarity detection: Given an input sentence, return whether the sentence expresses a positive, negative, or neutral sentiment. We have employed a Deep Learning approach for such a classification task using Recurrent Neural Networks (RNNs). We adopt a single model that uses LSTM units only and, at the same time, it keeps the ability of a CNN to learn the most effective features. In particular, we played with different word embeddings and our resulting approach is able to improve the pre-trained word embeddings at training time, by applying a new set of embeddings. The architecture of the proposed semantic sentiment analysis engine is based on a 2-layer Bidirectional LSTM with attention, as shown in [8]. As training and validation sets, we have considered the entire dataset released by the Semantic Sentiment Analysis challenge held at ESWC 2018 [13]: 90% of it has been used as the training set and 10% as the validation set. The evaluation has been carried out using nine different word embeddings provided by the organizers of the challenge and those pre-trained on Google News [14]. We trained each model twice: Once with the fine tuning and once without it. The resulting 20 networks have been ensembled using three different strategies: Majority voting, weighted average, and prudential multiple consensus. In Table 1 we show the results of the single models before and after performing the polarization of the embeddings. The ensemble strategies described above allow further improvements in the performance of the system. Table 2 shows the \(F_{1}\) score obtained by the different ensemble strategies on the final test set released by the challenge's organizers. The best results are obtained with the Majority Voting and Weighted Average strategy whose \(F_{1}\) is 0.967, beating all the competing systems participating in the Semantic Sentiment Analysis Challenge previously mentioned. The system has been developed in JAVA and employs the Stanford CoreNLP [15] for standard preprocessing tasks, such as sentence detection, tokenization, POS tagging, and stop-word removal.