The Condition editor, available in Flows' Condition Match Requirements and similar to the editor of Language Objects, provides the option to write language conditions using Language Objects and Entities or even plain words.
The condition writing is done in Teneo's Linguistic Modelling Language, an introduction to this can be found here while an extended reference manual is available here. The Condition editor also allows to attach scripts (predicate scripts and propagation scripts) and to condition on annotations.
The auto-complete functionality of the condition editor offers suggestions when typing a reference to an Entity name or Language Object name or alias.
To use the auto-complete functionality, type
% (percentage sign) followed by the first letter(s) of the Language Object or Entity and then 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 condition.
Condition building assistant
The Condition building assistant suggests which Entities or Language Objects to use to capture specific words expected in the user input.
To use the assistant, type the word to capture in the condition editor, select it and press Ctrl+space. Next, a list of Language Objects and/or Entities containing that word will be suggested to the user.
When writing more than one word, the words needs to be selected before pressing Ctrl+space for the condition building assistant to suggest objects for all the selected words.
When a user adds a Condition Match Requirement to an Intent Trigger or Transition, the below advanced options are available.
In a Condition Match Requirement is is possible to draft a condition based on the positive and negative examples written in the Trigger or Transition.
To draft a condition follow the below steps:
- In the Match Requirement section of the Trigger or Transition, click Add
- Select Condition from the menu
- Expand the Advanced Options below the Condition editor
- Click Draft Condition
Note that the Draft Condition button is disabled when the Trigger or Transition doesn't contain any positive examples.
If more positive or negative examples are added to the Trigger or Transition, the user can click Draft Condition again to get a new condition suggested.
Limit unused words to
This setting allows the user to define the number of words, besides those specified in the language condition, may be contained in the user input for that condition to be satisfied.
To define this advanced option, simply tick the Limit unused words to option and set the number of words that should be permitted.
Unrecognized Language Objects or Entities
When referring in the Condition 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 directly from the Condition editor, simply follow the below steps:
- Double-click the name of the non-existing Language Object or Entity, or single-click while holding the Alt key down.
- In the newly opened window, select the folder where the object should be created. 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 condition or entries of the Entity and click Save when finished.
- Back in the original Condition editor, the object will now be printed in a greenish color (see section below).
The Condition editor, of both Condition Match Requirements and Language Objects, includes support for syntax highlighting.
|Recognized Language Objects|
|Variable names and operators|
|Comments and quoted strings|
|NLU script values|
|Parentheses matching: Placing the cursor after a parenthesis will highlight the matching pair in pale green.|
|Missing parentheses or operators|
|Unrecognized Language Objects and Entities|
|Disabled Language Objects|