Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NodeJS] EntityRecognizer.resolveTime() doesn't handle all LUIS placeholder dates & times #7

Closed
Stevenic opened this issue Mar 30, 2016 · 6 comments
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior.

Comments

@Stevenic
Copy link
Contributor

LUIS will return a date entity with a XXXX-06-27 when the user says something like "lets meet on june 27th". This indicates that they don't know the year and ultimately we want the EntityRecognizer.resolveTime() to convert this to 2016-06-27. Right now it just ignores the date when this happens. I need to add support to resolveTime() to deal with all of the various placeholder formats (there are a bunch) and write unit tests to test them all.

The tricky bit is for an utterance like "lets meet on june 27th" its obvious that the year should be 2016. But for an utterance like "I did that on june 27th" it's probably referring to 2015. LUIS has no clue which to do in this case otherwise it would do it. That's why it leaves it ambiguous in the first place. I'm leaning towards adding a flag that lets the developer control the resolving with "future", "past", "nearest", or "none". Open to suggestions.

@Stevenic Stevenic self-assigned this Mar 31, 2016
@Stevenic Stevenic added enhancement bug Indicates an unexpected problem or an unintended behavior. and removed enhancement labels Apr 7, 2016
@Stevenic Stevenic changed the title node: EntityRecognizer.resolveTime() doesn't handle all LUIS placeholder dates & times [NodeJS] EntityRecognizer.resolveTime() doesn't handle all LUIS placeholder dates & times Apr 8, 2016
@inna12
Copy link

inna12 commented May 9, 2016

There is another issue with datetime recognition. When LUIS return the following response e.g

"entities": [
{
"entity": "20 may 2016",
"type": "builtin.datetime",
"startIndex": 28,
"endIndex": 38,
"resolution": {
"date": "2016-05-20"
}
},
{
"entity": "22 may 2016",
"type": "builtin.datetime",
"startIndex": 45,
"endIndex": 55,
"resolution": {
"date": "2016-05-22"
}
},
{
"entity": "paris",
"type": "builtin.geography",
"startIndex": 17,
"endIndex": 21,
"score": 0.968967259
}
]

The type is 'builtin.datetime' and EntityRecognizer doesn't resolve the time. I assume that it expects 'builtin.datetime.date' type.

@Stevenic
Copy link
Contributor Author

What do you get back in this case? I would have expected it to find the first one but not the second.

@ghost
Copy link

ghost commented May 10, 2016

Line 105
switch (entity.resolution.resolution_type || entity.type) { case 'builtin.datetime.date': case 'builtin.datetime.time':

If type is 'builtin.datetime' like in my case, then it would not be resolved.

@Stevenic
Copy link
Contributor Author

I see... Have you tried adding an additional case statement directly to the JS of the module? Just curious if that fixes things. They may have changed the entity titles on us. I can look into this too but it may be a bit.

@Stevenic
Copy link
Contributor Author

I've checked in a fix for this. Will be in the next release of the SDK coming out shortly.

@v-thgratMSGit
Copy link
Contributor

Closing this issue. Please open a new issue for further discussion if necessary. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
Development

No branches or pull requests

3 participants