Share via


Cognitive Capabilities in U-SQL

Summary

Building intelligent features into applications requires some form of prediction capability. There are two ways to go: either build your own model or using a pre-trained model for scoring. Training a good model requires a lot of data and machine-learning expertise, both of which are rare commodities. To help, U-SQL packages many of the machine-learning models that power the Microsoft Cognitive Services. Built by some of the leading minds in the industry, these models are trained against massive data sets, and are highly performant and accurate. This integration of the cognitive models in U-SQL lets you easily add intelligent features, such as emotion detection, face and speech recognition; language understanding and sentiment analysis to applications that work on massive amounts of data.

Supported Cognitive Models

U-SQL provides built-in support for the following cognitive models, allowing you to build applications with powerful algorithms using just few lines of code:

Cognitive Model Description
Image Tagging (U-SQL) Image tagging returns information about visual content found in an image. It can be used along with descriptions and domain-specific models to identify content in an image.
Emotion Extraction (U-SQL) Emotion analyzes facial expressions in an image to detect a range of emotions, currently including anger, contempt, disgust, fear, happiness, neutrality, sadness, and surprise.
Face Detection (U-SQL) Face detects one or more human faces in an image, along with face attributes that contain machine learning-based predictions based on features such as age, emotion, and gender.
Optical Character Recognition (U-SQL) Optical character recognition (OCR) detects and extracts handwritten text from images of notes, letters, whiteboards and so forth, and returns a machine-readable character stream.
Key Phrases Extraction (U-SQL) Key phrases extraction identifies key phrases, topics, and language from the input text.
Sentiment Analysis (U-SQL) Sentiment analysis detects sentiment using classification techniques based on the input text.

Registering Cognitive Extensions in U-SQL

To get started with the Cognitive extensions, complete the following steps:

  1. Navigate to the Azure Portal and log in.
  2. Navigate to your Azure Data Lake Analytics Account.
  3. Select Sample Scripts near the top.
  4. Select ...More and then Install U-SQL Extensions in the Sample Scripts tile.
  5. Review the pop-up and then click OK.

Once you’ve chosen to install the extensions, the system will copy U-SQL extension-related files into the default Azure Data Lake Store (ADLS) associated with your ADLA account. A notification that files are being copied will appear near the Notification icon in the upper right of the page. When the files are copied, you’ll see an updated notification that the file copying was successful and that a special U-SQL Job was submitted to finish the registration. You can find the special job and its status by using View All Jobs in the upper-left corner of the Azure Portal. The Job normally will take a few minutes to complete.

At that point, you can discover what the job did by browsing the catalog for the master database. The job simply registers advanced analytic cognitive assemblies in the master database, which you can see by using the Data Explorer.

Seeing these assemblies in the master database is evidence that your ADLA account is setup correctly and you can now write a U-SQL script that uses cognitive functions to build intelligent applications.

See Also