question

vbs avatar image
vbs asked

How to handle abbreviations like TV?

I have problems using abbreviations in Alexa. Lets say I have this sample utterance:

AvrInputIntent stelle eingang {Device} auf {AvrInput_Value} 

The custom slot type "AvrInput_Value" is defined like this:

p. c.
t. v.

So as far as I understand this documentation (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference#custom-slot-type-values) Alexa is supposed to send the value "PC" (as Slot Value Output) when I say "P"-"C" (or type "p. c." in the simulator).

But whatever I try Alexa always sends the string "p. c." as "AvrInput_Value" in the JSON-Request. According to the documentation I would expect to see "PC" in the "AvrInput_Value".

Sample:

stelle eingang verstärker auf p. c.

Request:

"request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.1c06e0d8-f796-46b1-b8c5-9848f28dbcb8",
    "locale": "de-DE",
    "timestamp": "2017-02-13T17:44:58Z",
    "intent": {
      "name": "AvrInputIntent",
      "slots": {
        "Device": {
          "name": "Device",
          "value": "verstärker"
        },
        "AvrInput_Value": {
          "name": "AvrInput_Value",
          "value": "p. c."
        },
        "preposition": {
          "name": "preposition"
        },
        "Room": {
          "name": "Room"
        },
        "article": {
          "name": "article"
        }
      }
    }
alexa skills kitintentshow-to
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I think the slot value you'd want to set is 'PC'; the spoken form of 'p. c.' will then map to that.

0 Likes 0 ·
vbs avatar image vbs Jamie Grossman ♦♦ ·

I am not sure if I understand you correctly but I have tried this now:

In my "Custom Slot Type" AvrInput_Value I have put this:

PC 
TV

Then in service simulator I put this:

stelle eingang verstärker auf p. c.

So now I would expect that my input "p. c." gets mapped to the string "PC", right? But too bad it still sends "p. c." in the request as value for "AvrInput_Value":

"request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.7f81322b-562c-4909-99a4-181334a5f686",
    "locale": "de-DE",
    "timestamp": "2017-02-15T19:04:09Z",
    "intent": {
      "name": "AvrInputIntent",
      "slots": {
        "Device": {
          "name": "Device",
          "value": "verstärker"
        },
        "AvrInput_Value": {
          "name": "AvrInput_Value",
          "value": "p. c."
        },
        "preposition": {
          "name": "preposition"
        },
        "Room": {
          "name": "Room"
        },
        "article": {
          "name": "article"
        }
      }
    }

Any others hints please?

0 Likes 0 ·
vbs avatar image
vbs answered

Really noone knows how to properly use abbreviations? :(

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered

You're correct in how you're using them, you want to use periods in the utterances, as per https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference#h3_intentref_rules. However, there's no guarantee that we will remove them when before we send them to your skill, so if you rely on them not being there you should have some simple rules to remove the periods in the abbreviations before you process them.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.