How do you extract in the user answer several times the same entity family (e.g @sys-number AND @sys-number)

Greeting,
I am trying to program a Pizza Delivery Chatbot ( yes, not very original, but anyone can get it :D)
And I would like to be able to extract this :
*I want ****2 margarita**** AND ****3 regina****.*
I need to be able to :

1. extract a number (can be ‘2’ or
‘two’) using the @sys-number
entities
2. to extract a pizza name
using my own @pizza_name entity.

But the problem is : I cannot use a regex because they are not compatible with entities and I absolutely need the entities because numbers can be written in letters and the pizza need to be in the @pizza_name’s list.

SO, I tried to look, in the SpEl doc (very poor doc by the way) and I could not find any decent answer about logical operators priority and occurrences management. :

the trigger : **” if (@sys-number AND @pizza_name) AND (@sys-number AND @pizza_name) “** does not work…
I am a little desesperate so if Anyone had the same problem and has a solution i would be thankful forever. If you don’t have the answer but experienced the same issue, please cry with me. We will be less lonely.
Regards

Related:

Leave a Reply