【发布时间】:2018-02-22 17:27:25
【问题描述】:
我为我的 Alexa Skill 设置了两个意图,NextTrainIntent 和 TrainArrivalIntent。在我的示例话语中,我将它们映射如下:
NextTrainIntent what is the next train to {DestinationCity}
NextTrainIntent what's the next train to {DestinationCity}
NextTrainIntent when is the next train to {DestinationCity}
NextTrainIntent when is the next train from {OriginCity}
NextTrainIntent when is the next train from {OriginCity} to {DestinationCity}
NextTrainIntent when is the next train
TrainArrivalIntent when does train {TrainNumber} arrive at {DestinationCity}
TrainArrivalIntent when does train {TrainNumber} arrive
TrainArrivalIntent when does train {TrainNumber} get in
...
当我使用亚马逊的服务模拟器对此进行测试时,如果我输入以下语句作为文本:“火车 9306 何时到达”,则 服务请求 json 显示它已将话语映射到 NextTrainIntent,即使它与 TrainArivalIntent 的示例话语完全匹配:
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.ccafa51d-38de-4500-b17b-f94bbee1ad93",
"intent": {
"name": "NextTrainIntent",
但是,如果我测试该话语:“火车 9305 何时进入”,它会正确映射到 TrainArrivalIntent。
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.7a415e55-14b3-4789-9a83-0f6cf2f16a6c",
"intent": {
"name": "TrainArrivalIntent",
这里有什么问题?在这种情况下,“到达”这个词的存在对于辨别两种意图至关重要。但是,Alexa 似乎忽略了它。我怎样才能让它“到达”被使用?
【问题讨论】:
标签: alexa alexa-skills-kit alexa-skill