21 | | The dialog manager contains a number of key objects |
22 | | * Dialog specification. A kind of finite state machine. The nodes are "dialog phases" and each have a unique label. The START and END phase indicate the usual start and end of the dialog. |
23 | | * Dialog phase. Each dialog phase represents a situation where we want the user to answer some question. This question can be formulated in different ways depending on the situation and user's previous answers. Therefore the phase contains a number of DialogOptions |
24 | | * A DialogOption is a concrete sentence with a question for the user, plus the expected type of the answer (boolean (yes/no), number, text). |
25 | | * Dialog state. The current state of the dialog, comprising the situation and the user's answers so far. Stored as a set of Parameters. |
26 | | * Parameters. A set of key-value pairs where the keys are unique string labels and the values are a ParameterValue (a String, Double, or boolean). |
| 21 | == Dialog specification |
| 22 | The dialog specification specifies the different states/phases of the dialog, and the set of questions (options) available at each phase. The following objects are used to represent this |
| 23 | |
| 24 | * DialogSpecification. A kind of finite state machine. The nodes and edges are contained on a per-node basis in DialogPhases. |
| 25 | * DialogPhase. Each dialog phase represents a situation where we want the user to answer some question. Each has a unique label. The START and END label indicate the usual start and end of the dialog. |
| 26 | In each phase, a number of similar questions called DialogOption are available. Also the DialogPhase defines the NestPhase which can determine what is the next DialogPhase to go. |
| 27 | * A DialogOption is one of multiple ways to proceed in a given {@link DialogPhase}. It consists of a simulation (something presented to the user, eg a question) and the answer type expected from the user (eg, a number between 0 and 10). |
| 28 | * Dialog state. The current state of the dialogL the DialogSpecification, a set of Parameters comprising the culmination of the user's answers so far, and the (randomly) chosen DialogOption for the current Phase. |
| 29 | |