Skip to content

AMAZON.LITERAL utterances parsing #66

@cnadeau

Description

@cnadeau

Hi, I'm trying to use the lib, but I have a literal which doesn't seem to be properly parsed by the bespoken/virtual-core lib. Any idea how to get that processed correctly?

PS: I love this lib and I really want to use it. I'm pretty sure the problem is the format of the LITERAL slot with the pipe, but I'd rather ask you guys first.

If you have an idea and not time, just throw it in I'll do my best to get a PR up for that.

Intent:

{
          "name": "LiteralInput",
          "slots": [
            {
              "name": "literal",
              "type": "AMAZON.LITERAL"
            }
          ],
          "samples": [
            "{test | literal}",
            "{test2 | literal}",
          ]
}

Error:

Error: Invalid schema - not slot: test | literal for intent: LiteralInput
      at SamplePhraseTest.checkSlots (node_modules/virtual-core/lib/src/SampleUtterances.js:128:23)
      at new SamplePhraseTest (node_modules/virtual-core/lib/src/SampleUtterances.js:78:36)
      at SamplePhrase.matchesUtterance (node_modules/virtual-core/lib/src/SampleUtterances.js:54:16)
      at Utterance.matchIntent (node_modules/virtual-core/lib/src/Utterance.js:49:41)
      at new Utterance (node_modules/virtual-core/lib/src/Utterance.js:7:14)
      at LocalSkillInteractor.SkillInteractor.spoken (node_modules/virtual-alexa/lib/src/impl/SkillInteractor.js:64:25)
      at VirtualAlexa.utter (node_modules/virtual-alexa/lib/src/core/VirtualAlexa.js:53:33)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions