Page 26 - MSDN Magazine, November 2017
P. 26
COGNITIVE SERVICES
From Text to Targeted
Sentiment Analysis with
Cognitive Services
Ashish Sahu
Human languages have evolved over many centuries and, as a result, tend to have complex rules to govern emotional expression. As practitioners of human languages, we typically rely on learning and various social conventions to master one or more languages and use them to express ourselves in different situations. The qualities and learnings are reflected in the responses we leave in various settings, including product reviews, survey responses in online and offline format, and the like. They follow the same language rules and provide a fascinating opportunity to test and advance the machine learning models that work on human language expression.
Today, social networks play a great role in shaping popular opinion. We participate in discussions on just about everything, express our thoughts and agree or disagree with each other for all of the world to see. These experiences also spill into our shopping habits and often we leave our views on things we buy and services we try in the form of reviews.
Because we can’t physically see and assess the things we want to buy online, we’re often left to others’ opinions to evaluate how durable or reliable they might be. These reviews may come with star ratings that offer a minimal convenience for sorting through them. However, the star rating doesn’t really provide an accurate picture of someone’s experience with a product or the quality of the product—sometimes they’re just unhappy that an item shipped later than expected.
That leaves us with just one option—to read through the exist- ing reviews and make an educated guess about what’s good and bad about the product in question. While that helps, it’s time-consuming and inefficient. Now, however, the Text Analytics and the Linguistic Analysis APIs, part of Microsoft Cognitive Services, can help.
Just like the other Cognitive Services, the Text Analytics and Linguistic Analysis APIs are hosted services. There’s no software you need to download, configure or train before you start using these artificial intelligence (AI)-based APIs to do amazing things.
The Text Analytics API can infer insights, such as the language of the text, key phrases being discussed and the sentiment expressed in the text. The Linguistic Analysis API, in contrast, enables the
This article discusses:
• Mining information from customer feedback using Microsoft Cognitive Services tools
• Using the Text Analytics API to find the language, key phrases and sentiment expressed in the text
• Using the Linguistic Analysis API to understand language concepts, structure and insights programmatically
Technologies discussed:
Microsoft Cognitive Services, Text Analytics API, Linguistic Analysis API
Code download available at:
bit.ly/2ic3ykZ
22 msdn magazine