entity#

class besser.bot.core.entity.entity.Entity(name, base_entity=False, entries=None)[source]#

Bases: object

The Entity core component of a bot.

Entities are used to specify the type of information to extract from user inputs. These entities are embedded in intent parameters.

Parameters:
  • name (str) – the entity’s name

  • base_entity (bool) – weather the entity is base or not (i.e. custom)

  • entries (dict[str, list[str]] or None) – the entity entries. If base_entity, there are no entries (i.e. None)

name#

The entity’s name

Type:

str

base_entity#

Weather the entity is base or not (i.e. custom)

Type:

bool

entries#

The entity entries. If base_entity, there are no entries (i.e. None)

Type:

list[EntityEntry] or None

process_entity_entries(nlp_engine)[source]#

Process the entity entries.

Parameters:

nlp_engine (NLPEngine) – the NLPEngine that handles the NLP processes of the bot