Entries and NLU variables
Entries
An entry is one row in the table view and the entry value can consist of plain text, or a reference to either a single Language Object or a single Entity. Each entry value can have zero, one or more NLU Variables attached in the following columns.
An entry value needs to be unique within the same Entity and Teneo Studio will prevent the user from saving the Entity if two entry values are the same.
The Longest Match option (:L
) is implicitly applied to Entity conditions.
Edit the entries
- Use the F2 button on the keyboard or double-click with the mouse to start editing a cell
- Use TAB to finish editing a cell and move horizontally to the next cell
- Use Return/Enter to finish editing and move vertically down to the next row
- Alternatively, use the buttons Add Entry or Delete in the top ribbon to manage the entries.
Navigate to Entity or Language Object
To navigate from a reference of an Entity or Language Object within the entry to the actual object, simply right-click with the mouse and, in the displayed menu, select to either open in read-only or edit mode.
Create Language Object or Entity
In the Entity editor, create a new Language Object or Entity from a reference by right-clicking the reference name and select to either Create Entity or Language Object in the displayed menu.
NLU Variable values
The entries of an Entity can have zero, one or more NLU Variables attached.
Variables are added (or deleted) using the buttons available in the top ribbon. The NLU Variable needs to either be of the type string or the type script.
To change the variable from string to script or vice versa, select the variable column and click the String/Script buttons available in the top ribbon.
String type variables are implicitly quoted and an NLU Variable value can be left empty when needed.
A script type variable can contain scripted values or manually quoted values, and when changing the type from string to script, quotes are added to the variable values; while when changing from script to string any leading or trailing quotes are removed from variable values and the implicit coral-colored ones remain.
The name of an NLU Variable cannot contain spaces or other special characters nor be named lob
or _USED_WORDS
, since it conflicts with special variables which hold those names.
To add the name of an NLU Variable, simply click the cell New_Variable and type the wanted name.
Reserved characters
Reserved characters used as entry values will automatically be escaped with quotes. A closing curly bracket used as script variable value will automatically be escaped with a backslash.
Please see the full list of reserved characters.
Adding variable values
When entering variable values, there is an auto-complete function which looks up other values already in the variable column and suggests the value text to the user. Pressing Enter copies the suggestion into the cell.
Propagation of variables from the referenced Language Object or Entity is made by using the lob.
prefix before the variable name.
Automatic propagation of variable values
NLU variables of referencing entries (an entry where the entry value is an Entity / Language Object - as opposed to a bare word) will be automatically set to propagate the variable value when a matching variable is present.
- A new referencing entry is added to the parent - any matching variables will be propagated
- A new variable is added to the parent - any referencing entry with matching variables will be propagated.
New Entry
CITIES
Entity contains acity_code
variable- A new
SPECIAL_CITIES
Entity / Language Object is added - which has acity_code
NLU variable - In the Entity
CITIES
a reference to theSPECIAL_CITIES
Entity / Language Object is added - The editor now detects the
city_code
variable on theSPECIAL_CITIES
Entity / Language Object and adds thelob.city_code
propagation script to the variable cell
Sorting the entries
It is possible to sort the data alphabetically by entry name or by one of the variables to help manage the data visually.
To sort by a specific column, select the column header, then the arrow will appear next to the name and it is possible to sort either a-z or z-a:
Related topics
NLU Variables and propagation scripts
Language Object Variables
Scripts and Groovy