INTRODUCTION :

Microsoft Cognitive Services (formerly Project Oxford) are a set of RESTFul web APIs, SDKs and services available to developers to make intelligent, engaging and discoverable applications.

Further expanding the evolving portfolio of machine learning APIs with a vision for more personal computing experiences and enhanced productivity aided by systems that increasingly can see, hear, speak, understand and even begin to reason

Enabling developers to easily add intelligent features such as

Emotion and video detection; Facial, Speech and Vision recognition; Speech and Language understanding Image Analysis Web Searches Sentiment Analysis Entity Linking and much, much more!

I was so fascinated with the features provided, that I decided to write a Powershell module for Cognitive services ( And trust me this is just the Beginning 🙂 ) so that people can utilize it further in their day to day work and life.

FUNCTIONALITIES :

Following are the functionalities I’ve written till date in my module for Powershell cognitive services known as ProjectOxford

Get-EntityLink – Recognizes a named-entity from given text and aligning a textual mention of the entity to an appropriate entry in a knowledge base, like Wikipedia.



Get-ImageAnalysis – Returns information on visual content found in web hosted images. Like Color schemes, Face rectangles, Tags, caption (Small description of Image), head counts, Age & gender of people in Image, celebrity identification and much much more.



Get-AgeAndGender – Returns Age and Gender of Faces identified in a local Image, and capable to draw rectangle around the faces in the image denoting their Age and Gender



Get-KeyPhrase – Recognize Key phrases in a given text or string and Documents. Saves lots of time and avoid reading long documents 🙂



Get-Emotion – Capable to detect the Emotion on the Faces identified in an Image on local machine, , and capable to draw rectangle around the faces in the image denoting their Emotion



Get-Celebrity – Capable to identify the Names and total numbers of Celebrities in a web hosted Image. It can identify many celebs from fields like Movies, Sports, Politics.



Get-ImageText – Capable of extracting text from the web hosted Images, you need to just pass the Image URL as a parameter to this function and it will do the work for you.



Get-News – Returns NEWS items and headlines depending upon the categories you provide as a parameter, like Sports, Entertainment, Politics etc.



Get-Sentiment – Recognizes Sentiment in an input string, that is positiveness or Negativeness in the string context.



Invoke-SpellCheck – Identify and Rectify spelling mistakes in an input String and display errors. Also generates all possible permutations of the correct sentence with correct spellings.



Search-Bing – Provides capability to search Bing and facilitate bing results in the powershell

console.



Split-IntoWords – Provides capability of Inserting spaces in words that lack spaces, like URLS, Hashtags etc.



Test-AdultContent –

Identifies any Adult or Racy content on a web hosted Image and flags them with a Boolean value [$true/$false]





PREREQUISITES :

You need to do one-time registration for each Microsoft Cognitive Services API from HERE, before start using the module, because it won’t work without an API Key.

I would suggest to Save the API Keys into your Powershell $Profile so that it automatically loads every time the console is fired.

Below is a screenshot on – how to keep the API keys in your $Profile to make your life a bit easy

MODULE INSTALLATION :

You can directly Install-Module from the PowerShell Gallery if you’ve the PowershellGet module, like in the below screenshot.

Below is the step how to download and install the module on your machine using Powershell.

POWERSHELL SCRIPTS AND HELP :

If you are willing to review code please follow the below link to my GitHub Profile – https://github.com/PrateekKumarSingh/ProjectOxford

And to understand each function in the module better you can use Get-Help FunctionName to view the Synopsis, Description

And Examples –

Let me know your Feedback or in case you come across any bugs. Hoping you find it useful 🙂

Prateek Singh