How to deal with date & phone numbers (pipe line " supervised_embeddings")

i am making a chat bot and i am using supervised_embeddings pipeline

fews questions i want ask 1 , how to deal with date ( bot should detect its date) what kind of data i need to provide in training

  1. how to deal with phone number

is regex feature going to help in this case ?

3 how example we should provide per intent


There are two ways you can detect phone number and dates :sunny:

  • You can use your own examples but this is really hard work
    • For phone numbers, there are many ways a user can enter it (xx.xx.xx.xx, xx xx xx xx, xxxxxxxx, +xx xxxxxx) but regex could be the way to go indeed.
    • Dates are a really a hard thing to master as there are A LOT of possibilities (“Next monday”, “27/01/98”, “In two weeks”…) and I think trying to do it yourself is a waste of time.
  • For dates and even phone numbers, I can only recommend the Duckling component (you can try the demo here You have to customize the supervised_embeddings pipeline, add the duckling component and it will save sooooo much time and will give very nice formatted results (the exact date in UTC format).

Here is the doc for customizing a pipeline.The best way to launch Duckling is using Docker (this only line does everything) :

docker run -p 8000:8000 RASA/Duckling

1 Like