Open OrtalAshkenaziGong opened 3 years ago
Sorry, it's not clear to me what you mean? Can you elaborate?
Dates can be ambiguous: For example, the following date 2021-01-11 can be interpreted as:
More details those the results I get from the following API calls: ‘locale=en_US&text=1/11/2021’ - > "value":"2021-01-11T00:00:00.000-08:00" ‘locale=en_US&text=11 of January 2021’ -> "value":"2021-01-11T00:00:00.000-08:00” 'locale=en_US&text=1 of November' -> "value":"2021-11-01T00:00:00.000-07:00"
From this, I can deduce that the date format Duckling is searching in the text is "%m/%d/%Y" and the date format in output in the JSON is "%d/%m/%Y". How can I control these formats? Thanks in advance, Ortal
This is not yet supported.
Can you please tell me from where the date formats are taken today? Are they fixed ? are they taken from the machine locale?(locale -k LC_TIME) Thanks in advance, Ortal
Can you please tell me from where the date formats are taken today? Are they fixed ? are they taken from the machine locale?(locale -k LC_TIME) Thanks in advance, Ortal
For inputs, the format is inferred based on rules/training data. You can look in the values
array in the output for possible other meanings (duckling returns a single value that it thinks the data resolves to, and then a number of other values that the data may also resolve to, but have lower confidence than the single returned value).
For outputs, the time is based on RFC 3339. See https://github.com/facebook/duckling/blob/3d2f1939ef0a5ceb856e4bfcfefbed0b03775d5c/Duckling/Time/Types.hs#L739
Is it possible to define in the API call or in the installation the date format for example mm/dd/yyyy? Thanks in advance, Ortal