Sentiment analytics can now be performed using Power Query and Azure Marketplace. In this blog, I am going to walk you through a very simple process of creating a function that can give you a sentiment score for a text. The first step is getting yourself signed up for a lexicon based sentiment analysis dictionary on azure marketplace. This is the link for https://datamarket.azure.com/dataset/aml_labs/lexicon_based_sentiment_analysis
Once you complete the free signup process, you will be able to carry out sentiment analysis on a text using Power Query and get a sentiment score. The manner in which the sentiment score is assigned is interesting. A fully positive sentiment in the text will be scored as 1, an absolute negative sentiment will be scored as -1 and a neutral sentiment will be assigned a zero value.
Now, browse to the OTHER RESOURCES tab in Power Query and select AZURE MARKETPLACE. You will then see a NAVIGATOR window fire up with lexicon based sentiment analysis API dictionary. When you double click the lexicon based sentiment analysis icon, a function called (fx) will fire up.
Now, click the function (fx) which will open up a textbox where you can enter any text. I have shown two examples where I have tried posting a sentence which conveys a positive sentiment and then another one which conveys a negative sentiment.
You can easily see for yourself from the results that a positive sentiment gets a score of one whereas the negative sentence gets a value of negative one. I have also highlighted the function "SCORE1" which we can use to get the scores for a larger dataset. This is just the beginning and we will try to understand the further details on sentiment analysis using PowerBI in the upcoming blogs.