Hello,
I’m trying to use regex to extract datetime entities. There are 2 datetime formats which i want to extract:
- DD/MM/YYYY
- DD-MM-YYYY
I tried to make a regex like this in my nlu.md:
## regex:date
- [0-9]{1,2}?/[0-9]{1,2}?/[0-9]{4}
- [0-9]{1,2}?\-[0-9]{1,2}?\-[0-9]{4}
Here my training data:
- Tôi muốn đặt phòng họp vào 15/03/2019
- Tôi muốn đặt phòng họp vào 02-12-2019
- Tôi muốn đặt lịch phòng họp vào 12/02/2020
- Tôi muốn đặt lịch phòng họp vào 11-9-2021
- Tôi cần đặt lịch phòng họp vào ngày 13/6/2022
- Tôi cần đặt lịch phòng họp vào ngày 28-11-2040
- Đặt lịch phòng họp vào ngày 17/10/2024
- Đặt lịch phòng họp vào ngày 30-04-2086
- Tôi muốn đặt lịch phòng họp vào 13/08/2056
- Tôi muốn đặt lịch phòng họp vào 25-7-2033
- Tôi cần đặt lịch phòng họp vào 29/5/2037
- Tôi cần đặt lịch phòng họp vào 07-01-2099
I am only able to extract 1 of 2 datetime formats, and whenever i remove a format in the ## regex:date, i extract the other format successfully.
So i want to know if Rasa can use multiple regex patterns for 1 entity like i did. And if that’s not the case then is there any work around for me to achieve this ? Thank you for your help.