首页 文章

Alexa Custom Slot捡起额外的单词

提问于
浏览
0

我正在尝试为英国邮政编码创建一个自定义插槽(例如CB1 1PT) . 我设法在10月左右开始工作,但是,我回到了项目,看起来亚马逊已经更新了很多东西 .

这是我的Intent Schema:

{
  "intents": [
    {
      "intent": "GetOutages",
      "slots": [
        {
          "name": "postcode",
          "type": "LIST_OF_POSTCODES"
        }
      ]
    },
    {
      "intent": "GetCoverage",
      "slots": [
        {
          "name": "postcode",
          "type": "LIST_OF_POSTCODES"
        }
      ]
    },
    {
      "intent": "AMAZON.StopIntent",
      "slots": []
    },
    {
      "intent": "AMAZON.CancelIntent",
      "slots": []
    }
  ]
}

自定义插槽类型:

LIST_OF_POSTCODES S L six six D Y | C B one one P T | R G five four W L | G U one five one P B

一些示例话语:

GetOutages  outage info for {postcode}
GetOutages  fault info for {postcode}
GetOutages  information for {postcode}
GetOutages  outage information for {postcode}
GetOutages  fault information for {postcode}

问题是,当我尝试从插槽中检索值时,它似乎正在拾取完整的句子:

{  
   name:'GetOutages',
   slots:{  
      postcode:{  
         name:'postcode',
         value:'information for r g 54 w l'
      }
   }
}

有人有建议吗?

1 回答

  • 1

    不是一个正确的答案,但有些想法......

    你提供了样本的话语,但在你的其他话语中,是否存在任何非常短/通用的内容,以至于它们可能会无意中被匹配,然后大部分用户的实际话语被置于邮政编码中?

    另外,我想知道你那个插槽的单词列表是什么?由于它限制为65K项目,你无法提供所有的邮政编码,所以你采取什么样的捷径?

    最后,你真正需要的是英国邮政编码的内置插槽类型,就像它们有美国邮政编码一样 . 以下是ASK功能请求,并注意建议的停止间隙的链接:
    https://forums.developer.amazon.com/content/idea/41072/built-in-slot-type-for-uk-postcodes.html

    更正:有各种地址和城市内置插件,但他们也不支持美国邮政编码,所以我猜人们必须使用AMAZON.NUMBER .

相关问题