Skip to content

Builds an Alexa Interaction Model in JSON format from plain text.

Notifications You must be signed in to change notification settings

jrobertson/alexa_modelbuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Generate an Alexa Interaction Model using the alexa_modelbuilder gem

require 'alexa_modelbuilder'

s =<<LINES
invocation: quiz game

PlayGame

  start the game
  start the quiz
  play the quiz
  start a quiz  

types: 
  US_STATE_ABBR: AK, AL, AZ

AMAZON.StopIntent
LINES


puts AlexaModelBuilder.new(s).to_json

Output:

{
  "interactionModel": {
    "languageModel": {
      "invocationName": "quiz game",
      "intents": [
        {
          "name": "PlayGame",
          "samples": [
            "start the game",
            "start the quiz",
            "play the quiz",
            "start a quiz"
          ]
        },
        {
          "name": "AMAZON.StopIntent",
          "samples": [

          ]
        }
      ],
      "types": {
        "name": "US_STATE_ABBR",
        "values": [
          {
            "name": {
              "value": "AK"
            }
          },
          {
            "name": {
              "value": "AL"
            }
          },
          {
            "name": {
              "value": "AZ"
            }
          }
        ]
      }
    }
  }
}

Resources

alex model json builder

About

Builds an Alexa Interaction Model in JSON format from plain text.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages