Skip to content

Alexa responds with the count and anagrams for a requested word

License

Notifications You must be signed in to change notification settings

evanchiu/alexa-anagram

Repository files navigation

alexa-anagram

Alexa responds with the count and anagrams for a requested word

Skill Usage

"Alexa, ask anagrams for apple"

"Apple has 17 subanagrams: a, ale, ape, apple, la, lap, lea, leap, pa, pal, pale, pap, pea, peal, pep, plea"

Deploy with CloudFormation

Prerequisites: Node.js and AWS CLI installed

  • Create an AWS Account and IAM User with the AdministratorAccess AWS Managed Policy
  • Run aws configure to put store that user's credentials in ~/.aws/credentials
  • Create an S3 bucket for storing the Lambda code and store its name in a shell variable with:
    • export CODE_BUCKET=<bucket name>
  • Npm install:
    • npm install
  • Build:
    • npm run build
  • Upload package to S3, transform the CloudFormation template:
    • npm run package
  • Deploy to CloudFormation:
    • npm run deploy

Deploy from the AWS Serverless Application Repository

Alexa Setup

  • Open the AWS Console, and navigate to your lambda, copy the ARN
    • Should be something like arn:aws:lambda:us-west-2:000000000000:function:dev-alexa-anagram-username-anagram-XXXXXXXXXXXXX
  • Open the Amazon Developer Console
    • Navigate to Alexa / Alexa Skills Kit/ Add a new Skill
    • Fill in skill information
    • Copy interaction-model.json in for the interaction model
    • In Configuration, paste the copied ARN from Lambda
    • In test, enter utterance "for apple" and hit Ask Anagram

Data

The dictionary is 6of12.txt, with single-letter words other than "a" removed, along with all words containing non lowercase letters (e.g. proper nouns, hyphenations, contractions, etc.). See original information about 12dicts.

Links

License

© 2017-2019 Evan Chiu. This project is available under the terms of the MIT license.

About

Alexa responds with the count and anagrams for a requested word

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published