Detect Language

Estimated reading: 4 minutes 1634 views

This activity analyzes the provided input text and determines its primary language and returns the detected language as output.

Technical Reference

Configuration

Once the integration is connected from the Manager, the property panel will automatically display the connected integration.
If you see the message “Add new connection”, click here to learn how to set up a new connection.

Below are the properties available after the project has been integrated:

Provider: This parameter indicates the account name associated with integration.

Model Type: Specifies to choose the list of models available for GEN AI integration.

Input

DelayAfter: It assists the user to add a delay before initiating subsequent activities. The delay duration here is in milliseconds. By default, it is set to “500” milliseconds. When the option is left blank, the delay will not be considered.

DelayBefore: It assists the user in adding a delay before starting the execution of the activities. The delay duration here is in milliseconds. By default, it is set to “500” milliseconds. When the option is left blank, the delay will not be considered.

Text: *Specifies the input text for language detection. It accepts values either as a string enclosed in double quotes or as a string variable.

Test: Selecting this option opens the Co-Pilot assistant, allowing you test the provided input and view the output simultaneously.

Timeout: Specifies the maximum time allowed for the activity to execute. If the connection is not established within this period, an exception will be thrown. By default, it is set to “30000” milliseconds. 

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”
True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It indicates the version of the feature being used. 

Output

Detected Language: Returns the detected language as a string variable.The output is returned as a JSON object, formatted as a string. It includes the original input along with the translated results categorized by language.

Result: This parameter allows you to view the execution status of the activity and returns a value in “Boolean”.
True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown. 

* Represents mandatory fields to execute the workflow. 

How It Works

The activity analyzes the input text and determines the language based on linguistic patterns and vocabulary usage.

Example:

Input:

“Address of the employee is No.12, rue de la Mémoire, Venise, Italie.
La dirección del empleado es No.12, rue de la Mémoire, Venecia, Italia.
Die Adresse des Mitarbeiters ist Nr.12, rue de la Mémoire, Venedig, Italien.
L’indirizzo del dipendente è n.12, rue de la Mémoire, Venezia, Italia.”

Processing:

The text includes different languages and detects all the language and returns the output as below, 
{
“Input”: “Adresse de l’employé : No.12, rue de la Mémoire, Venise, Italie. \nLa dirección del empleado es No.12, rue de la Mémoire, Venecia, Italia.\nDie Adresse des Mitarbeiters ist Nr.12, rue de la Mémoire, Venedig, Italien.\nL’indirizzo del dipendente è n.12, rue de la Mémoire, Venezia, Italia.”,
“Output”: {
“French”: “Adresse de l’employé : No.12, rue de la Mémoire, Venise, Italie.”,
“Spanish”: “La dirección del empleado es No.12, rue de la Mémoire, Venecia, Italia.”,
“German”: “Die Adresse des Mitarbeiters ist Nr.12, rue de la Mémoire, Venedig, Italien.”,
“Italian”: “L’indirizzo del dipendente è n.12, rue de la Mémoire, Venezia, Italia.”
}
}

Share this Doc

Detect Language

Or copy link

CONTENTS