Dictionary definition

Meanings and phonetics of an English word.

  • Web
  • Since 0.2.0
  • addon
  • dictionary
  • word
  • definition
  • phonetics
  • web
  • data

Open in TuneToys

Dictionary definition as the Patch draws it, at default values: inlets on the left, outlets on the right.

Dictionary definition looks up an English word in the free dictionaryapi.dev service. It needs no key.

What it does#

The node is generated from the dictionary addon manifest. It requests GET https://api.dictionaryapi.dev/api/v2/entries/en/<word> and runs it like a Web request. response is a JSON list of entries; each has word, phonetics (text and, often, an audio URL), and meanings with a part of speech and definitions. A word the dictionary does not know answers HTTP 404 on status and error.

The word comes from the word port when cabled, otherwise from the node's word field. With trigger cabled each trigger asks; otherwise a new word asks; with no cable at all it asks once at start.

A Toy using this node requires the network and the dictionary addon, enabled in Settings → Addons. The service is free, without a key or service level; its definitions come from Wiktionary under CC BY-SA.

When to use it#

Use it for word games and text pieces: look up a word a player types, then speak, show or sonify its definition.

Ports#

PortDirectionSignalLanes
triggerInputData (trigger)1
wordInputData (string)1
responseOutputData (json)1
statusOutputData (integer)1
errorOutputData (string)1
doneOutputData (trigger)1

Parameters#

This node has no numeric parameters.

  • word: text.

The only setting is the word text field (up to 100 characters), used while the word port has no cable.

Tips#

  • The first definition is at /0/meanings/0/definitions/0/definition; pick it with Convert.
  • Keep lookups occasional; the service is run for free by its author.

See also#

Convert, Value, Console log, Data cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Define a word

beginner Teaches: data-cables

The dictionary node looks up a word; Convert picks the first definition.

Patch: Value value output connected to Dictionary definition word input. Dictionary definition response output connected to Convert value input. Convert value output connected to Console log value input.
Connections as text
  • Value value output connected to Dictionary definition word input
  • Dictionary definition response output connected to Convert value input
  • Convert value output connected to Console log value input
  • A cabled word asks each time it changes; the trigger is optional.
  • The response is a list of entries, each with meanings and definitions.
Frame preview: Define a wordFrame “Define a word” with 2 elements: text heading, text hint.DEFINE A WORDNeeds the network and the Free Dictionary addon enabled. A word the dictionary …
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Convert Convert a value to another datatype, optionally picking a field or formatting a string; failures go to error.
  • Console log Write each incoming value to the Console panel with a level and label, rate-limited.
  • Value A literal source, the data domain's number box and message box.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close