Hi all. I have a question regarding annotating entities with roles. Suppose I label a name using name entity with 2 roles, first_name and last_name, respectively. How can I map this entity to a slot NAME at once in a form?
Can you elaborate on why you want it to be a single slot? You can always create a variable ‘full name’ that combines first and last name in your custom action and return that variable.
If you need it to be a single slot you will have to define a third entity and slot as ‘full name’ to your domain as far as i know. For example when building a foreign currency bot i had used;
- currency(role:from) e.g. USD
- currency(role:to) e.g. AED
- currency_pair e.g. USD/AED
Thanks for the reply. Since I create lookup table for first_name and last_name separately in order to have better name entity extraction. I am currently using custom action to do the slot mapping in Form according to the linkhttps://rasa.com/docs/rasa/forms#custom-slot-mappings, however, it still not works from my side
can you paste the code for your custom action here?