snipsco / snips-nlu

Snips Python library to extract meaning from text
https://snips-nlu.readthedocs.io
Apache License 2.0
3.88k stars 515 forks source link

Very slow runtimes when datetime is in a certain format #888

Open Edward-Knighton opened 3 years ago

Edward-Knighton commented 3 years ago

Describe the bug Slow runtimes when using snips/datetime or snips/date + snips/time on certain queries where the date and time are in certain formats (see below)

To Reproduce Runtimes below used while training snips/date and snips/time, but got similar values for snips/datetime. Using a query where the beginning is "I need you to schedule a thirty minute project signoff meeting with john price and david scott" this will be represented as X in further examples:

  1. "X at 9:30 am" --> 0.034 seconds
  2. "X on friday at 9:30am" --> 0.034 seconds
  3. "X on September 25th" --> 0.032 seconds
  4. "X on Friday 9/25 at 9" --> 1.017 seconds
  5. "X on Friday 9/25 at 9:30am" --> 13.171 seconds
  6. "X on on Friday September 25th at 9:30am" --> 16.329

Expected behavior

Expect runtime to be much faster

Environment: