Composite Entities as part of Rasa NLU
See original GitHub issueDescription of Problem: Rasa currently has no native support for composite entities (entities that consist of multiple sub-entities). This feature is available in competitors like wit.ai and dialogflow.
Overview of the Solution: A while ago, I’ve implemented composite entities as a custom component. This has worked for my use-cases. However, having this functionality as a separate component has some serious drawbacks:
- The feature is basic enough that it’s annoying to have to install a separate library
- Getting the required training data for the composite definitions is messy, as there is no canonical way to pass additional training data fields to components
- Because of 2), I have to rely on some internal methods that have changed their signature multiple times and broke things.
My proposal is now that I take the functionality from this component and put it in a pull request to make it available throughout rasa. Definitions of composite entities would then be first class training data, meaning that they are defined the same way as e.g. lookup tables.
For example a markdown file containing NLU training data could contain another category defining composites of entities (a “@” is used to mark entity names).
## composite:car
- @color @brand
I’m open to discussion about the specifics of my implementation. Is there any argument against proceeding with this? One argument I could imagine is not wanting to increase the number of fields in the training files further.
Issue Analytics
- State:
- Created 4 years ago
- Comments:33 (19 by maintainers)
Top GitHub Comments
@nbeuchat @BeWe11 We have a first working version of the composite entity feature ready. If you are still interested, I can share the feature with you so that you can test it before the actual release. Just let me know. Thanks.
yes, we are! waiting on a couple of other NLU pieces to come together but working on a good solution