Zmiany z zajęc 18.05.2022

This commit is contained in:
Jakub Kaczmarek 2022-05-18 13:11:49 +02:00
parent 7a000b06b2
commit 40443cbfa6
3 changed files with 20 additions and 0 deletions

View File

@ -1,9 +1,24 @@
class Dst:
def __init__(self):
self.messages = []
self.checklist = {
"from": None,
"to": None,
"time": None,
"passangerCount": None,
"discountedCount": None,
"seatType": None,
"wagonType": None
}
self.history = []
def store(self, message):
self.messages.append(message)
def get_messages(self):
return self.messages
def get_next_question(self):
for key, value in self.checklist.items():
if value == None:
return key

View File

@ -39,6 +39,8 @@ class Nlu:
if t in v['parameters']:
param.append(t)
# TODO: Refactor
return (act, param)

View File

@ -10,3 +10,6 @@ if __name__ == "__main__":
nlg_params = dp.Dp(*dp_params).identify()
# print(nlg_params)
print(f"{msg}\n{nlg.Nlg(nlg_params).response()}")
d = dst.Dst()
print(d.get_next_question())