Entity association to multiple intent

Rasa NLU tensor flow has ability to identify multiple intents as well as extracting the entities associated with it. How ever I am struggling to understand how to map those entities to appropriate intent

Intent : bought+declined

Bought : bought a pizza Declined : declined free offer on coke

Statement : bought a pizza but declined coke.

Here I am able to extract the intent as bought + declined also able to get the entities as pizza and coke but how do we categorize that pizza was bought and coke was declined ?

Thanks in advance

I think that, for this you would need an sentence tokenizer in your pipeline. Sentence tokenizer, as name suggests, splits text into sentences. So in your example, it should split text on word “but”, forming two sentences: bought a pizza & declined cookie. Which should help correctly classified multiple intents and entities. Cheers!

I’m working on a similar case where a user can input date preferences. Positives as well as negatives.

This week except thursday

This would extract This week and thursday as seperate entities.

On top of that I trained the ner_crf extractor to recognize positive as well as negative sounding sentence parts, like this

[This week](positive_preference) [except thursday](negative_preference)

Now I check which time entities overlap (by position in text) with a positive/negative_preference entity: This is working pretty good so far.

I think a similar solution could work in your case.

Thanks for your inputs, i am currently doing it this way, but the processing speed has come down significantly since the text is too large :frowning:

This is something i have not tried, let me try it. Thanks for the tip.