Detect Key Phrases in Text v1.0.0 Help
Inspects text for key phrases and returns information about them. Refers to Named entity recognition (NER).
How can I use the Step?
The Step lets you analyze the context of unstructured text and find key phrases. So you can highlight essential items and extract key concepts from the document.
How does the Step work?
A key phrase is a noun phrase that refers to the particular thing, keyword, or concept found in the text. A key phrase can be a single word or a group of words.
For example, "cat" is a noun; "tabby cat" is a noun phrase consisting of the adjective ("tabby") and the noun ("cat").
In addition, the Step assigns a confidence score to each key phrase found in a text. This score indicates confidence that the detected string is a noun phrase. To learn more, see the Output example.
Input settings
To set up the section, take the following steps:
- In the Input text field, provide text to analyze. You can enter text manually or use the Merge fields here.
- In the Input language list, select the language that matches the input text.
Input text
The input text must be a UTF-8 string. The string must contain at least one character. The maximum string size is 100 KB.
Input language
The Step can identify the dominant language of the input text automatically. So if you do not know the language of the input text, leave the default value Any supported
for this setting.
The Step supports the following languages:
- German
- English
- Spanish
- Italian
- Portuguese
- French
- Japanese
- Korean
- Hindi
- Arabic
- Chinese (simplified)
- Chinese (traditional)
Output and exit behavior
To set up the section, take the following steps:
- In the Confidence threshold field, provide the threshold value used as a rule for treating found key phrase as confident.
- Turn on the Use a separate exit for low confident results toggle to handle results with a confidence score below the confident threshold in a separate exit.
Merge field settings
The Step returns the result as a JSON object and stores it in the Merge field variable. Thus you can access the output JSON object from any point of your Flow.
Output example
The Step's output contains information about each detected key phrase, including its confidence score, start and end points in the text.
For example, using default settings and input text "From tabby cat to Scottish Fold back and there again," the Step returns the following JSON object:
{
"phrases": [
{
"score": 0.9945607781410217,
"text": "tabby cat",
"beginOffset": 5,
"endOffset": 14
},
{
"score": 0.9947488307952881,
"text": "Scottish Fold",
"beginOffset": 18,
"endOffset": 31
}
],
"count": 2,
"first": {
"score": 0.9945607781410217,
"text": "tabby cat",
"beginOffset": 5,
"endOffset": 14
}
}
{
"phrases": [
{
"score": 0.9945607781410217,
"text": "tabby cat",
"beginOffset": 5,
"endOffset": 14
},
{
"score": 0.9947488307952881,
"text": "Scottish Fold",
"beginOffset": 18,
"endOffset": 31
}
],
"count": 2,
"first": {
"score": 0.9945607781410217,
"text": "tabby cat",
"beginOffset": 5,
"endOffset": 14
}
}
Error Handling
By default, the Step handles errors using a separate exit. So if any error occurs during the Step execution, the Flow proceeds down the error
exit.
Note: If you disable the Handle error toggle, the Step does not handle errors. With this setup, if any error occurs during the Step execution, the Flow fails immediately after exceeding the Flow's timeout. To prevent the Flow from being suspended while continuing to handle errors in the Flow, place the Flow Error Handling Step before the main Flow logic.
Reporting
The Step reports once after its execution. You can change the Step log level and add new tags in the section.
Log level
By default, the Step inherits its log level from Flow's log level. You can change the Step's log level by selecting an appropriate option from the Log level list.
Tags
Tags help organize and filter session information when generating reports. You can specify the tag category, label, and value when adding a new tag.
Service dependencies
- flow builder - v2.28.3
- event-manager - v2.3.0
- deployer - v2.6.0
- comprehend provider - v0.9.0
Release notes
v1.0.0
- Initial release