You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is a culture? The type is string - English seems to work (I found it in an example) but I'm not sure. Maybe en-GB would be better,
What are the items in the array returned from recognizeDateTime.
What is a resolution?
What are start and end?
Is the best resolution always first?
Is there some way to make resolution always be in the past? Or the future? Eg if I have a list of transactions (in the past) I would want 'October' to only resolve to last October. If I am filling in a delivery date, I want 'October' to always be in the future.
// TODO: what does recognizeDateTime() actually return
// Feels like these are the 'recognisable entities' that were found but I can't find docs.
const recognizedDateTimeEntities = recognizeDateTime(
filterValue,
// This is just 'string' in the types but it seems to work.
// TODO: find docs, check if this is valid.
"English"
);
if (recognizedDateTimeEntities.length) {
const firstEntity = recognizedDateTimeEntities[0];
// TODO: what is a resolution?
// Guessing this is each possible value for each recognisable item but I can't find docs.
// eg if the user enters 'october'
// values[0] is in the past
// values[1] is in the future
// we always want the past, hence picking 0.
const firstResolution = firstEntity?.resolution?.values[0] || null;
...
Expected behavior
Either docs covering the various terms used in recognizedDateTime() output in the README, or a link to somewhere else if this documentation is there instead.
Platform (please complete the following information):
Platform: JavaScript
Environment: npm
Version of package: 1.3.0
The text was updated successfully, but these errors were encountered:
tellarin
changed the title
Add definition of terms used in results - 'recognizedDateTime()' array items, 'resolution', 'start', 'end' etc
[Docs] Add definitions of terms used in results
Mar 18, 2023
Describe the bug
Börje Karlsson mentioned I should file this bug on Hacker News.
I'm an active user of this library - thanks for making it! One piece of feedback is: the documentation https://github.com/Microsoft/Recognizers-Text/tree/master/Ja... doesn't seem to cover the the various terms used in the results.
Specifically
string
-English
seems to work (I found it in an example) but I'm not sure. Maybeen-GB
would be better,recognizeDateTime
.resolution
?start
andend
?The README for the JS package doesn't seem to cover what these are, so I'm currently just guessing.
My code currently contains this:
Expected behavior
Either docs covering the various terms used in recognizedDateTime() output in the README, or a link to somewhere else if this documentation is there instead.
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: