entity
This block captures an NLP entity regardless of the incoming message intention.
Last updated
Was this helpful?
This block captures an NLP entity regardless of the incoming message intention.
Last updated
Was this helpful?
entity(name=String, &block)
The NLP engine must be enabled and configured in file in order to implement this block.
Messenger
Telegram
For this example, we will use the entity wit$datetime:datetime
(Wit.ai Built-In)
And suppose the following message arrives:
"tomorrow at 7am"
As you can see in this message, there is no clear intention. But implementing this block, where we send a reply with two options, we can try to understand the message intention.
To further understand how entities work, we will create in Wit.ai an entity called colors
where we will train the NLP engine with various color options.
On the project's directory, open the console by running the kogno c
command and then execute the following:
This will create the color
entity with the role name
.
In the following example, MainContext
will catch any incoming messages such as: "I want a blue t-shirt", "grass is green" and so on.
The entity can be created and trained directly from the Wit.ai Dashboard or for which Kogno has a method.