Skip to content
jerryfeldman edited this page Jul 18, 2016 · 9 revisions

The Token Tool is a GUI that allows a user to easily add vocabulary to an ECG grammar, as well as linking the vocabularies between the language and action sides of a given application.

Token Tool


Opening the Tool

To use the Token Tool, you first need to open the view. This is done by navigating to Window –> Open View –> Other, and then selecting the Token Adder view under the Token folder (see figure below).

Open View 1

Open View 2

Defining a Token

Let's say you want to add a new kind of action to your system, such as the word dash. First enter the token lemma and select the "parent type":

Selecting a Parent Type

Then select the ontology file and token file you want to add this new token information to; by default, these will be set to the first value in the corresponding entry in the preferences file.

Then, you'll want to select the role to modify. In the image below, we've selected the self.m.actionary role, and set the value to @dash.

Selecting role to modify

In this case, the application may not know what @dash means, so we can also set an application mapping, which produces a file as seen below. In the resulting n-tuple, @dash will be mapped onto move.

Robot mappings

We can also modify other roles, such as self.m.speed. Parameterizing the action like so will affect how the action-side (Problem Solver) carries out the action; in this case, we've defined dash to mean: "Use the same motor routine as you would for move, but do this faster."

Speed role