Azure Cognitive Services is relatively new functionality within Azure that exposes some truly amazing APIs that have the ability to do some truly amazing things.
Before I dive into SQL and DLL code to make use of Cognitive Services, lets take a second to understand what I am talking about – imagine this;
- A customer walks to an electronic kiosk in a shopping centre and says “Hi Cortana, I want to book a holiday, I really need a break from this bad weather. Any ideas on where I should go?“
- The kiosk is run by a “bot” capable of conversing in 30 languages and which has been trained on understanding context and intent.
- It recognises you as a 35 yo male who looks and sounds unhappy, and because it recognises your face and voice it knows it has talked to you before in another shopping centre last week when you asked for directions to a Surf Shop clothing store.
- It also recognises a beach image on your T-Shirt, making note of the link between your previously asked directions and your clothing.
- As you spoke in English, it replies in English – “Good to see you again. Now, would you consider a beach holiday to Bali or Thailand?” – Why beach? Well the recommendations engine has determined that is where 35yo male surfer types go when the local weather is bad!
- You negotiate a package using natural language, and close out the conversation.
- The “bot” visualises your increased sentiment from the initial baseline and says “I’m glad I could make your day better! Enjoy your flight next week!“
It may sound futuristic – but this is exactly what Cognitive Services (API’s) can do right now – and in my example I have only used 6 out of the 21 Azure Cognitive Services! Microsoft Research has built these powerful Azure ML Models and wrapped them up into a single, simple, consumable publicly available API.
Some other amazing deployments for Cognitive Services…
- At a trade show, or even a window display at a shopping centre, a company could use emotion detection to see how people are reacting to their products.
- Facial recognition could be used to find missing children quickly at an amusement park.
- The APIs can determine the male:female ratio and ages of patrons at a nightclub, and identify VIPs or banned guests.
- The object recognition capabilities can enable a blind person to read a menu in a restaurant or have their surroundings described to them
For those not familiar with Azure Cognitve Services APIs, check out this link which has online demos you can try – https://www.microsoft.com/cognitive-services/en-us/apis
For those not familiar with the Azure Bot Framework, check out this link – https://dev.botframework.com/
Anyway – despite all this, for this post today we’ll just focus on something pretty simple – making usage of the Text Analytics API right within SQL Server 2016.
And so, lets get to scoring some sentiment!