LUIS prebuilt entity datetimeV2 resolves wrongly date range - azure-language-understanding

LUIS doesn't handle the below correctly.
Example utterance:
From Friday the 26th until Tuesday the 30th
Response:
"entities": [
{
"entity": "from friday the 26th until tuesday",
"type": "builtin.datetimeV2.daterange",
"startIndex": 0,
"endIndex": 33,
"resolution": {
"values": [
{
"timex": "(2018-01-26,XXXX-WXX-2,P-2.33532467143519D)",
"type": "daterange",
"start": "2018-01-26",
"end": "2018-01-23"
}
]
}
}
]
The date range resolved is not legal, due to a failure to identify "the 30th" as part of the date.

I should note that this doesn't seem to be a question, and that the moderators would probably prefer to have you posit an actual question next time as opposed to an observation.
In the future, please submit prebuilt entity-related bugs to our repo, Recognizers-Text. I've gone ahead and created an issue there that stems from this question.
Update (2018/01/31):
This issue has been fixed and is in the pipeline awaiting release, thank you for reporting this!

Related

Microsoft Graph API: Why is creating a recurring event in the past returning a 400?

I am running into an issue creating recurring events in the past using Graph API. When I POST this data to /me/calendars/[calendarId]/events I get an ErrorPropertyValidationFailure error:
{
"isAllDay": true,
"start": {
"timeZone": "America/New_York",
"dateTime": "2000-09-02"
},
"end": {
"timeZone": "America/New_York",
"dateTime": "2000-09-03"
},
"subject": "Jimmy's birthday",
"body": { "contentType": "text", "content": "" },
"isCancelled": false,
"recurrence": {
"pattern": {
"type": "absoluteYearly",
"interval": 1,
"dayOfMonth": 2,
"month": 9
},
"range": { "startDate": "2000-09-02", "type": "noEnd" }
},
"showAs": "free",
"type": "seriesMaster"
}
All of the data seems valid to me, and indeed just changing the start and end dateTime values and the recurrence range's startDate to be in 2019 instead of 2000, and it seems to work.
But here's where it gets weird: keep those values in 2000, and change the dayOfMonth in the recurrence pattern to an incorrect value, like 5. Then when submitting to the API, it works! The recurrence will instead appear to begin on Sep 5 of 2000 and there is nothing on Sep 2 (also, the event seems to run "Tue 9/5/2000, 11:00 PM to Wed 9/6/2000, 11:00 PM" on the calendar, which is strange, since it also appears as an all-day event).
So my question is: is this a bug? Or what the heck's happening? It looks like correct data is getting a validation error, but incorrect data creates an event.
Updating to add the error body:
{
"error": {
"code": "ErrorPropertyValidationFailure",
"message": "At least one property failed validation.",
"innerError": {
"date": "2020-10-15T22:48:50",
"request-id": "c08b1d73-5b6d-46ac-8751-d1f17310f652",
"client-request-id": "c08b1d73-5b6d-46ac-8751-d1f17310f652"
}
}
}

Event subject is missing for recruiting events when use "delta" to get

When I use
GET https://graph.microsoft.com/v1.0/me/calendarview?startdatetime={today}&enddatetime={next-week}
I can get event subject no matter it is one-time or recruiting events.
However, when I use "delta"
GET https://graph.microsoft.com/v1.0/me/calendarview/delta?startdatetime={today}&enddatetime={next-week}
One-time events have subject while recruiting events do not have subject. Below is one of recruiting events I got:
{
"#odata.type": "#microsoft.graph.event",
"#odata.etag": "W/\"DwAAABYAAACpTc/InBsuTYwTUBb+VIb4AAB0+Esn\"",
"seriesMasterId": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgBGAAAAAACUbnk-iwQZRbXMgkfKtmYhBwCpTc-InBsuTYwTUBb_VIb4AAAAAAENAACpTc-InBsuTYwTUBb_VIb4AAAUHFHiAAA=",
"type": "occurrence",
"start": {
"dateTime": "2017-09-19T05:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2017-09-19T06:00:00.0000000",
"timeZone": "UTC"
},
"id": "AAMkADBlZTUwNTkxLWVmODgtNDVhNC1iZjhlLTdjNjA1ODZlMDI5MgFRAAgI1P7xXviAAEYAAAAAlG55P4sEGUW1zIJHyrZmIQcAqU3PyJwbLk2ME1AW-lSG_AAAAAABDQAAqU3PyJwbLk2ME1AW-lSG_AAAFBxR4gAAEA=="
}
Is it a bug?
What I see is that using the /delta causes me to get each occurrence in the view as a much smaller entity, but I also get the corresponding series master, which has the full details. So in this case, you would get the subject from the master.
So for entities with "type": "occurrence", you would look at the seriesMasterId, which should correspond to the id of another entity in your response. You can then pull properties like subject and body from that.

LUIS pre-built entity datetimeV2 does not resolve properly?

Recently (I'd say since around 2 weeks ago) LUIS has been getting some of the dates wrong for us. And indeed: datetimeV2's start date seems off by a month. Is it a bug or am I misunderstanding this value?
Ex: "since august" returns a start date of 2017-09-01 instead of 2017-08-01.
{
"entity": "since august",
"type": "builtin.datetimeV2.daterange",
"startIndex": 15,
"endIndex": 26,
"resolution": {
"values": [
{
"timex": "XXXX-08",
"type": "daterange",
"start": "2017-09-01"
},
{
"timex": "XXXX-08",
"type": "daterange",
"start": "2018-09-01"
}
]
}
}
I can confirm this is an issue. Since is currently being handled with the same regex that is being used to handle after so the reason of the issue.
In the next days, we will create PR with a proposed fix and I will update this answer with the link to it. We will separate the regexes.
Update
A fix for this issue was created and this is the PR for it.

Google Places API: Get all the User's Reviews

We are working with google places api. we want to view all the user's reviews of a business in google place but we noticed that the documentation says that it only returns an array of five user's reviews.
Now, we want to know is there any way to get all user's reviews?
To get all the reviews of any place you would have to use a third party solution like SerpApi. It's a paid API with a free trial.
Each page fatches 10 results. To implement the pagination just use the start parameter which defines the result offset (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.).
Example python code (available in other libraries also):
require 'path/to/google_search_results';
$query = [
"engine" => "google_maps_reviews",
"place_id" => "0x89c259a61c75684f:0x79d31adb123348d2",
"api_key" => "SECRET_API_KEY"
];
$search = new GoogleSearch();
$results = $search->json($query);
$reviews = $result->reviews;
Example JSON output:
"reviews": [
{
"user": {
"name": "Waylon Bilbrey",
"link": "https://www.google.com/maps/contrib/107691056156160235121?hl=en-US&sa=X&ved=2ahUKEwiUituIlpTvAhVYCc0KHbvTCrgQvvQBegQIARAx",
"thumbnail": "https://lh3.googleusercontent.com/a-/AOh14GjOj6Wjfk1kSYjhvH7WIBNMdl4nPj6FvUhvYcR6=s40-c0x00000000-cc-rp",
"reviews": 1
},
"rating": 4,
"date": "a week ago",
"snippet": "I've been here multiple times. The coffee itself is just average to me. The service is good (the people working are nice). The aesthetic is obviously what brings the place some fame. A little overpriced (even for NY). A very small cup for $6 where I feel like the price comes from the top rainbow foam decor , when I'm going to cover it anyways. If it's for an insta pic then it may be worth it?"
},
{
"user": {
"name": "Amber Grace Sale",
"link": "https://www.google.com/maps/contrib/106390058588469541899?hl=en-US&sa=X&ved=2ahUKEwiUituIlpTvAhVYCc0KHbvTCrgQvvQBegQIARA7",
"thumbnail": "https://lh3.googleusercontent.com/a-/AOh14Gj84nHu_9V_0V4yRbZcr-8ZTYAHua6gUBP8fC7W=s40-c0x00000000-cc-rp-ba3",
"local_guide": true,
"reviews": 33,
"photos": 17
},
"rating": 5,
"date": "2 years ago",
"snippet": "They really take pride in their espresso roast here and the staff is extremely knowledgeable on the subject. It’s also a GREAT place to do work although a table is no guarantee; you might have to wait for a bit. My almond milk cappuccino was very acidic at the end which wasn’t expected but I could still tell the bean was high quality. Their larger lattés they put in a tall glass cup which looks really really cool. Would definitely go again.",
"likes": 2,
"images": [
"https://lh5.googleusercontent.com/p/AF1QipMup24_dHrWtNN4ZD70EPsiRMf_tykcUkPw6A1H=w100-h100-p-n-k-no"
]
},
{
"user": {
"name": "Kelvin Petar",
"link": "https://www.google.com/maps/contrib/100859090874785206875?hl=en-US&sa=X&ved=2ahUKEwiUituIlpTvAhVYCc0KHbvTCrgQvvQBegQIARBG",
"thumbnail": "https://lh3.googleusercontent.com/a-/AOh14GhdIvUDamzfPqbYIpwhnGJV2XWSi77iVXfEsiKS=s40-c0x00000000-cc-rp",
"reviews": 3
},
"rating": 4,
"date": "3 months ago",
"snippet": "Stumptown Cafe is the perfect place to work or catch up with friends. Never too loud, never too dead. Their lattes and deliciously addicting and the toasts are tasty as well. Wifi is always fast, which is a huge plus! The staff are the friendliest, I highly recommend this place!"
},
...
]
You can check out the documentation for more details.
Disclaimer: I work at SerpApi.

Square-Connect GET refunds ignoring time filter

I'm using the Square Connect API to retrieve refunds using the begin/end time filter, and it appears that the begin_time filter is being ignored.
Here is the request:
https://connect.squareup.com/v1/me/refunds?begin_time=2014-04-26T00%3A33%3A54Z&end_time=2014-05-26T00%3A33%3A54Z
Here's the response
[
{
"type": "FULL",
"created_at": "2014-05-21T18:27:59-04:00",
"processed_at": "2014-05-21T18:28:00-04:00",
"reason": "Accidental charge",
"refunded_money": {
"currency_code": "USD",
"amount": -103
},
"payment_id": "qNEwqwYPHCfKAIjFtox5S"
},
{
"type": "FULL",
"created_at": "2014-05-24T01:00:53-04:00",
"processed_at": "2014-05-25T19:16:04-04:00",
"reason": "Accidental charge",
"refunded_money": {
"currency_code": "USD",
"amount": -123
},
"payment_id": "MkJHTnEKHS7larVWAP15S"
}
]
Based on my begin_time of 2014-04-26, I would not expect the results to contain either of the 2 refunds that were returned.
Am I doing something wrong, or is this a bug?
The begin_time and end_time parameters of the List Refunds endpoint specify the bounds of a time range. The endpoint returns all refunds that were created within that time range.
In the above example, the time range begins April 26 2014 and ends May 26 2014. The returned refunds were created on May 21 and May 24, both of which fall after April 26 and before May 26. The endpoint appears to be working correctly.

Resources