This regex picks up possible outcomes like indian mobile numbers but the issue is it is not limiting the digit to 10 i.e if i enter like 12345 or even 123 it is taking it into slots also i have tested this regex
here
i have mentioned mobile numbers above, i want my bot to accept mobile numbers not random numbers like 123456 or anything of that sort! right now bot is accepting any numeric value into the slot
Can you also post what your training data looks like? Do you have any other shorter numbers that are present in it as well (doesn’t have to be the same entity)?
Ok so the thing is it doesn’t just pay attention to the actual word, but also the context. This is why it might accept shorter numbers too. Also you do have a short number as a mobile number entity towards the bottom of your training data. I saw that you have a lot of different numbers that you extract as different entities, my suggestion would be just to extract these with duckling and then store them in slots with a custom action. That way you can validate them to see if they’re in the correct format too
yes i added less digits because every time i enter like -
U- my employee id is 9999852419 (a mobile number string)
My bot picks up mobile number intent in this case which i don’t want my bot to do. even if user enters a mobile number in case of employee id or otp i want my bot to process it and guide user that input is wrong. Yes you are right i want it to handle at that context itself !
To use this component you need to run a duckling server. The easiest option is to spin up a docker container using docker run -p 8000:8000 rasa/duckling .