axa-group / nlp.js

An NLP library for building bots, with entity extraction, sentiment analysis, automatic language identify, and so more
MIT License
6.28k stars 621 forks source link

Handling list entities.. #451

Closed obaid closed 1 year ago

obaid commented 4 years ago

Is your feature request related to a problem? Please describe. I am looking for ways to handle a list like input from the user. For example, if we are looking to get pizza toppings from the user we may want to detect multiple "entities" within a single utterance.

e.g. I would like olives, mushrooms and chicken how about olives and chicken just olives please

Describe the solution you'd like I am not sure how we can add training phrases that can handle a situation like this.

manager.addDocument("en", "i would like %topping%, %topping% and %topping%", "getToppingIntent");

Describe alternatives you've considered N/A

Additional context N/A

soltrinox commented 4 years ago

See: https://github.com/axa-group/nlp.js/blob/master/docs/v3/ner-manager.md#utterances-with-duplicated-entities

I think that is what you are looking for?

Apollon77 commented 2 years ago

Also exists in v4

aigloss commented 1 year ago

Closing due to inactivity. Please, re-open if you think the topic is still alive.