RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
19.01k stars 4.65k forks source link

Add roles and groups to entities extracted by duckling #5716

Closed tabergma closed 1 year ago

tabergma commented 4 years ago

Description of Problem: Entity roles and groups are currently only support by CRFEntityExtractor and DIETClassifier, e.g. components that extract custom entities. It might be helpful to add support for SpacyEntityExtractor and DucklingHTTPExtractor as well. If you are building a larger bot, you might have lots of different entities that are "number". Example:

I need a table for 4 with one seat for a toddler

Overview of the Solution: We don't have a clear solution in mind. One idea was to split off the role classification part from e.g. the CRFEntityExtractor and then wrapping that around the duckling extractor.

However, the more challenging part is the annotation of the training data. For SpacyEntityExtractor and DucklingHTTPExtractor you don't need to annotate anything right now. But if you want to learn specific roles for e.g. a "number", we need some kind of training data. One idea was to just annotate tokens in the training data with roles. For example:

The car has [4]

{"role": "wheel-count"}

wheels and [2]

{"role": "door-count"}

doors

edubrigham commented 4 years ago

Exalate commented:

edubrigham commented:

Hi this exactly the issue I'm trying to solve right now. Can i use CRFEntityExtractor to extract "related" numbers based on "entity groups" by having training data as follows?

And what happens if the user uses cardinals instead of numbers? usually this is done by DucklingHTTPExtractor, which does not read "groups" or "roles"

pawan-datascience commented 3 years ago

Exalate commented:

pawan-datascience commented:

Any updates on this? Makes sense to annotate tokens in the training data with roles:

`The car has [4]

{"role": "wheel-count"}

wheels and [2]

{"role": "door-count"}

doors`

JEM-Mosig commented 3 years ago

Exalate commented:

JEM-Mosig commented:

It should be easier to add this support after resolving this issue

sync-by-unito[bot] commented 1 year ago

➤ Maxime Verger commented:

:bulb: Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS.

From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue!

:arrow_right: More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569.