BML is the Bubblescript Match Language, a compact string matching language specifically designed to match user input against a pattern.
A constant is a variable which
has a fixed value that is never changed during the lifecycle of the
conversation. Constants start with the
A DSL is a "Domain Specific Language", which is usually designed to model problems in a specific domain. Bubblescript is a DSL that has been developed to model interactive conversations (chatbots).
The dialog manager is responsible for managing dialog state and select the best matching response. In Bubblescript, all state is kept in variables. Given this state and the users utterance the dialog manager will try to find the best (first) dialog that matches the intent of the user.
Guards are logical expressions associated to dialogs using
when. During dialog resolution, the guard expression is evaluated
and only when it returns
true, the dialog is considered.
Anything the user says. For example, if a user types “Do you have them in red?”, the entire sentence is the utterance.
An intent is the user’s intention. For example, if a user types “Do you have these shoes in red?”, the user’s intent is to retrieve a list of the shoes previously displayed (context) in red.
A flow is a special YAML file that represents a graphical conversation flow, as a graph consisting of nodes and links. Flows can be edited using a graphical flow editor.
dialog is the main building block of conversations. It groups
together and optionally names interactions with the user (statements).
Dialogs can be invoked either direclty via
invoke followed by a
dialog name, or indirectly when the dialog
trigger: matches in a
task is a set of commands that will be executed when the task is executed
perform or triggered by an
event. They are used for non-interactive
calculations and background processes, which cannot be interrupted by the user.
Blocks are interactions grouped together: everything between
and are passed in as an argument to that prepended statement:
In this example, the
random statement opens a block that will
randomly execute one of the lines in its block.
Statements in Bubblescript are actions that do something but don't return anything.
An expression is a combination of variables, operations and values that returns a result value.
greeting = "Hello " + name + ", " + random(["how are you?", "what's up?", "how you doing?"])
askcan be used as both statement and expression.