Skip to content

Azure Text Analytics

Element Name: Azure Text Analytics

Category: Cognitive

Description: A collection of cognitive service functions for language that extract, classify, and understand text within documents.

Functionality: Retrieving raw text data, such as identifying essential phrases or personally identifiable information (PII), synthesizing textual content, and recognizing and categorizing named entities is a key function. It is widely used to determine the language of a given text.

For its configuration, the following parameters must be taken into account:

Action Configuration Field (Required)

[Name] Unique configuration box descriptor for the purpose of identifying a name in the flow.

[Operations] A dropdown list where the corresponding option should be selected.

  • Detect language: It is a pre-configured feature that allows detecting the language in which a document is written.

  • Analyze Sentiment: These are pre-configured features that help determine what users think about your brand or a topic by applying sentiment analysis.

  • Extract key phrases: It is a pre-configured feature that assesses and returns the main concepts from unstructured text and returns them as a list.

  • Recognize named entities: It is a pre-configured feature that classifies entities (words or phrases) in unstructured text into various predefined category groups.

  • Recognize PII entities: It is a pre-configured feature that identifies, classifies, and redacts confidential information in unstructured text documents and conversation transcripts.

  • Recognize linked entities: It is a pre-configured feature that disambiguates the identity of entities (words or phrases) found in unstructured text and returns links to Wikipedia.

Note: For more detailed information on the points mentioned, please visit the Azure page. https://learn.microsoft.com/es-es/azure/ai-services/language-service/overview

[Expression to Evaluate]: A string type field where you should enter what you want to evaluate within single quotation marks.

[Cognitive Services Endpoint]: In this field, you should define the endpoint of Azure services, which is a URL that can be obtained from the Azure Cognitive Services console under the Keys and Endpoint section.

[Cognitive Services Key]: In this field, you should define the key for Azure services, which is a string of characters that can be obtained from the Azure Cognitive Services console under the Keys and Endpoint section. It provides two options, key1 and key2, both of which are viable.

[Entity where the evaluation result will be deposited] In this field, you should specify the entity (previously created) in which you want to deposit the result returned by the API.

[Intention to execute in case of an error. The action flow will be interrupted, and the error description will be passed to the selected intention with the name: 'AZURETEXTANALYTICS_ERROR'.] Dropdown list where you should select the entity name for error handling.

Example of implementation

In the following example, the required configuration to detect the language of a text is described.

-- Prerequisites:

Access to the Azure console for obtaining keys and URL

--Input:

Name: AzureTextAnalytics

Operation: Detect Language

Expression to evaluate: 'Hello'

Cognitive services endpoint: https://xxxxxx/

Cognitive services key: xxxxxxxxxxxxxxxxxx

The entity where the evaluation result will be deposited: entidad1

The intention to execute in case of an error. The action flow will be interrupted, and the error description will be passed to the selected intent with the name: 'AZURETEXTANALYTICS_ERROR': Error_Handler

-- Result:

    {

        "Name": "Spanish",

        "Iso6391Name": "es",

        "ConfidenceScore": 1,

        "Warnings": []

    }

At the end of the session, language detection will be displayed in the simulator as per the writing.