Hi @vishalk there are a couple things you can do to extract names. First, you could try using the SpacyEntityExtractor to extract names. Since spaCy is trained on a large corpus of names you can leverage those by adding SpacyEntityExtractor to your pipeline.
The other option would be to try adding RegexEntityExtractor to your pipeline and making sure you set use_lookup_tables: True. Adding this to your pipeline will generate RegEx expressions for all the samples in your lookup table and extract entities based on those RegEx.
For more background on either of these options you can read this blog post:
The RegexEntityExtractor is going to construct its name list from what you provide in your lookup table. If there are example names not in your lookup then it’s going to be difficult to extract. What you could do for this situation is if you’re not able to extract a name from the user’s message you can ask a follow-up for the user to ask their name. Then you can add those names to your lookup table.
In the first approach that u suggested, the spacy entity extractor takes full name instead of first name.
for e.g. If the sentence contains Chris Hemsworth, then it extracts it correctly instead if it has Chris only, it fails. Is this the expected behavior ? as person might be entering first name only.