Microsoft Conversational Language Understanding (CLU) NLU Integration

Turn raw text into structured meaning with the Jovo Framework integration for the conversational language understanding service from Microsoft.

Introduction

Microsoft CLU is a natural language understanding (NLU) service offered by Microsoft Azure. You can learn more in the official Microsoft CLU documentation.

You can use the Jovo Microsoft CLU NLU integration for projects where you receive raw text input that needs to be translated into structured meaning to work with the Jovo intent structure. Learn more in the NLU integration docs.

Installation

You can install the plugin like this:

$ npm install @jovotech/nlu-microsoftclu

NLU plugins can be added to Jovo platform integrations. Here is an example how it can be added to the Jovo Core Platform in app.ts:

import { App } from '@jovotech/framework';
import { CorePlatform } from '@jovotech/platform-core';
import { MicrosoftCluNlu } from '@jovotech/nlu-microsoftclu';

const app = new App({
  plugins: [
    new CorePlatform({
      plugins: [
        new MicrosoftCluNlu({
          endpoint: 'https://x.cognitiveservices.azure.com/',
          credential: 'your-key',
          libraryConfig: {
            taskParameters: {
              projectName: 'project-name',
              deploymentName: 'deployment-name',
            },
          },          
        }),
      ],
    }),
    // ...
  ],
});

To access the Microsoft CLU API, you need to provide an endpoint, credential, projectName and deploymentName.

Configuration

The following configurations can be added:

new MicrosoftCluNlu({
  endpoint: 'https://x.cognitiveservices.azure.com/',
  credential: 'your-key',
  libraryConfig: {
    taskParameters: {
      projectName: 'project-name',
      deploymentName: 'deployment-name',
    },
  },          
}),
  • endpoint: Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).
  • credential: Credential used to access your Cognitive Service API. Setting to a string (my-key) is the same as setting it to new AzureKeyCredential('my-key'). Can also be set to TokenCredential or KeyCredential.
  • fallbackLanguage: The language that gets used if the request does not come with a locale property. Default: en.
  • libraryConfig: Settings specific to the client libary used to call Azure CLU.

libraryConfig

To access the Conversaton Analysis Runtime API, you need to specify various parameters for the client SDK. Other parameters are optional.

taskParameters

Each request to the Conversation Analysis API is a task. Only projectName and deploymentName are required.

  • projectName: The name of the project.
  • deploymentName: The name of the deployment.
  • verbose: If true, the service will return more detailed information in the response.
  • isLoggingEnabled: If true, the service will keep the query for further review.

For other properties, see the ConversationTaskParameters interface.

Entities

You can access Microsoft CLU entities by using the $entities property. You can learn more in the Jovo Model and the $entities documentation.

The Microsoft CLU entity values are translated into the following Jovo entity properties:

{
  value: text, // what the user said
  resolved: resolved, // the resolved value
  id: resolved, // same as resolved
  native: { /* raw API response for this entity */ }
}