Skip to content

Detect & Extract Entities from Text v1.0.6 Help

Inspects text for named entities 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 input text and find information about events, locations, organizations, brands, and more. You can use the Step to add a Named entity recognition (NER) logic to your Flow to filter inputs and build automation solutions for text processing.

How does the Step work?

A named entity is a text reference to an abstract or real-world object, such as a person, location, organization, product, date, quantity, etc.

For example, in the text "John Doe books flights to New York for July 4th." the Step recognizes "John Doe" as a Person, "New York" as a Location, and "July 4th" as a Date.

In addition, the Step assigns a confidence score to each named entity found in a text. This score indicates confidence that the Step correctly identified the named entity type. See the Output example to learn more.

Input settings

To set up the section, take the following steps:

  1. In the Input text field, provide text to analyze. You can enter text manually or use the Merge fields here.
  2. In the Input language list, select the language that matches the input text.
  3. In the Entity types list, choose the named entity types you want to extract from the 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 handle the task without specifying input language. 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)

Entity types

This Step uses a set of entity types, which you can find in the following table:

TypeDescription
commercialItemA branded product
dateA full date (for example, 11/25/2017), day (Tuesday), month (May), or time (8:30 a.m.)
eventAn event, such as a festival, concert, election, etc.
locationA specific location, such as a country, city, lake, building, etc.
organizationLarge organizations, such as a government, company, religion, sports team, etc.
otherEntities that don't fit into any of the other entity categories
personIndividuals, groups of people, nicknames, fictional characters
quantityA quantified amount, such as currency, percentages, numbers, bytes, etc.
titleAn official name given to any creation or creative work, such as movies, books, songs, etc.

Datetime settings

The Datetime feature converts dates found in the text from one timezone to another and returns the converted date in a selected date and time format.

To set up the section, follow these steps:

  1. For Timezone, select input and output timezones for date conversion.
  2. For Output format, select the date and time format and specify options that suit your application.

Output and exit behavior

To set up this section, do the following:

  1. For Use "found" exit, select the condition on which the Flow proceeds down the found exit.
  2. For Output data options, select the appropriate options to configure the output structure.
  3. In Output data structure, ensure the output structure suits your application.

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. To learn more about this Step's output, see the Output example.

Skip logic exit

Use this setting to handle cases where duplicate Merge field variable names exist in your Flow, whereas the previously defined variable holds value.

By default, in such cases, the Step overwrites the existing variable with the new value. Another option is to skip the Step execution and direct the Flow down the selected exit. To do so, follow these steps:

  1. Enable Skip step execution if existing merge field has data toggle.
  2. In the Skip logic exit list, select exit to direct the Flow.

Output example

The Step's output contains information about each detected named entity, including its type, confidence score, and start and end points in the text.

For example, using the input text "Bob ordered two sandwiches and three ice cream cones today from a store in Seattle," the Step returns the following JSON object:

json
{
  "count": 5,
  "byOrder": [
    {
      "score": 0.9992457628250122,
      "type": "person",
      "text": "Bob",
      "beginOffset": 0,
      "endOffset": 3
    },
    {
      "score": 0.9980383515357971,
      "type": "quantity",
      "text": "two sandwiches",
      "beginOffset": 12,
      "endOffset": 26
    },
    {
      "score": 0.9955368041992188,
      "type": "quantity",
      "text": "three ice cream cones",
      "beginOffset": 31,
      "endOffset": 52
    },
    {
      "score": 0.9819453358650208,
      "type": "date",
      "text": "today",
      "beginOffset": 53,
      "endOffset": 58,
      "formattedDate": "Invalid date",
      "isValid": false
    },
    {
      "score": 0.9978232383728027,
      "type": "location",
      "text": "Seattle",
      "beginOffset": 75,
      "endOffset": 82
    }
  ]
}
{
  "count": 5,
  "byOrder": [
    {
      "score": 0.9992457628250122,
      "type": "person",
      "text": "Bob",
      "beginOffset": 0,
      "endOffset": 3
    },
    {
      "score": 0.9980383515357971,
      "type": "quantity",
      "text": "two sandwiches",
      "beginOffset": 12,
      "endOffset": 26
    },
    {
      "score": 0.9955368041992188,
      "type": "quantity",
      "text": "three ice cream cones",
      "beginOffset": 31,
      "endOffset": 52
    },
    {
      "score": 0.9819453358650208,
      "type": "date",
      "text": "today",
      "beginOffset": 53,
      "endOffset": 58,
      "formattedDate": "Invalid date",
      "isValid": false
    },
    {
      "score": 0.9978232383728027,
      "type": "location",
      "text": "Seattle",
      "beginOffset": 75,
      "endOffset": 82
    }
  ]
}

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.6

  • Updated Datetime component

v1.0.0

  • Initial release