0

My intent schema uses an AMAZON.NUMBER slot:

{
  "intents": [
    {
      "intent": "MyIntent",
      "slots": [
        {
          "name": "Foo",
          "type": "AMAZON.NUMBER"
        }
      ]
    }
  ]
}

Smaller numbers like "two thousand" show up properly in the IntentRequest...

{
  "version": "1.0",
  "request": {
    "Intent": {
      "name": "MyIntent",
      "slots": {
        "Foo": {
          "name": "Foo",
          "value": "2000"
        }
      }
    },
    "type": "IntentRequest"
  }
}

Unfortunately, it doesn't seem to handle expressions such as "four point five million":

{
  "version": "1.0",
  "request": {
    "Intent": {
      "name": "MyIntent",
      "slots": {
        "Foo": {
          "name": "Foo",
          "value": "?"
        }
      }
    },
    "type": "IntentRequest"
  }
}

Do I need to use an AMAZON.LITERAL slot and feed the value into my own number expression parser? Or is there a better way?

Max
  • 9,220
  • 10
  • 51
  • 83

1 Answers1

1

The AMAZON.NUMBER slot type will not handle well sequences of numbers (e.g. a telephone or bank account number) and in my experience it will not handle decimals or numbers that have any "utterance" between them. On top of that, AMAZON.LITERAL is deprecated so it may be difficult to capture this kind of numbers using the current API. Sorry.

Josep Valls
  • 5,483
  • 2
  • 33
  • 67
  • Bummer. I guess the only hope is that Amazon makes improvements to AMAZON.NUMBER in the future. Thanks! – Max May 16 '17 at 17:08