two intents:
1、I want to buy one apple and two banana
2、I dont want apple, just keep banana
like above, in my actions.py,
how can I get the entities,
and suit the number,
and keep or dont keep
two intents:
1、I want to buy one apple and two banana
2、I dont want apple, just keep banana
like above, in my actions.py,
how can I get the entities,
and suit the number,
and keep or dont keep
Hi @qinyukun-seu,
aligning the numbers with the extracted fruit entities would be something which you have todo as part of a custom action. In this action you would use the position of the number and the position of the fruit entity in the text to find out which ones belong together. Does that make sense?
1、in action i can get slots number and fruit, but how can I suit one with apple, two with banana?
2、how can i deal with dont want apple and keep banana in one sentence?
You can check which fruit entity is right after the number in the message.
how can i deal with dont want apple and keep banana in one sentence?
Do you mean a sentence like “I want one banana but no apple”?
1、first sentence, you mean in action text = tracker.lastest_message.get(“text”), then check the nearest number with fruit? but how can i get two or more fruit slots?
2、 yes, maybe this sentence can be understood as two intents?
1、first sentence, you mean in action text = tracker.lastest_message.get(“text”), then check the nearest number with fruit?
Yes, exactly.
but how can i get two or more fruit slots?
You can get the entities instead of the slots. Alternatively, you can also make fruit
a slot of type list
yes, maybe this sentence can be understood as two intents?
mhm, I think this could be tricky. Maybe @Ghostvv has some suggestions here.
mulit intent is tricky, you could try our approach: How to handle multiple intents per input using Rasa NLU TensorFlow pipeline or reformulate your intents in such a way that you don’t need multi intent