Tutorial: Build a dictionary skill

This is the lede paragraph for the blog post. It should be populated with dynamic data from a WYSIWYG custom field assigned to your posts.

Written by

Kevin Elgan

Published on

BlogTutorials

In this skill challenge we will be building a simple dictionary skill to look up the meaning of any word.

Have you ever come across a word and not know what it means? Today we are going to teach Chatterbox how to look up word definitions for you so you can be a real life lexicon master.

Let’s build the skill!

When in the Skill Builder, if you look under the “Internet” category, you’ll find a block named Get Meaning for. This block does exactly what it says. It can either get the meaning of a word, it’s synonyms or it’s antonyms.

The Get Meaning block does exactly what it says:

The same way we start all skills, let’s brainstorm how we or other people might ask questions about word meanings. You might say “define [word]” or “What’s the meaning of [word]” or “what’s the definition of [word]”.

Since we’ll be listening for multiple phrases, we’ll use the Listen to Phrases block. Keep in mind that we are listening for a specific word, so we’ll also need to create a “word” variable.

Next, we’ll be feeding the “word” variable to the Get meaning block to fetch the definition. Any time that we use an API block, we need to store the returned information in a variable. Since we are fetching the definition, we can store it in a variable that we will create called “definition.”

Last step is to speak the definition back to the user. For this you need to feed the “definition” variable to the Speak block as we’ve done in previous skills.

Your final skill should look something like this:

The Get Meaning block has additional functionality for synonyms and antonyms. This additional functionality will mimic the behavior of the Definition skill with a few language tweaks. Can you extend this skill to include Synonyms and Antonyms?

Related Posts