intent_parameter#

class besser.bot.core.intent.intent_parameter.IntentParameter(name, fragment, entity)[source]#

Bases: object

The intent parameter.

An intent parameter is composed by a name, a fragment and an entity. The fragment is the intent’s training sentence substring where an entity should be matched. E.g. in an intent with the training sentence “What is the weather in CITY?” we could define a parameter named “city” in the fragment “CITY” that should match with any value in the entity “city_entity” (previously defined)

Parameters:
  • name (str) – the intent parameter name

  • fragment (str) – the fragment the intent’s training sentences that is expected to match with the entity

  • entity (Entity) – the entity to be matched in this parameter

name#

The intent parameter name

Type:

str

fragment#

The fragment the intent’s training sentences that is expected to match with the entity

Type:

str

entity#

The entity to be matched in this parameter

Type:

Entity