This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
/
Copy pathwatson-pizzeria.json
587 lines (587 loc) · 14 KB
/
watson-pizzeria.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
{
"name": "WatsonPizzeria",
"intents": [
{
"intent": "help",
"examples": [
{
"text": "I don't understand"
},
{
"text": "help"
},
{
"text": "What can I do"
},
{
"text": "help please"
}
]
},
{
"intent": "exit",
"examples": [
{
"text": "no"
},
{
"text": "get me out of here"
},
{
"text": "get me out"
},
{
"text": "cancel"
},
{
"text": "exit"
},
{
"text": "I'm done"
}
]
},
{
"intent": "order",
"examples": [
{
"text": "I am hungry"
},
{
"text": "I'd like a pizza"
},
{
"text": "I want to order a pizza"
},
{
"text": "I want to order a large pizza"
},
{
"text": "Can I get a pizza margherita, small please"
},
{
"text": "za"
},
{
"text": "order"
}
]
},
{
"intent": "reset",
"examples": [
{
"text": "begin"
},
{
"text": "start again"
},
{
"text": "delete the inputs"
},
{
"text": "reset"
}
]
}
],
"entities": [
{
"entity": "pizza_type",
"values": [
{
"type": "synonyms",
"value": "vegetarian",
"synonyms": [
"vegetariana"
]
},
{
"type": "synonyms",
"value": "cheese",
"synonyms": []
},
{
"type": "synonyms",
"value": "margherita",
"synonyms": []
},
{
"type": "synonyms",
"value": "quatro formaggi",
"synonyms": []
}
]
},
{
"entity": "pizza_toppings",
"values": [
{
"type": "synonyms",
"value": "mushrooms",
"synonyms": [
"mushroom"
]
},
{
"type": "synonyms",
"value": "anchovies",
"synonyms": [
"anchovy"
]
},
{
"type": "synonyms",
"value": "pepperoni",
"synonyms": []
},
{
"type": "synonyms",
"value": "sausage",
"synonyms": []
},
{
"type": "synonyms",
"value": "cheese",
"synonyms": []
},
{
"type": "synonyms",
"value": "ham",
"synonyms": []
},
{
"type": "synonyms",
"value": "olive",
"synonyms": [
"olives"
]
},
{
"type": "synonyms",
"value": "salami",
"synonyms": []
},
{
"type": "synonyms",
"value": "onion",
"synonyms": []
}
]
},
{
"entity": "pizza_place",
"values": [
{
"type": "synonyms",
"value": "go",
"synonyms": [
"home",
"take",
"take out"
]
},
{
"type": "synonyms",
"value": "stay",
"synonyms": [
"restaurant",
"eat in",
"eat there",
"dine in"
]
}
]
},
{
"entity": "extra_confirmed",
"values": [
{
"type": "synonyms",
"value": "no",
"synonyms": []
},
{
"type": "synonyms",
"value": "yes",
"synonyms": []
}
]
},
{
"entity": "pizza_size",
"values": [
{
"type": "synonyms",
"value": "large",
"synonyms": []
},
{
"type": "synonyms",
"value": "medium",
"synonyms": [
"regular"
]
},
{
"type": "synonyms",
"value": "small",
"synonyms": []
}
]
}
],
"language": "en",
"metadata": {
"api_version": {
"major_version": "v1",
"minor_version": "2018-09-20"
}
},
"description": "Basic pizza ordering with optional topping, basic version with one attempt to provide toppings",
"dialog_nodes": [
{
"type": "event_handler",
"parent": "slot_3_1494421237824",
"context": {
"pizza_size": "@pizza_size"
},
"conditions": "@pizza_size",
"event_name": "input",
"dialog_node": "handler_5_1494421285663",
"previous_sibling": "handler_4_1494421274527"
},
{
"type": "event_handler",
"output": {
"text": "What size of pizza do you want (small, medium or large)"
},
"parent": "slot_3_1494421237824",
"event_name": "focus",
"dialog_node": "handler_4_1494421274527"
},
{
"type": "event_handler",
"output": {},
"parent": "slot_16_1501069677090",
"event_name": "focus",
"dialog_node": "handler_18_1501069677090",
"previous_sibling": "handler_17_1501069677090"
},
{
"type": "event_handler",
"parent": "slot_16_1501069677090",
"context": {
"pizza_place": "@pizza_place"
},
"conditions": "@pizza_place",
"event_name": "input",
"dialog_node": "handler_17_1501069677090"
},
{
"type": "slot",
"parent": "Pizza ordering",
"variable": "$pizza_size",
"dialog_node": "slot_3_1494421237824",
"previous_sibling": "node_8_1494705793073"
},
{
"type": "slot",
"output": {},
"parent": "Pizza ordering",
"variable": "$pizza_type",
"dialog_node": "slot_6_1494421302730",
"previous_sibling": "slot_3_1494421237824"
},
{
"type": "response_condition",
"output": {
"text": {
"values": [
"Thank you for ordering a $pizza_size $pizza_type pizza with <? $pizza_toppings.join(', ') ?> ."
],
"selection_policy": "sequential"
}
},
"parent": "Pizza ordering",
"conditions": " $pizza_toppings && $pizza_toppings.size()>0",
"dialog_node": "node_19_1501070902849",
"previous_sibling": "node_7_1494705728892"
},
{
"type": "slot",
"output": {},
"parent": "Pizza ordering",
"metadata": {},
"variable": "$pizza_toppings",
"dialog_node": "slot_1_1494704123064",
"previous_sibling": "slot_6_1494421302730"
},
{
"type": "slot",
"parent": "Pizza ordering",
"variable": "$pizza_place",
"dialog_node": "slot_16_1501069677090",
"previous_sibling": "slot_1_1494704123064"
},
{
"type": "response_condition",
"output": {
"text": {
"values": [
"Thank you for ordering a $pizza_size $pizza_type pizza."
],
"selection_policy": "sequential"
}
},
"parent": "Pizza ordering",
"dialog_node": "node_8_1494705793073",
"previous_sibling": "node_19_1501070902849"
},
{
"type": "response_condition",
"output": {
"text": {
"values": [
"Thank you for ordering a $pizza_size $pizza_type pizza with <? $pizza_toppings.join(', ') ?> . We'll plan on <?$pizza_place == 'stay'? 'you eating here.' : ' you taking this home'?>."
],
"selection_policy": "sequential"
}
},
"parent": "Pizza ordering",
"conditions": "$pizza_toppings && $pizza_toppings.size()>0 && $pizza_place",
"dialog_node": "node_7_1494705728892",
"previous_sibling": "handler_10_1500495433159"
},
{
"type": "event_handler",
"output": {
"text": {
"values": [
"You can choose size (small, medium, large), type (cheese, margherita, quatro formaggi, or vegetarian) and extra ingredients."
]
}
},
"parent": "Pizza ordering",
"metadata": {},
"conditions": "#help",
"event_name": "generic",
"dialog_node": "handler_10_1500495433159"
},
{
"type": "event_handler",
"output": {
"text": {
"values": []
}
},
"parent": "slot_6_1494421302730",
"conditions": "",
"event_name": "filled",
"dialog_node": "handler_5_1500492489376",
"previous_sibling": "handler_8_1494421347721"
},
{
"type": "event_handler",
"output": {},
"parent": "slot_6_1494421302730",
"context": {
"pizza_type": "@pizza_type"
},
"conditions": "@pizza_type",
"event_name": "input",
"dialog_node": "handler_8_1494421347721",
"previous_sibling": "handler_7_1494421336855"
},
{
"type": "event_handler",
"output": {
"text": "What type of pizza do you want? You can build your own starting with cheese, or choose quatro formaggi, margherita, or vegetarian.."
},
"parent": "slot_6_1494421302730",
"event_name": "focus",
"dialog_node": "handler_7_1494421336855"
},
{
"type": "event_handler",
"output": {},
"parent": "slot_1_1494704123064",
"context": {
"pizza_toppings": "@pizza_toppings.values"
},
"metadata": {},
"conditions": "@pizza_toppings.values",
"event_name": "input",
"dialog_node": "handler_2_1494704151628",
"previous_sibling": "handler_3_1494704424215"
},
{
"type": "event_handler",
"output": {
"text": {
"values": [
"No extra toppings, O.K."
]
}
},
"parent": "slot_1_1494704123064",
"context": {
"pizza_toppings": ""
},
"metadata": {},
"next_step": {
"behavior": "skip_all_slots"
},
"conditions": "@extra_confirmed:no",
"event_name": "nomatch",
"dialog_node": "handler_4_1494704594631",
"previous_sibling": "handler_4_1500489535722"
},
{
"type": "event_handler",
"output": {
"text": {
"values": [
"O.K., adding @pizza_toppings.length more toppings to your pizza."
]
}
},
"parent": "slot_1_1494704123064",
"metadata": {},
"conditions": "@pizza_toppings.length > 1",
"event_name": "filled",
"dialog_node": "handler_6_1494704751936",
"previous_sibling": "handler_5_1494704673688"
},
{
"type": "event_handler",
"output": {
"text": {
"values": [
"OK, which toppings would you like? We have pepperoni, sausage, ham, mushroom, onions, anchovy and olive."
]
}
},
"parent": "slot_1_1494704123064",
"metadata": {},
"conditions": "@extra_confirmed:yes",
"event_name": "nomatch",
"dialog_node": "handler_8_1500493007853",
"previous_sibling": "handler_4_1494704594631"
},
{
"type": "event_handler",
"output": {
"text": {
"values": [
"O.K., adding one extra @toppings"
]
}
},
"parent": "slot_1_1494704123064",
"metadata": {},
"conditions": "@pizza_toppings.length == 1",
"event_name": "filled",
"dialog_node": "handler_5_1494704673688",
"previous_sibling": "handler_2_1494704151628"
},
{
"type": "event_handler",
"output": {
"text": {
"values": []
}
},
"parent": "slot_1_1494704123064",
"metadata": {},
"event_name": "filled",
"dialog_node": "handler_4_1500489535722",
"previous_sibling": "handler_6_1494704751936"
},
{
"type": "event_handler",
"output": {
"text": "Any extra toppings?"
},
"parent": "slot_1_1494704123064",
"metadata": {},
"event_name": "focus",
"dialog_node": "handler_3_1494704424215"
},
{
"type": "frame",
"title": "Pizza ordering",
"output": {},
"metadata": {
"fallback": "leave"
},
"conditions": "#order",
"digress_in": "does_not_return",
"dialog_node": "Pizza ordering",
"digress_out": "allow_all",
"previous_sibling": "Welcome",
"digress_out_slots": "allow_all"
},
{
"type": "standard",
"title": "Fallback",
"output": {
"text": {
"values": [
"You can order a small, medium or large pizza. Types are Cheese, and you can add more ingredients, margherita, quatro formaggi, and vegetarian.",
"If you want to start with cheese, you can add ingredients. We offer pepperoni, sausage, ham, olive, onion, anchovies, mushrooms, or salami"
],
"selection_policy": "sequential"
}
},
"metadata": {},
"conditions": "anything_else",
"digress_in": "not_available",
"dialog_node": "Fallback",
"digress_out": "allow_all",
"previous_sibling": "Reset"
},
{
"type": "standard",
"output": {
"text": {
"values": [
"Let's start over."
],
"selection_policy": "sequential"
}
},
"context": {
"pizza_size": null,
"pizza_type": null,
"pizza_place": null,
"pizza_toppings": null
},
"next_step": {
"behavior": "jump_to",
"selector": "body",
"dialog_node": "Welcome"
},
"conditions": "#reset",
"dialog_node": "Reset",
"previous_sibling": "Pizza ordering"
},
{
"type": "standard",
"output": {
"text": {
"values": [
"Welcome to Pizza Topping Basic demonstration, you can order a pizza out of few selected types and sizes and add selected toppings. Ask for Help if needed."
],
"selection_policy": "sequential"
}
},
"conditions": "welcome",
"dialog_node": "Welcome"
}
],
"workspace_id": "0cfd1c60-30dd-42d1-9f61-a76b171b938e",
"counterexamples": [],
"learning_opt_out": false,
"status": "Available"
}