One again checking my RBloggers list of entries. It is always possible to discover something new, interesting and valuable there. This time one link was particularly attention grabbing must check. It was from the Revolutions Blog, which is daily entry blog about open source R for big data analytics, predictive modeling and data science, and about how to call Cognitive Services APIs with a R programming studio IDE.
It went along these lines:
How to call Cognitive Services APIs with R
Microsoft Cognitive Services is a set of cloud-based machine-intelligence APIs that you can use to extract structured data from complex sources (unstructured text, images, video and audio), and add “AI” type features to applications. A good example is the “Seeing AI” glasses in the video below: the image descriptions, emotion inference, and text recognition are all driven by Cognitive Services APIs.
You can call these APIs from any application, including R. Here are a few examples:
- In a blog post a few months back, I called the Face API from R to determine the apparent gender of programmers according to their GitHub avatar.
- The Economist used the Emotion API to track the emotions of the US presidential candidates during the debates.
- Shohbit at the Big Data Enthusiast blog used the Text Analytics API to chart the sentiment of tweets from the candidates.
There’s no official R package (yet!) for calling Cognitive Services APIs. But since every Cognitive Service API is just a standard REST API, we can use the httr package to call the API. Input and output is standard JSON, which we can create and extract using the jsonlite package.
One nice link in this post directed us to another WordPress Blog candidate for frequent re-posts here at The Information Age. Big Data Enthusiast Big Data Enthusiast is the blog’s name and the link is here: Microsoft Cognitive Services (Text Analytics API) in R
Shohbit has also published a step-by-step guide to calling Cognitive Services APIs from R, with several examples of using the Text Analytics API. The details are at the link below. To get started, all you’ll need is to register for a Cognitive Services API key. Rate-limited keys (more than enough to test out the service) are free, and you can register using your GitHub account.
This post is 1 month old. But I thought it to be a good rewind up for the end of this week. It is also important to keep it close to our entry point for 2017.