Just last week we had the fantastic opportunity to present at Microsoft Ignite 2017 in the Gold Coast on Azure Cognitive Services – and we had an absolute blast of a time!
I co-presented with Kristina Rumpff who works at Microsoft in the Data Platform team as a Solution Architect. I focused on an overview of the suite of Azure Cognitive Services along with a deep dive into the Text Analytics service, and Krissy focused on the LUIS service coupled together with Azure Bots.
Fast Start to Azure Text Analytics Cognitive API’s
Leading up to, and since, the session I had a few people ask if there is anything pre-canned application wise which can call the Text Analytics API’s which they can just use.
The answer to that is kind of yes…
However apart from that I didn’t find anything else out there which people can quickly leverage to do this for them… so I wrote one!
UPDATE: I have since found this app handy myself when I need to quickly process a stack of once-off random text that someone sent to me for some other downstream reporting. (…AND this was a good chance to learn more c# coding!)
So lets see the application!
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
These are just some of the scenarios possible as described by Jennifer Marsman (Microsoft Principal Software Development Engineer). For those interested in this you can attend the Microsoft Data Science Summit on 26-27 Sep in Atlanta. See this info link – https://blogs.technet.microsoft.com/machinelearning/2016/09/07/artificial-intelligence-made-easy-cognitive-services-at-the-microsoft-data-science-summit/
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.
So lets get to scoring some sentiment!
I presented at our local Melbourne SQL Server User Group (SSUG) this week on Azure Cortana Intelligence Suite – and the integration with the Azure Data Catalog. If you are interested to see the presentation then have a look here – https://mrfoxsql.wordpress.com/presentations/
One of the things which stood out to me from attendees is that the number of new services and new cloud terms which are being introduced across the industry is sometimes difficult to keep track of – especially when you have a day job to do! Right now I cannot think of another time in IT where the rate of change is so dramatic.
More-so it can also sometimes be hard to know which services to use together to get the best architecture outcome.
So this blog post is aimed to explain at a high level the Azure Cortana Intelligence Suite of services and one example of how they could be deployed together in a cohesive architecture.
I will talk to each of these services in the context of a business solution to manage a farm of wind turbines!