Recognize language from text

更新时间:
复制 MD 格式

The Recognize Language from Text component identifies the language of a message and stores the result in a variable.

Component information

Icon

Name

从文本中识别语种@1x

Recognize Language from Text

Prerequisites

To configure this component, access the flow canvas by using an existing flow or creating a new one.

  • Go to the canvas of an existing flow

    In the Chat Flow > Flow Management > Flow Name

  • Create a new flow to open its canvas. For more information, see Create a flow.

Procedure

  1. On the canvas, click the Recognize Language from Text component icon to view the configuration pane on the right.

    The configuration pane lists available variables, such as incomingMessage, wabaId, wabaPhoneNumber, customerPhoneNumber, and customerName. In the basic settings area, select the variable to analyze (for example, incomingMessage) from the content identification drop-down list. Use the accuracy level slider to set the confidence threshold; a higher value indicates a higher confidence requirement. Select a fallback language, such as English. Select an output type, either isoCode639_1 or isoCode639_3, and enter an output variable name. When you finish, click Save.

  2. Configure the component parameters. For a detailed description of each parameter, see Parameters.

  3. After you finish the configuration, click Save. In the dialog box that appears, click Save.

Parameters

Parameter

Description

Content Identification

The input variable that contains the text you want to analyze.

Accuracy Level

The confidence threshold for language identification. A higher value requires greater certainty in the result.

Fall-back Language

The default language used when the message's language cannot be identified.

Output Type

The format for the output language code.

Example: If the identified language is English, the isoCode639_1 type returns en, and the isoCode639_3 type returns eng.

Output Path Variable

The name of the output variable that stores the identified language code.

Multi-branching Settings

When enabled, creates a separate execution branch for each specified language.

Appendix: Supported languages and their codes

Language

isoCode639_1

isoCode639_3

Arabic

AR

ARA

English

EN

ENG

German

DE

DEU

French

FR

FRA

Chinese

ZH

ZHO

Spanish

ES

SPA

Italian

IT

ITA

Turkish

TR

TUR

Hebrew

HE

HEB

Ukrainian

UK

UKR

Polish

PL

POL

Dutch

NL

NLD

Portuguese

PT

POR

Russian

RU

RUS

Thai

TH

THA

Korean

KO

KOR

Japanese

JA

JPN