2021-04-26 00:29:07 +02:00
|
|
|
from UserActType import UserActType
|
|
|
|
from UserAct import UserAct
|
|
|
|
|
|
|
|
|
|
|
|
class DP:
|
|
|
|
"""
|
2021-04-26 09:57:03 +02:00
|
|
|
Moduł decydujący o wyborze kolejnego aktu, który ma podjąć system prowadząc rozmowę.
|
|
|
|
Wejście: Reprezentacja stanu dialogu (rama)
|
|
|
|
Wyjście: Akt systemu (rama)
|
2021-04-26 00:29:07 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def chooseTactic(self, frameList=None):
|
2021-04-26 09:57:03 +02:00
|
|
|
if frameList[-1].getActType() is UserActType.INVALID:
|
|
|
|
systemAct = [1]
|
|
|
|
return systemAct
|
|
|
|
elif frameList[-1].getActType() is UserActType.BYE:
|
|
|
|
systemAct = [2]
|
|
|
|
return systemAct
|
|
|
|
else:
|
2021-04-26 00:29:07 +02:00
|
|
|
systemAct = [0]
|
|
|
|
return systemAct
|