Blog: Can We Represent Emotions Using Machine Learning?
As humans, we have a higher emotional intelligence compared to other living beings. We feel various types of emotions in different ways. Such as happiness, sadness, pride, loneliness. The experience of these emotions is also unique to each person. We also have different languages and words to express our emotions and share them with others. But, sometimes you might feel words are not enough to express the way you feel. And some languages use different terms to express different emotions which they do not have a direct translation too. For instance, in Japanese “物の哀れ”- “Mono no aware” has various meanings. Empathy toward things, awareness or sensitivity to things which exists, gentle sadness of understanding the reality of life are some meanings of it.
Emotions are hard to express and hard to understand too. If we can use artificial intelligence to analyze our emotional data from different sources. We can use it to get an optimal decision for specified goals for given requirements.
Analyzing Emotional Intelligence is named as Sentiment Analysis.
Subjective analysis, Opinion extraction, Opinion mining, sentiment mining are synonyms used to explain the same area. Sentiment analysis can be used in various ways. As explained earlier, to identify emotions in various sources. To state it more clearly, we can use this sentiment analysis to get results. Including entertainment reviews, public sentiments on certain products or incidents, predictions, and forecasting.
How to do this Sentiment Analysis?
There are generally 2 ways to continue with sentiment analysis.
1. Lexicon Base Approach
In this approach, a given text is split into smaller tokens. Words, phrases or even sentences can be a single unit of a token. Thus, a given sentence can split into words. Or a given paragraph can split into separate sentences as the need. This process is called tokenization. Each token is counted to identify the number of times it has appeared. This is the Bag of Words model. A lexicon database needs to be created. It is used to give an emotional value for the tokens and has been pre-recorded earlier. The tokens are checked for the subjectivity according to the lexicon database. In fact, it is easier to analyze the overall subjectivity of the given text.
2. Machine Language approach
If we have a set of texts, let’s say a set of tweets that are labelled according to the sentiment, we can train a model. So that if we get a new text, based on the trained model we can assign or retrieve the sentiment which it belongs.
Which approach do you think is better?
Although, the lexicon-based approach is easier, the machine learning approach can achieve higher accuracy. There are instances such as sarcasm which seems to be a one meaning but it is actually has a hidden meaning. Using the machine learning approach, including deep neural networks, we can train the model to understand these complex emotions . Because it created the abstract representation of the trained model and analyzed with the given scenario.
Indeed, It is a challenge to create a system which achieves the complete accuracy. But it is possible to achieve a higher accuracy using machine learning approach.