Extracting name entity from text

Hi all,

I am looking for a suggestion here.

For some scenarios our bot requests the user to enter first and last names.

Below is the Example:-

Bot response:- What is your first name

User response:- test

Bot response:- what is your last name

User response:- Kumar

for the above scenario user entered details properly so there is no issue.

if we observe the below scenario

Bot response:- What is your first name

User response:- my first name test

Bot response:- what is your last name

User response:- Kumar - this is my last name

Here I just need to extract the first name as Test and last name as Kumar

I have used the Spacy library to extract the name details but that is too complicated approach. Is there any simple approach to extract the required info.

Note:- Our approach should not be limited to name, sometimes we request the user to enter email, Phone and etc.

Personal name recognition is a pain in the ass. Go with spaCy whenever you can.

You need to rely on you entity extractor to pick up the right entities. This gets easier for more formal enitites like emails (where you can use a regex to support the recognition). For general entity regocnition see

If youre using a FormAction, you can also make use of ‘from_text’ mapping, which takes the whole input of the user as a slot value. In this case it might be necessary to postprocess the message in the validate_{slotname}-function.

1 Like