Azure Translate
This Book enables document translation in Kognitos using Azure Translate.
Prerequisites
1. Learning the Translator Book
In order to work with these operations, you need to first learn the Translator Book in Kognitos. To do so:
- In the left sidebar, click on Books.
- In the search bar, search for Translator.
- Click on + Book. A pop-up window will appear asking to Add New Book. Click Add.
2. Azure Setup
These are prerequisite steps for configuration within Azure.
Create an Azure Storage Account
- Open the Azure Portal and go to Storage accounts from the menu.
- Click Create.
- Provide the necessary details, including:
- Subscription
- Resource Group
- Storage Account Name
- Region
- Under Performance, select Standard.
- For Redundancy, choose LRS (Locally Redundant Storage).
- In the Advanced tab, enable:
- Secure transfer
- Anonymous access to individual containers
- Storage account key access
- Review your settings, then click Review + Create to finalize.
Create a Container in Azure
- Navigate to your new storage account in the Azure Portal.
- In the left menu of the storage account, scroll to the Data storage section and select Containers.
- Click on + Container.
- Provide a name for your container.
- Set the level of anonymous access for the containers and blobs.
Create a Translator in Azure
- Open the portal menu and go to All Services.
- Search for "Translators". Select Translator under Azure AI services.
- Click on Create Translator.
- Fill in the Project Details and Instance Details for your translator.
- Click on Review + create.
- After your translator has been created, you will need to retrieve your translator key from Keys and Endpoint.
3. Connecting to the Translator in Kognitos
After the Book is learned and the translator infrastructure is set up in Azure, you’ll need to connect to the translator within the Kognitos platform. Add the following lines to your Playground or Processes to establish the connection.
Syntax
the department's translation engine is "azure"
connect to translator with
the translator name is "{translator name}"
the translator key is "translator key}"
the storage account name is "{storage account name}"
the storage account key is "{storage account key}"
the container name is "{container name}"
Parameters
translator name
: The name of the Azure translator.translator key
: The key for the Azure translator.storage account name
: The name of the Azure storage account.storage account key
: The key for the Azure storage account.container name
: The name of the Azure container.
Kognitos will attempt to connect to the translation service using the provided credentials. If the connection is successful, you can proceed with translation operations. Otherwise, please verify your credentials and try again.
Translating A Document
This operation translates the contents of a file into a target language.
Have you completed the setup?
Make sure all prerequisite steps are completed before proceeding with this operation.
Syntax
Two syntaxes are supported:
translate the document with
the target language is "{target language code}"
the target container is "{target container}"
the processing time limit is "limit}"
translate the document to "{target language name}"
Input Parameters
target language code
- The ISO 639-1 code of the target language.
- Examples:
fr
,en
,ja
- For supported codes, see Translator Language Support.
target language name
- The name of the target language.
- Examples:
hindi
,japanese
,english
- For supported languages, see Translator Language Support.
target container
(optional)- The container where the translated document will be stored.
processing time limit
(optional)- The maximum time limit for processing the translation in hrs/mins/secs.
Examples
Basic Translation
translate the document with
the target language is "fr"
translate the document to "hindi"
Translation with Optional Parameters
translate the document with
the target language is "id"
the target container is "documentation"
the processing time limit is "10 mins"
Updated about 1 month ago