source: dialogmanager/src/test/resources/dialogdemo.json@ 442

Last change on this file since 442 was 442, checked in by wouter, 21 months ago

#138 Allow multiple values in Set and SetBestMatch.

File size: 4.3 KB
Line 
1{
2 "specification": {
3 "phases": {
4 "START": {
5 "preparation": [
6 {
7 "SetBestMatch": [
8 "question",
9 [
10 {
11 "value": [
12 {
13 "txt": "Please enter a random number between 0 and 9."
14 }
15 ],
16 "condition": {
17 "True": {
18 }
19 }
20 },
21 {
22 "value": [
23 {
24 "txt": "Can you give a random number, at least 0 and at most 9."
25 }
26 ],
27 "condition": {
28 "True": {
29 }
30 }
31 }
32 ]
33 ]
34 }
35 ],
36 "stimulation": {
37 "Textual": {
38 "question": "[question]"
39 }
40 },
41 "answer": {
42 "NumberAnswer": {
43 "parameter": "random",
44 "min": -1000,
45 "max": 1000,
46 "stepsize": 1
47 }
48 },
49 "evaluation": [
50 {
51 "SetBestMatch": [
52 "phase",
53 [
54 {
55 "value": [
56 {
57 "txt": "goodnum"
58 }
59 ],
60 "condition": {
61 "Equal": [
62 "random",
63 {
64 "num": 5.0
65 },
66 5.0
67 ]
68 }
69 },
70 {
71 "value": [
72 {
73 "txt": "badnum"
74 }
75 ],
76 "condition": {
77 "Equal": [
78 "random",
79 {
80 "num": -5.0
81 },
82 5.0
83 ]
84 }
85 },
86 {
87 "value": [
88 {
89 "txt": "badnum"
90 }
91 ],
92 "condition": {
93 "Equal": [
94 "random",
95 {
96 "num": 15.0
97 },
98 5.0
99 ]
100 }
101 }
102 ]
103 ]
104 }
105 ]
106 },
107 "goodnum": {
108 "preparation": [
109 {
110 "SetBestMatch": [
111 "question",
112 [
113 {
114 "value": [
115 {
116 "txt": "Yes, [random] is between 0 and 9. Do you want to retry"
117 }
118 ],
119 "condition": {
120 "True": {
121 }
122 }
123 },
124 {
125 "value": [
126 {
127 "txt": "[random] is correct. Try again"
128 }
129 ],
130 "condition": {
131 "True": {
132 }
133 }
134 }
135 ]
136 ]
137 }
138 ],
139 "stimulation": {
140 "Textual": {
141 "question": "[question]?"
142 }
143 },
144 "answer": {
145 "BoolAnswer": {
146 "parameter": "retry"
147 }
148 },
149 "evaluation": [
150 {
151 "SetBestMatch": [
152 "phase",
153 [
154 {
155 "value": [
156 {
157 "txt": "END"
158 }
159 ],
160 "condition": {
161 "Equal": [
162 "retry",
163 {
164 "bool": false
165 },
166 0.5
167 ]
168 }
169 },
170 {
171 "value": [
172 {
173 "txt": "START"
174 }
175 ],
176 "condition": {
177 "Equal": [
178 "retry",
179 {
180 "bool": true
181 },
182 0.5
183 ]
184 }
185 }
186 ]
187 ]
188 }
189 ]
190 },
191 "badnum": {
192 "preparation": [
193 {
194 "SetBestMatch": [
195 "question",
196 [
197 {
198 "value": [
199 {
200 "txt": "Nah, [random] is outside 0 to 9. Do you want to retry"
201 }
202 ],
203 "condition": {
204 "True": {
205 }
206 }
207 },
208 {
209 "value": [
210 {
211 "txt": "That was not a correct answer. Try again"
212 }
213 ],
214 "condition": {
215 "True": {
216 }
217 }
218 }
219 ]
220 ]
221 }
222 ],
223 "stimulation": {
224 "Textual": {
225 "question": "[question]?"
226 }
227 },
228 "answer": {
229 "BoolAnswer": {
230 "parameter": "retry"
231 }
232 },
233 "evaluation": [
234 {
235 "SetBestMatch": [
236 "phase",
237 [
238 {
239 "value": [
240 {
241 "txt": "END"
242 }
243 ],
244 "condition": {
245 "Equal": [
246 "retry",
247 {
248 "bool": false
249 },
250 0.5
251 ]
252 }
253 },
254 {
255 "value": [
256 {
257 "txt": "START"
258 }
259 ],
260 "condition": {
261 "Equal": [
262 "retry",
263 {
264 "bool": true
265 },
266 0.5
267 ]
268 }
269 }
270 ]
271 ]
272 }
273 ]
274 }
275 }
276 },
277 "parameters": {
278 "values": {
279 "phase": {
280 "txt": "START"
281 }
282 }
283 }
284}
Note: See TracBrowser for help on using the repository browser.