BeWe11 / rasa_composite_entities

A Rasa NLU component for composite entities.
MIT License
28 stars 10 forks source link

Add support for nested composites #7

Open BeWe11 opened 5 years ago

BeWe11 commented 5 years ago

It would be nice if shorter composites could be included in larger ones in some way.

Example:

I am looking for brown shoes with red stripes

This sentence might contains the entities @color = brown, @article = shoe, @color = red and @pattern = stripes.

A user might define the composite entities @product = @color @article and @appearance = @color @pattern.

I can think of two ways in which a user might want to further group these entities:

  1. A user might define a composite entity referencing other composite entities: @product = @article @appearance. This is currently not implemented. Right now, composite entities only consider base entities.
  2. A user might define a composite entity referencing base entities: @product = @color @article @color @pattern. The user might then want the sub-entities to be grouped again based on his other shorter composite patterns. This is currently not implemented. Right now, longer composite entities always take precedence over shorter ones
shaswat-indian commented 3 years ago

@BeWe11 This PR adds support for nested composites too: https://github.com/BeWe11/rasa_composite_entities/pull/17.