Microsoft Azure SDK for Node.js - Cognitive Services Text Analytics
This project provides a Node.js package that makes it easy to work with the Microsoft Azure Cognitive Services Text Analytics API. Right now it supports:
- Node.js version: 6.x or higher
How to Install
npm install azure-cognitiveservices-textanalytics
How to use
Create a Cognitive Services Account(ex. Text Analytics)
const msRestAzure = ; const CognitiveServicesManagement = ; let client; let createAccount = msRestAzure;
List the keys from the created account
let serviceKey; createAccount;
Create credentials
const CognitiveServicesCredentials = CognitiveServicesCredentials; // Creating the Cognitive Services credentials// This requires a key corresponding to the service being used (i.e. text-analytics, etc)let credentials = serviceKey;
Text Analytics API
const TextAnalyticsAPIClient = ; let client = credentials;let input = documents: 'id': "1" 'text': "I had a wonderful experience! The rooms were wonderful and the staff was helpful." let operation = clientoperation;
More Detailed Information
https://azure.microsoft.com/en-us/try/cognitive-services/ under "Language"