72 | | * DialogSpecification. A kind of finite state machine. The nodes and edges are contained on a per-node basis in DialogPhases. |
73 | | * DialogPhase. Each dialog phase represents a situation where we want the user to answer some question. Each has a unique label. |
74 | | 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. |
75 | | * 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). |
76 | | * 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. |
77 | | * The Evaluation is a list of UpdateFunction s. |
| 71 | * DialogSpecification. A kind of finite state machine. The nodes and edges are contained on a per-node basis in {{{DialogPhase}}}s. |
| 72 | |
| 73 | The details of the DialogPhase are discussed below. |
| 74 | |
| 75 | == Dialog state |
| 76 | The dialog state is the entire state of the dialog, which is the DialogSpecificatino plus the Parameters. |
| 77 | |
| 78 | == Serialization |
| 79 | The entire DialogState, that is the Parameters and the DialogSpecification, including computation calls, are all json-serializable. All contained data structures can be (de)serialized to JSON. Parameters can be used to store the user's answers. But this is optional. The dialog can also proceed without storing any answers. |
81 | | * All data structures can be (de)serialized to JSON. |
82 | | * Various datastructures available to store key elements for dialog management |
83 | | * a DialogState represent the entire dialog state plus the entire dialog specification in a single file. Useful to store/recover the entire user state in one single file |
84 | | * A DialogSpecification represents all possible dialog phases. Useful to storethe entire dialog tree but without the user's answers so far |
85 | | * Parameters that store the user's answers so far |
86 | | * The NextPhase mechanism determines the next phase, based on the current parameter settings. The GoToIf selects the phase that has parameters that are smallest distance to the current state ++. The GoTo unconditionally jumps to the given state. |
87 | | * A DialogPhase can have multiple options, from which the one with the smallest distance to the current state++ is chosen. |
88 | | * Parameters can be manipulated programmatically, eg to update fields or incorporate data external to the dialog system such as system time, network state, database fields, etc. |
89 | | * Parameters can be used directly in the sentences and the available answers |
90 | | * The sentences can contain HTML code. |
| 88 | It contains specifically: |
| 89 | * a preparation which is a list of {{{UpdateFunction}}}s that allow preliminary computations to be done eg to prepare the stimulus |
| 90 | * a {{{Stimulus}}} which presents some sort of question to the user |
| 91 | * A {{{AnswerType}}} which defines how the user can specify his response |
| 92 | * An evaluuation which is again a list of {{{UpdateFunction}}}s, but these are typically used to determine the next {{{DialogPhase}}} by setting the "phase" parameter. |