1

I am building a cricket stats alexa skill which requires the playerName to filter out information. I cannot use AMAZON.US_FIRST_NAME because of the following reasons:

  • It only detects the first name and not the whole name
  • There are playerName from around the globe, so AMAZON.US_FIRST_NAME isn't a good fit.

Even if I want to use AMAZON.LITERAL (which is not recommended by Amazon) I need to have slot values. But the slot values can be any player names, so the sample utterances will be huge.

One way to do this is to hard-code all playerName with slot values. But is it a best practice to do this since the slot values can be quite big in number?

Is there any workaround for this?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
ashwani
  • 690
  • 3
  • 16
  • I will recommend you to use the AMAZON.US_FIRST_NAME only and as user tell the name of player, you can prompt user that there are multiple name with the initial and to get the information please provide last name OR club OR country name OR date of birth if remember. – Rahul Gupta Jan 24 '18 at 14:17

1 Answers1

0

Use Custom slot https://developer.amazon.com/docs/custom-skills/custom-interaction-model-reference.html#custom-slot-type-values , currently you can have 50,000 custom slot values ( which i feel are sufficient for player names ). e.g.

Intent Schema

{
  "intents": [
    {
      "slots": [
        {
          "name": "PLAYER_NAME",
          "type": "PLAYERS"
        }
      ],
      "intent": "GetPlayerData"
    }
  ]
}

Custom_Slot_Value Type PLAYERS

Sachin,

Saurabh, ....

Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32
  • Yes, that is the only solution as of now to hardcode player names. Depending on the data update, `playerName` can have new values and that's when it won't work. – ashwani Jan 30 '18 at 07:21
  • 1
    you always can use ASK CLI interface to update it ( write cron job to read player names from database etc ) https://developer.amazon.com/docs/smapi/ask-cli-command-reference.html . Its in beat version so i'm sure amazon will provide good examples in future... – Amod Gokhale Jan 30 '18 at 08:49
  • but it's not capturing normal name with First and Last name both for example "Pardep Jain" it will pick only first one or sometimes other name – Pardeep Jain Nov 06 '20 at 08:03
  • @PardeepJain - please check in input log what value is printed for pardeep? – Amod Gokhale Nov 06 '20 at 09:54
  • its showing "Pradeep", "Pardip", "pradeep jaan" etc, but not "Pardeep Jain". Same happened with another name which is "Danny stone" whereas skill is showing "danny", "dannys tone" "dannies" etc – Pardeep Jain Nov 06 '20 at 12:11
  • connect with their support team https://developer.amazon.com/public/support/contact/contact-us – Amod Gokhale Nov 06 '20 at 12:54