From c447c27731f1457dbc0077b5fcdd817670660a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Zab=C5=82o=C5=84ski?= Date: Tue, 14 Jun 2022 14:16:05 +0200 Subject: [PATCH] Zaktualizuj 'modules/NLG.py' add to DST system_acts --- modules/NLG.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/NLG.py b/modules/NLG.py index a564f0e..63b18b7 100644 --- a/modules/NLG.py +++ b/modules/NLG.py @@ -3,11 +3,13 @@ from xml import dom value_dict = json.load(open('modules/value_dict.json')) class NLG: - def __init__(self): + def __init__(self,dst): self.answer = '' + self.dst = dst def update(self, system_act): self.answer = '' + self.dst.state['system_action'].append(system_act) for domain, intent, slot, value in system_act: if domain == 'cinema' and intent == 'inform' and slot == 'seat': if value == '':