Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Latest commit

 

History

History
executable file
·
51 lines (34 loc) · 1.22 KB

README.md

File metadata and controls

executable file
·
51 lines (34 loc) · 1.22 KB

intent-utterance-generator

Alexa Skills Kit Sample Utterances generator.

Install

npm install intent-utterance-generator

Usage

The generator expects an object with intent names as keys and phrases to expand as the values. It uses intent-utterance-expander to expand phrases.

The result is a Buffer containing the generated expanded phrases which you can then copy over it to the Sample Utterances input field in the Alexa Skills Kit portal.

const intentUtteranceGenerator = require('intent-utterance-generator');

var intents = {
  StartNewGameIntent: [
    '(start|begin|launch) new game',
    'start over'
  ],
  HighScoreIntent: 'What are the (top|high) scores'
};

console.log(intentUtteranceGenerator(intents).toString());

/*
StartNewGameIntent start new game
StartNewGameIntent begin new game
StartNewGameIntent launch new game
StartNewGameIntent start over

HighScoreIntent What are the top scores
HighScoreIntent What are the high scores
*/

Test

npm test

License

MIT