Teneo Developers

Syntax Editor

Introduction

The Syntax editors can be found in, among others, TLML Syntax Matches, Language Objects and Listeners, and they provide the option to write syntaxes using references to Language Objects and/or Entities, plain words or attaching scripts (predicate scripts and propagation scripts) or even references to annotations. The syntax language used is Teneo Linguistic Modeling Language; a reference manual is available here.

The below sections summarize the functionalities available in the Syntax editor.

Auto-complete

The auto-complete functionality of the Syntax editor offers suggestions when starting to type a reference to the name of an Entity or the name/alias of a Language Object.
To use the auto-complete functionality, follow the below steps:

  • type % (percentage sign)
  • write the first letter(s) of the name/alias
  • press Ctrl + space

A list of Entity and Language Object names beginning with the same set of letters will be displayed, and the user can choose any one of them to use in the TLML Syntax.

Condition building assistant

The TLML Syntax condition building assistant suggests which Entities or Language Objects to use in order to capture words expected in the user input.
To use the assistant, follow the below steps:

  • type the letters/word to capture
  • select the letters/word
  • press Ctrl + space

A list of Entities and Language Objects containing the word or letter combination will be suggested to the user.

When writing more than one word, all the words need to be selected to get suggestions on all the words (when pressing Ctrl + Space).

In Teneo Studio Web, when adding Language Object and Entity Matches or After Matches, the initially displayed list of suggestions (before writing anything in the text field) contains a list of the 20 most recently added or modified Language Objects/Entities

Syntax highlighting

The Syntax editor provides support for syntax highlighting and the below table includes an overview of the available highlighting; also see the Troubleshooting TLML Syntax page for more information on specific syntax errors.

ColorUsed for...Example
Recognized Language ObjectRecognized Language ObjectsRecognized Language Objects
Recognized EntityRecognized EntityRecognized Entity
Variable names and operatorsVariable names and operatorsVariable names and operators
AnnotationsAnnotationsAnnotations
Color of commentsComments and quoted stringsThis is a comment
ScriptsScriptsScript
Missing parentheses or operatorsMissing parentheses or operatorsMissing parentheses or operators
Unrecognized objectUnrecognized Language Objects and EntitiesUnrecognized object
Disabled Language ObjectDisabled Language ObjectsDisabled Language Object
Disabled EntityDisabled EntitiesDisabled Entity
Parentheses matchingTeneo Studio Desktop only Parentheses matching: Placing the cursor after a parenthesis will highlight the matching pair in pale green.Parentheses matching
NLU script valuesTeneo Studio Desktop only NLU script values are printed in orangeNLU Script values
NLU scriptsTeneo Studio Web only NLU scripts are printed in dark green

Indent and Outdent

To indent and outdent text in Syntax editors, use the below key combinations:

  • Tab indents the line
  • Shift + Tab outdents the line

Find

Teneo Studio allows to find specific text in Syntax editors by using the Find function.

  • Ctrl + F opens the Find text box
  • Writing text allows to find and match text in the editor (and highlights the found text)
  • Navigate the matched instances by pressing the up and down buttons

Expand

In Teneo Studio Web, the developer can expand the TLML editor by clicking the expand icon available on hover over which allows for a better overview of the TLML syntax and a broader workspace.

Expand

Click outside the expanded view to close it again.

Unrecognized Language Objects or Entities

The below section currently only apply toTeneo Studio Desktop

When referring in the Syntax editor to a non-existing Language Object or Entity, the object will be printed in red and struck-through; it is possible to create the new object from the Syntax editor, simply follow the below steps:

  • Double-click the name of the non-existing object, or single-click while holding the Alt key down
  • In the newly opened window, select the folder where the object should be created and click OK
  • Now, a new Language Object / Entity window opens, specify the Properties of the object; when done click the green Play icon or the back arrow in the top left corner
  • Add the Language Object's TLML syntax or the entries of the Entity, click Save when finished
  • Back in the original Syntax editor, the object is now printed in a greenish color (see above table).