, the following operations are performed in the order listed:
Determining the value of the
@Test String
: the result of the
@Slot
specified in the Source field is calculated.
If the value of the
@Test String
is a non-empty string, proceed to the next operation.
If the value of the
@Test String
has one of the following values, then the value False is written to the
@chat_language
variable:
Empty string;
An
@Expression
which value cannot be calculated;
Array;
Note: Arrays can be converted to strings using the string function, so they will be recognized by the slot.
Example: [ “hello”, “how”, “doing?” ] | string
Object;
Number;
Boolean;
Date.
Example 1:
Source:{{ variable }}, where variable does not exist in the
@Chat Context
.
Result:
@chat_language
is set to False
Example 2:
Source: {{ variable }}, where variable = " "
Result:
@chat_language
is set to False
Example 3:
Source: {{ variable }}, where variable = 123
Result:
@chat_language
is set to False
Example 4:
Source: {{ variable }}, where variable = ["hello","how are you doing?"]
Result:
@chat_language
is set to False
Determining the language and saving the result:
the system determines the possible languages
@Test String
;
the language with the greatest
@Language Detection Confidence Level
is determined:
if the
@Language Detection Confidence Level
exceeds the
@Language Detection Confidence Threshold
, then the name of the recognized language is written to the
@chat_language
variable.
Format: string Name of language in English.
Example:
Source : {{ variable }}, where variable = "Hi, how are you?"
Result:
@chat_language
contains Russian.
Note: The
@Language Detection Confidence Threshold
is calculated automatically by the system for each request.