Hello!
You could try use entity groups as follows:
I want [3]{"entity": "number", "group": "1"} [iPhones]{"entity": "product", "group": "1"} and [2]{"entity": "number", "group": "2"} [Laptops]{"entity": "product", "group": "2"}
so the result is:
{
"text": "I want 3 iPhones and 2 Laptops",
"intent": "book_flight",
"entities": [
{
"start": 7,
"end": 8,
"value": "3",
"entity": "number",
"group": "1",
"extractor": "DIETClassifier",
},
{
"start": 9,
"end": 16,
"value": "iPhones",
"entity": "product",
"group": "1",
"extractor": "DIETClassifier",
},
{
"start": 21,
"end": 22,
"value": "2",
"entity": "number",
"group": "2",
"extractor": "DIETClassifier",
},
{
"start": 23,
"end": 30,
"value": "Laptops",
"entity": "product",
"group": "2",
"extractor": "DIETClassifier",
}
]
}
The downsize is you have to set fixed number of groups before training NLU. In my experience in food domain user provides one group 80% of queries, two groups ~18% and more than 3 groups only ~2% of all queries per intent.