Microsoft Connect(); 2018 : Cognitive Services Container LUIS support & Custom Translation in Translator

[日本語版はこちら]

At Microsoft Connect(); 2018 event, these cognitive-related news announced;

  • Cognitive Services Container offers Language Understanding (LUIS) service for use in your container
  • Custom translation available for Translator Text

Azure Updates > Language Understanding Container Support: Preview Azure Updates > Custom Translation capability of Text Translator

Language Understanding (LUIS) Container

How to use

Prerequisite

 - Container Services

You can use these Docker environments:

  • Local on Windows*/macOS/Linux (*be configured to support Linux containers on Windows)
  • Azure Kubernetes Service
  • Azure Container Instances
  • Kubernetes cluster deployed to Azure Stack

This time I introduce it with Docker in local PC (Windows).

 - LUIS subscription from Azure Portal

It's OK to use free F0 tier.
Please get endpoint (access URL) and API key, which is for billing when you use it in container. (No data except count usage shouldn't be send to Microsoft.)

- LUIS App

Language Understanding is instant NLP services (modeling GUI tools and APIS for its management and use).
Once you congfigure LUIS App (NLP model), you can export it locally for container.
Store into local folder where Docker can access.

 

Configure and use LUIS in container

Copy and download LUIS container to local

Using docker command, pull LUIS container image with "latest" option.
docker pull docker pull mcr.microsoft.com/azure-cognitive-services/luis:latest

Run LUIS container

Run LUIS image with your downloaded LUIS app.
docker run --rm -it -p 5000:5000 --memory 4g --cpus 2 --mount type=bind,src=c:\demo\container\luis,target=/input --mount type=bind,src=C:\demo\container\luis,target=/output mcr.microsoft.com/azure-cognitive-services/luis Eula=accept Billing=https://westus.api.cognitive.microsoft.com/luis/v2.0 ApiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This is sample to set parameters as:

  • Port 5000, 2 CPU, Memory 4GB
  • Mount LUIS App in input folder (c:\demo\container\luis in this case)
  • Save log in output folder (c:\demo\container\luis in this case)
  • Billing (set your endpoint copied from Azure Potal - West US in this case)
  • ApiKey (set your ApiKey copied from Azure Portal)

Try LUIS container

Once docker image started, you can access using browser at https://localhost:5000

See swagger (https://localhost:5000/swagger), and you can try analyzing natural sentence by LUIS container.

 

In detail

Microsoft Azure Blog > Getting started with Cognitive Services Language Understanding container Github > Azure Samples - Container support for Azure Cognitive Services