Skip to content

Tokens

Tokens are the elements that are processed on the Blackboard. These can be supplied by external components (speech recognisers, NLU, pointing devices, ...), but can also be generated directly in stepDP (e.g. through fusion). Tokens are part of the knowledge base and can be used equivalently to concrete instances from the knowledge base (they both implement the same interface).

If tokens are injected externally via the API, they are represented as JSON. There is only the mandatory field type, which defines the type of the token. The types defined in the semantic tree can be used as the type for the token. If the type forces certain fields, these must be set. In addition, any data can be stored within the token.

An example token of a gaze recogniser could look like this:

{
  type : "GazeData",
  objectInView : "bottle",
  certainty : 0.87564,
  other : "firmware update available"
}

A token of the type GazeData is created here. This type enforces the fields objectInView and certainty. Other data that is not specified in the type is also provided in the other field.

As soon as a token is transferred via the API, a timestamp is also stored and a unique UUID is assigned to the token. In addition, information such as the source of the token is stored.