Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

A Look at Cognitive Services

DZone's Guide to

A Look at Cognitive Services

Microsoft Azure's Cognitive Services packages a host of helpful, intelligent APIs for your app in the cloud that meshes machine learning and other tools with your vision.

· Cloud Zone
Free Resource

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

Recently, I've come across some complicated articles with respect to Cognitive Services, but as I've been working on this service for the last eight months, I thought of writing a simple, step-by-step article about it.

What Is Cognitive Services?

As defined, Cognitive Services provides the best suite for having an interactive, automated model of an application. It helps to build powerful intelligence into applications to enable natural and contextual interactions.

Microsoft Cognitive Services provide us the ability to build apps with powerful algorithms using just a few lines of code. It works across devices and platforms, and with continuous enhancement, it's easy to set up.

Cognitive Services (preview) comes with a series of APIs, which can be used to enable natural and contextual interaction within your applications. Cognitive Services offers Language, Speech, Vision, Search, and Knowledge APIs.

Language API

The Language API allows apps to process natural language, evaluate sentiment and topics, and learn how to recognize user needs.

Language Understanding Intelligent Service (LUIS)

LUIS helps an application understand commands from users. The LUIS API, as described by Microsoft, is designed to provide you with an easy way to create models, which allows your applications to understand user commands.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Cognitive Services — LUIS APIs.

Text Analytics API

This API seamlessly evaluates sentiment and topics to understand a user’s commands. The API, as described by Microsoft, is designed to detect sentiment, key phrases, topics, and language from your text. It is a suite of text analytics web services built with Azure Machine Learning. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Text Analytics API.

Web Language Model API

The Web Language Model API, as described by Microsoft, uses the power of language models trained on web-scale data. Also, it automates a variety of standard, natural language processing tasks named as state-of-the-art language modeling APIs.

  • Word combination probability: Calculates the joint probability that a specific word sequence will appear together.

  • Word sequence probability: Calculates the conditional probability that a particular word will follow a given sequence of words.

  • Predictive text: Gets a list of words (completions) most likely to follow a given sequence of the words. 

  • Word breaking: Inserts spaces into a string of words that lack spaces, such as a hashtag or a part of a URL.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Web Language Model API.

Bing Spell Check API

The Bing Spell Check API, as described by Microsoft, helps users correct spelling errors, recognize the differences among names, brand names, and slang, and understand homophones as they type. Also, it detects and corrects spelling mistakes within your app.

Let's see some examples of word breaks — in this case, how to correct word-breaking issues with a single flag.

single


And the JSON response:

single


As for slang, the API easily recognizes informal language.
single


And the JSON response:
single


It even provides proofreading capabilities:
single





Again, the JSON response:
single

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Bing Spell Check API.

Translator Text API

The Translator Text API, as described by Microsoft, is a cloud-based automatic translation service supporting multiple languages. It easily conducts real-time text translation with a simple REST API call. The Translator API can be used to build applications, websites, tools, or any solution requiring multi-language support.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Translator Text API.

Speech

It’s all about processing spoken language in your applications.

Bing Speech API

Bing Speech APIs, as described by Microsoft, enable speech capabilities on all Internet-connected devices. Every major platform, including Android, iOS, Windows, and third-party IoT devices are supported.

It offers speech-to-text, text-to-speech, and language understanding capabilities delivered through the cloud.

Microsoft uses Bing Speech API for Windows applications like Cortana and Skype Translator, as well as Android applications like Bing Torque for Android Wear and Android Phone.

It offers:

  • Speech recognition

    • Converts spoken audio to text in real time, irrespective of the audio source.

    • Supports real-time streaming.

  •   Speech intent recognition

    • Converts spoken audio to intent that drives actions as programmed.

    • Using LUIS models, it parse the intent of the speaker to create actions within the application.

  • Text to speech conversion

    • Converts provided text to spoken audio.

    • Plays an important role when applications need to “talk” to (or talk back to) their users.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Bing Speech API.

Speaker Recognition API

The Speaker Recognition API, as described by Microsoft, uses speech to identify and authenticate the individual speakers. It gives your app the ability to know who is talking.

Speaker Verification

This is your feature for voice authentication. It verifies speakers through a simple pass phrase.

Speaker Identification

It identifies speech with its speaker. It compares the speech from a group of known speakers. It also plays the part of a super intelligent speaker identification tool in our application.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Speaker Recognition API

Translator Speech API

The Translator Speech API, as described by Microsoft, is a cloud-based automatic translation service. The API enables developers to add end-to-end, real-time, speech translations to their applications or services. It easily adds speech translation to your app, optimized for real-life conversation.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Translator Speech API.

Vision

Image processing algorithms help you automate content moderation and build more personalized apps by returning smart insights about faces, images, and emotions.

Face API

The Face API, provided by Microsoft Cognitive Services, helps to detect, analyze, and organize the faces in a given image. We can also tag faces in any given photo. It provides the most mature face algorithms to work with, adding super cool intelligence when building applications.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services Face APIs.

Emotion API

The Emotion API, as described by Microsoft, creates apps that respond to moods, recognize feelings, and get personal with users. Using facial expressions, this cloud-based API can detect happiness, neutrality, sadness, contempt, anger, disgust, fear, and surprise. The artificial intelligence algorithms detect these emotions based on universal facial expressions, functioning even cross-culturally.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Emotion APIs.

Computer Vision API

The Computer Vision API, as described by Microsoft, extracts rich information from the images to categorize and process visual data and protect your users from unwanted content. It can:

  • Analyze an image; i.e., getting information about the visual content found in an image.
  • Generate thumbnails: Generate high-quality thumbnails based on any input image.
  • Read text in the images: With optical character recognition (OCR), one can detect text in an image. One can take photos of the text instead of copying to save time and effort.
  • Recognize celebrities: Recognizes 200,000 celebrities from business, politics, sports, and entertainment around the world. It is a continuously evolving feature within Computer Vision API.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Computer Vision API.

Content Moderator

Content Moderator, as described by Microsoft, protects your brand and users with automated image, text, and video moderation services and human review tools.

Powered by intelligent machine learning, Microsoft Content Moderator automatically filters out offensive content in images, text, and video across platforms and includes human review tools for more nuanced cases.

It offers:

  • Image moderation API:
    • Assess images for offensive and unwanted content.
    • Supports differing file types, including altered images.
    • Includes optical character recognition (OCR).
    • Also includes face detection.
    • Implements fuzzy matching against custom available lists.
  • Text moderation API:
    • Detects obscenity in provided text.
    • Supports more than 100 languages.
    • Automatically matches text against custom lists.
    • Checks for malware and phishing URLS.
    • Also supports checks for personally identifiable information (PII).
  • Video moderation API:
    • Proactively detects against adult content in videos.
    • Azure Media Services handles moderation in the cloud.
  • Human Review Tool beta
    • Review tools let us review automated results and approve or change tags to override the automated results.
    • As it uses machine learning and custom lists for moderation, the process gets smarter while using it.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Cognitive Services — Content Moderator API.

Knowledge

It maps complex information and data in order to solve intelligent recommendations and semantic search use cases.

Recommendations API

Recommendations API as described by Microsoft, is designed to provide personalized product recommendations for your customers and improve sales in your store.

For pricing, provisioned region and other key details, read Getting Started with Microsoft Azure Cognitive Services - Recommendations API

Academic Knowledge API

The Academic Knowledge API, as described by Microsoft, explores relationships among academic papers, journals, and authors. Also, it taps into the wealth of academic content in the Microsoft Academic Graph using the Academic Knowledge API.

Interpret

Interpret is a natural language user query string. Get annotated interpretations to enable rich search-box auto-completion experiences that anticipate what you are typing.

Evaluate

Evaluate a query expression and get Academic Knowledge entity results.

Calchistogram

Calculate a histogram of the distribution of attribute values for the academic entities returned by a query expression, such as the distribution of citations by year for a given author.

For pricing, provisioned regions, and other key details, read Getting Started with Microsoft Azure Cognitive Services — Academic Knowledge API

Summary 

Now you've seen how easy is to get started with Cognitive Services. I would highly encourage you to get started with these super intelligent APIs and come up with an intelligent application.

I hope you enjoyed this tutorial. If you have any questions or any interesting use cases or suggestions, please comment below. Knowledge grows by sharing! Don't forget to share this article. If it has helped you, it will also help others!

Thank you! Happy Azure coding!

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.

Topics:
cognitive computing ,cloud ,microsoft azure ,natural language processing ,machine learning

Published at DZone with permission of Kasam Shaikh. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}