Hi! I’m new to Rasa and I’ve been looking at ways to extract values that fall into the same entity and convert them into a numerical value.
Using the following example I want to extract the quantity for the items retrieved in the intent.
“Give me two small pizzas with mushrooms and a large pepperoni”
This user’s intent could be divided into the following entities: Give me [two]{“entity”: “quantity”, “group”: “1”} [small]{“entity”: “size”, “group”: “1”} pizzas with [mushrooms]{“entity”: “topping”, “group”: “1”} and [a]{“entity”: “quantity”, “group”: “2”} [large]{“entity”: “size”, “group”: “2”} [pepperoni]{“entity”: “topping”, “group”: “2”}
But how would I go about obtaining a numerical value for the quantities? I could probably use a custom action with a duckling python wrapper like pyduckling but I don’t really want to have more dependencies than needed and I don’t feel like this is the right approach to the problem. At least, not the most Rasa way of doing things.
I have tried Rasa’s DucklingEntityExtractor but since I’m extracting two entities on the same intent, it essentially assigns a value to the slot with the first entity extraction, and then replaces the slot’s value with the value of the second entity. Making it so I cannot retrieve the value for each individyal entity.
What’s the best way to extract both quantity entities without losing any of them and retrieve its numerical value?