Multiple entities for a single token

Hi community! I have a use case for marking a single token with several entities

  1. John has a height greater than 180. I would detect the two entities [height] (property) and [greater] (comparator). Both is needed to take an action.
  2. John is taller than 180. the token “taller” has the meaning of entity property (value=“height”) and entity comparator (value=“greater”). The meaning of the input is different from John is shorter than 180, where the comparator would take the value “lesser”

I would need to map a same token (taller/shorter etc.) into 2 entities (property and comparator). I suppose I can create a new entity “property_comparator” and modify my action accordingly. But is there a more direct way ? Thanks for your time!

hi Pete - I’m still not 100% clear why this is necessary, but the easiest option might be to create a form with these two slots, and then in the case of ‘John is taller than 180’ you can fill both the property and comparator slots

I rephrased the question, hoping its more clear. Thanks for your hint ! It is not as “direct” as I would have preferred, i.e. using some special keyword in RASA NLU, but resorting to Python custom action code.