Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added entity resolution and dynamo docs
- Loading branch information
John Kelvie
committed
May 16, 2018
1 parent
08dcacd
commit fa22e51
Showing
3 changed files
with
190 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# Virtual Alexa and Entity Resolution | ||
Virtual Alexa now supports Entity Resolution. To take advantage of it, just use Virtual Alexa as normal - | ||
it will now automatically add the correct resolution information to your request payloads, like so: | ||
|
||
``` | ||
{ | ||
"request": { | ||
"locale": "en-US", | ||
"requestId": "amzn1.echo-external.request.c89fbf6b-59be-468f-acc5-0e7d3da091d3", | ||
"timestamp": "2018-05-16T16:36:05Z", | ||
"type": "IntentRequest", | ||
"intent": { | ||
"name": "CountryCode", | ||
"slots": { | ||
"countryCodeSlot": { | ||
"name": "countryCodeSlot", | ||
"value": "England", | ||
"confirmationStatus": "NONE", | ||
"resolutions": { | ||
"resolutionsPerAuthority": [ | ||
{ | ||
"authority": "amzn1.er-authority.echo-sdk.amzn1.echo-sdk-ams.app.ad9e4502-4b6e-4060-b601-1fd680eb0d81.COUNTRY_CODE", | ||
"values": [ | ||
{ | ||
"value": { | ||
"id": "UK", | ||
"name": "UK" | ||
} | ||
} | ||
], | ||
"status": { | ||
"code": "ER_SUCCESS_MATCH" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
This is generated by calling: | ||
``` | ||
virtualAlexa.utter("I live in England") | ||
``` | ||
|
||
## What Is Supported? | ||
### Multiple synonym matches | ||
When multiple synonyms match a a slot value, more than one resolution will be sent, like in the example below: | ||
|
||
``` | ||
{ | ||
"name": "countryCodeSlot", | ||
"value": "Europe", | ||
"confirmationStatus": "NONE", | ||
"resolutions": { | ||
"resolutionsPerAuthority": [ | ||
{ | ||
"authority": "amzn1.er-authority.echo-sdk.amzn1.echo-sdk-ams.app.0fd9931c-4d0f-4e70-ae4b-1244216010fa.COUNTRY_CODE", | ||
"values": [ | ||
{ | ||
"value": { | ||
"id": "DE", | ||
"name": "DE" | ||
} | ||
} | ||
], | ||
"status": { | ||
"code": "ER_SUCCESS_MATCH" | ||
} | ||
}, | ||
{ | ||
"authority": "amzn1.er-authority.echo-sdk.amzn1.echo-sdk-ams.app.0fd9931c-4d0f-4e70-ae4b-1244216010fa.COUNTRY_CODE", | ||
"values": [ | ||
{ | ||
"value": { | ||
"id": "UK", | ||
"name": "UK" | ||
} | ||
} | ||
], | ||
"status": { | ||
"code": "ER_SUCCESS_MATCH" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### Builtin Slot Extensions | ||
When extending builtin slots, the status code will be set correctly based on whether an extension is matched, like so: | ||
|
||
``` | ||
{ | ||
"name": "citySlot", | ||
"value": "city by the bay", | ||
"confirmationStatus": "NONE", | ||
"resolutions": { | ||
"resolutionsPerAuthority": [ | ||
{ | ||
"authority": "amzn1.er-authority.echo-sdk.amzn1.echo-sdk-ams.app.e768a0d1-d59c-4fb9-aa7e-84f285315a94.AMAZON.Cities", | ||
"values": [ | ||
{ | ||
"value": { | ||
"id": "San Francisco", | ||
"name": "San Francisco, CA" | ||
} | ||
} | ||
], | ||
"status": { | ||
"code": "ER_SUCCESS_MATCH" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
And if there is no match for the custom slot value, that will also be indicated: | ||
|
||
``` | ||
{ | ||
"citySlot": { | ||
"name": "citySlot", | ||
"value": "Chicago", | ||
"confirmationStatus": "NONE", | ||
"resolutions": { | ||
"resolutionsPerAuthority": [ | ||
{ | ||
"authority": "amzn1.er-authority.echo-sdk.amzn1.echo-sdk-ams.app.ef3fc3cd-03d7-414e-ab84-ca08730413ce.AMAZON.Cities", | ||
"values": [], | ||
"status": { | ||
"code": "ER_SUCCESS_NO_MATCH" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Happy testing! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters