Mixspace Lexicon logo Mixspace Lexicon

Entities are typically nouns, adjectives, or adverbs. Where intents are the actions a user wants to take, entities are the information relevant to that action. As an example, if a user says “Create a small red ball over here” the intent is to create. The entities are “small”, “red”, “ball”, and “here”. Ball is the object the user wishes to create. Small and red are adjectives describing that object. Here describes the position for that object.

Entities can be further broken down into Entity and EntityValue. An Entity is a group of values. For example, “Color” might be an entity with values “red”, “green”, and “blue”.

With Lexicon, entities are defined in Unity asset files. To create an entity, right click in the Project view and choose Create > Lexicon > Entity. You can choose between a basic entity, which is simply composed of values, or a typed entity, where each value has a binding of a given type. For example, the Color entity from the samples looks like this:

Entity

Note the optional synonyms. Each entity value can have a list of synonyms that will evaluate to the associated entity value. In the example above, if the user says “pink” it will match as “magenta”. Synonyms are a comma-delimited list of values.

Lexicon comes with a number of built-in entity types, such as Prefab, Material, and AudioClip. You can also extend the LexiconEntity class to create your own binding types. See Custom Bindings for more information.