Use AI natural language processing to quantify the emotion and opinion expressed in text.
The Sentiment analysis module is an opinion mining system based on natural language processing and machine learning that aims at quantifying the sentiment and emotions wrapped in a piece of text. This system takes a batch of sentences, processes it and assigns a sentiment score to each sentence, ranging from -1 (very negative) to +1 (very positive).
First of all, we need to split the input sentence into tokens. Then, we must transform each sentence into a language understandable by the machine. After that, we use a deep neural network architecture, the bidirectional GRU with Attention, to represent the sentence with a single vector that carries the information necessary to run the regression and assign a sentiment score.
Finally, the last layer of the model performs the regression task, by computing the sentiment score from the previously built sentence vector.