Skip to content

Commit

Permalink
Changed the readme some and did work in the .gitignore. Also modified…
Browse files Browse the repository at this point in the history
… the verison requested for the spoken-numbers dependency.
  • Loading branch information
scottbea committed Sep 2, 2015
1 parent e6fd2eb commit 8047de7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
coverage
.coveralls.yml
.editorconfig
.idea/
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ var results = grammarGenerator.generateModels('Find flights from {airline} ', to

```

## Introduction to Alexa Skills
Alexa, the voice service that powers Echo, provides a set of built-in abilities, or skills, that enable customers to interact with devices in a more intuitive way using voice.
Examples of these skills include the ability to play music, answer general questions, set an alarm or timer and more.
With the Alexa Skills Kit, you can easily build and add your own skills to Alexa.
Customers can access these new skills simply by asking Alexa a question or making a command.

Developers can create their own implementations of Alexa skills. This involves building and packaging an Alexa skill as a configuration and implementing a backend service that interacts based on this definition.

The configuration for an Alexa skill must include the following components to define the voice interface:

An Intent Schema: A JSON structure which declares the set of intents your service can accept and process.
A set of Sample Utterances: A structured text file that connects the intents to likely spoken phrases and containing as many representative phrases as possible.
These inputs are entered in the Interaction Model section of an Alexa skill configuration.

## License
This code is licensed under the MIT license for [Scott Beaudreau](). For more
information, please refer to the [LICENSE](/LICENSE) file.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"license": "MIT",
"dependencies": {
"spoken-numbers": "0.0.0",
"spoken-numbers": "*",
"underscore": "^1.8.3"
}
}
19 changes: 16 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ describe('alexa-grammar', function () {
});
});
describe('alexa-grammar.basic', function () {
it('should be able to instantiate the helper object', function () {
assert(grammarGenerator !== null, 'We should have a valid object');
});
it('should support generating a grammar with a literal model and no topics', function () {
var results = grammarGenerator.generateModels('Mary had a little lamb');
assert(results.length === 1, 'There should be 1 results');
Expand Down Expand Up @@ -69,6 +66,22 @@ describe('alexa-grammar', function () {
});
});
describe('alexa-grammar.advanced', function () {
it('should support generating a grammar with a single model with two slots', function () {
var topics = {
airline: {
type: 'dictionary',
count: 100,
entries: [
{ id: 'aal', values: ['aa', 'american airlines', 'american'] },
{ id: 'dal', values: ['dl', 'delta airlines', 'delta'] }
]
},
flightNumber: {type: 'number', min: 10, max: 2000, count: 3, format: 'spelled'}
};
var results = grammarGenerator.generateModels('{airline} {flightNumber}', topics);
//console.log(require('util').inspect(results, {showHidden: true}));
assert(results.length === 18, 'There should be 18 results');
});
it('should support generating a grammar with a single model and multiple topic entries with multiple surface forms', function () {
var topics = {
airline: {
Expand Down

0 comments on commit 8047de7

Please sign in to comment.