question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Composite Entities as part of Rasa NLU

See original GitHub issue

Description 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:

  1. The feature is basic enough that it’s annoying to have to install a separate library
  2. 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
  3. 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:closed
  • Created 4 years ago
  • Comments:33 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
tabergmacommented, Apr 6, 2020

@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.

1reaction
amn41commented, Nov 25, 2019

yes, we are! waiting on a couple of other NLU pieces to come together but working on a good solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Composite Entities as part of Rasa NLU · Issue #3765 - GitHub
Rasa currently has no native support for composite entities (entities that consist of multiple sub-entities). This feature is available in ...
Read more >
Adding Composite Entities to Rasa NLU - Benjamin Weigang
Composite entities are tremendously useful when working with complex queries that contain more than one piece of information.
Read more >
rasa-composite-entities - PyPI
The component is agnostic to the origin of entities, you can use anything that Rasa NLU returns as the "entity" field in its...
Read more >
How to handle composite type of Entities using RASA NLU?
Here the substring John James Doe is a composite entity of type Name having 3 simple entities ( First Name , Middle Name...
Read more >
Questions about data format and composite entities
Hi guys! I have two questions about rasa: Does rasa x support json format for nlu training data? It seems it only reads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found