-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogueStateTable.java
More file actions
91 lines (65 loc) · 2.29 KB
/
DialogueStateTable.java
File metadata and controls
91 lines (65 loc) · 2.29 KB
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
package chatbot.component;
import java.util.Hashtable;
import java.util.List;
public class DialogueStateTable {
public DialogueStateTable() {
}
public static String execute(String dialogueStateName, List<Hashtable<String, String>> slotHistory) {
String response = "I am not sure. Could you say more?";
switch (dialogueStateName) {
case "ANSWER-GYM":
response = "Let's go to the gym!";
break;
case "ASK-GYM":
response = "What would you like to know about the gym? (Location, Exercises, Muscles, Time)";
break;
case "ANSWER-LOCATION":
response = "There are 3 gyms in [LOCATION]";
break;
case "ASK-LOCATION":
response = "Where are you located?";
break;
case "ANSWER-Exercise":
response = "You need to do [EXERCISE]";
break;
case "ASK-EXERCISE-GROUP":
response = "What exercise do you want to do?";
break;
case "ANSWER-Muscle":
response = "You need to use [MUSCLE]";
break;
case "ASK-MUSCLE-GROUP":
response = "What muscle do you want to use?";
break;
case "ANSWER-TIME":
response = "You need to do this exercise for [TIME]";
break;
case "ASK-TIME":
response = "How long do you want to do this for? (Please provide the duration in minutes)";
break;
case "ANSWER-REPS":
response = "You need to do 10-15 reps for [EXERCISE]";
break;
case "ASK-REPS":
response = "How many reps do you want to do for [EXERCISE]";
break;
case "ANSWER-SETS":
response = "You need to do 3-5 sets for [EXERCISE]";
break;
case "ASK-SETS":
response = "How many sets do you want to do for [EXERCISE]";
break;
case "CHIT-CHAT":
response = "What would you like to know about the gym? (Location, Exercises, Muscles, Time)";
break;
case "GREETING":
response = "Hello! How can I help you?";
break;
default:
System.err.println("Invalid dialogueStateName: " + dialogueStateName);
System.exit(1);
//throw new IllegalArgumentException("Invalid dialogueStateName: " + dialogueStateName);
}
return response;
}
}