Hi, Can you tell me how to extract the name of the person which is not present in my nlu.yml file in Rasa 2.x??
This depends a little on what types of names you expect to see, but you can try the SpacyEntityExtractor
with dimension “PERSON”. Bear in mind this will work best for more common names in the language you’re using. You can also try using namelists for common names in your language, and can use CRFEntityExtractor
or DIET
to supplement SpacyEntityExtractor
A person’s name can be anything, how should I make sure that the name should be common? One thing I can make sure that the letters of the name will be in between A-Z a-z
What do you need the name for? You can use a custom action to validate the name. If you’re not sure whether it’s a valid name or not, you can ask the person to confirm the name, for example with buttons. This might look like:
- user: Hello my name is Ball.
< validate_name checks whether Ball is in the name list, doesn't find it >
- bot: Did you mean:
[Ball][something else]
- user: < selects "something else" >
- bot: Can you repeat your name?
- user: Bill