Custom entities BETA

List entities

To create entities you need to define them in data.json file in entities section. Don't forget to connect dataset file to the application.

Section entities is a dictionary, where the key is an entity name and value object contains values, options, and training examples.

There are possible types of training phrases:

  • values: possible values and synonyms
  • open_set: option to restrict possible values (optional, default: true)
  • includes: examples that have this meaning (optional)
  • excludes: examples that don't have this meaning (optional)

Entity values and synonyms

In this section, you need to define possible values and synonyms for this entity.

Each value contains a reference value and may contain a list of synonyms. If any value from synonyms is extracted, it will associate with referencing value.

Open set option

The open set option defines restrictions for possible extracted values. It is true by default.

You need to set open_set to true if you don't want to restrict possible values. People may say some entity value that is not in your list. Then, the model will extract entities from the context of the sentence.

If you want to restrict an entity and extract only values from a list, set open_set to false.

Entity markup format

There are three equivalent options to markup entities in phrases:

  • Value-Entity brackets: (entity value)[entity_name:tag]
  • Square brackets: [entity_name:tag]
  • Round brackets: (entity_name:tag)

Value augmentations

You don't need to worry about all values in examples. Augmentation algorithm will place all values of the entity in phrases automatically.

Entity tags

Sometimes it's needed to specify additional meaning of the extracted entity. For example, source and target account; departure and arrival city; a range of units; etc.

For this purpose, you can append a tag to the entity in the phrase example. Use : after entity name to define a tag ([entity_name:tag]). The tag can be any word you want. You don't need to define it somewhere else. You can specify an entity with or without a tag.

Entities in intent phrases

Usually, entities are used in intent training examples. Training phrases are example phrases that interlocutors might say to the dialog system during the conversation. The classification algorithm is training using these examples.

Intent and entities are related to some common dialog action. Don't forget to annotate entities in training examples. It's obligatory to train your model correctly.

Includes examples

There are cases when you need to recognize entities from a phrase that doesn't relate to any intent. Includes section is for such phrases.

Excludes examples

In this section, you can specify phrase or word examples to be excluded from recognition of this entity.