Recognizing multiple names using rasa NLU alone

Let’s say my sentence contains two names and I have to recognize both based on the context. For example: Dr. Sample Person has concluded John Doe doesn’t have any serious illness. When I try this with SpacyNLP, SpacyTokenizer and SpacyFeaturizer, it tags both the names as doctor_name (whichever entity is placed first in the domain). I’ve defined both doctor_name and patient_name as PERSON in domain file.

So how do I recognize the names as different entities with NLU standalone.

Hello @madhavanrobos, welcome to the Forum!

This should be possible by not using Spacy, but only the standard pipeline with the DIET classifier, as well as roles and groups. In particular, you’d define a name entity with the two roles doctor and patient. If you don’t use Space (nor Duckling), you’ll have to create a bit more training data, though.

Adding roles and groups is currently not supported for Duckling, and I think probably also not for Spacy, but adding roles and groups to Duckling is on our ToDo list.