Issue on Multiple Entity Extractions with Spacy extractor and diet classifier

Hi, I’m trying to extract nouns by taking entity dimension as PERSON in spacy entity extractor which is causing issue by extracting same value twice as a list, because same PERSON entity is getting extracted by Spacy entity extractor and diet classifier as well, How can i resolve this issue?

My nlp pipeline is mentioned above: Please get me a solution for this

1 Like

@anandaaditya You could have a custom validation action for the entity PERSON and resolve any duplication of values.

Hi aditya,

Did you check by uncommenting entity_recognition: False under DIETClassifier?

Hi Sejal,

If i do that some of my other entities are not getting extracted. As i will be left over with spacy extractor and duckling. I’m able to extract PERSON, PRODUCT, QUANTITY via spacy and phone-number and email with duckling. Because of this I’m unable to extract 2 entities -vehiclebrand, model.

Hi Vinamra,

Human being names are vast how can we define them as a lookup or through regex or via anyother validation. If i use regex for names then even product names also can be extracted as human names right. So custom validation isn’t best choice in my case i guess. As i have morethan 1 entity of name type.

Do i have any other way of extracting human names without spacy? If so i can skip spacy extractor and i can use only diet classifier to extract all my entities.

Hi Ananda,

I understand there can be a vast variety of human names, so for user-name slot extraction if you are extracting them using “from_entity” then I don’t think there is a single Extractor that could handle all scenarios. But with multiple Extractors you capture more names and in doing so end up with repetitions, which you can resolve in a Validation action. If your bot’s application is information retrieval then fetching the usernames from DB and validating against them is possible. You could also use a combination of “from_entity” and “from_text” slot mappings.

In case I missed something, tagging @nik202 for another opinion.

Hi Vinamra,

My usecase is not on information retrieval. I’m working on an e-commerce usecase. So i need customer details while booking an order. If my slot is already filled with some value, due to multiple extractors whenever a new value is extracted sometimes the old value is overriding with new one. How can i validate repetitions through actions? So here even i do validations it will be validated only when that slot is called. But in my scenario values r being overriden forcefully. So how can i overcome this?