add DialoguePolicy, DialogueStateTracker and DialogueState
This commit is contained in:
parent
4c1d303555
commit
50429f5cbc
7
model/DialogueState.py
Normal file
7
model/DialogueState.py
Normal file
@ -0,0 +1,7 @@
|
||||
class DialogueState:
|
||||
|
||||
def init(self):
|
||||
self.currentActs = []
|
||||
self.previousActs = []
|
||||
self.botName = 'Dia'
|
||||
self.date = None
|
@ -1,3 +1,10 @@
|
||||
from model import DialogueState
|
||||
|
||||
class DialoguePolicy:
|
||||
pass
|
||||
|
||||
def init(self):
|
||||
pass
|
||||
|
||||
def resolveSystemActs(self, dialogueState):
|
||||
pass
|
@ -1,3 +1,40 @@
|
||||
class DialogueStateTracker:
|
||||
pass
|
||||
from model import DialogueState
|
||||
|
||||
class DialogueStateTracker:
|
||||
|
||||
def init(self, dialogueState):
|
||||
pass
|
||||
|
||||
def processinformFrame(self, userActsFrame, dialogueState):
|
||||
"""
|
||||
|
||||
:param userActsFrame:
|
||||
:param dialogueState:
|
||||
:return:
|
||||
"""
|
||||
|
||||
|
||||
def processUserAct(self, userActsFrame, dialogueState):
|
||||
"""
|
||||
|
||||
:param userActsFrame: input of user acts incoming
|
||||
:return: dialogueState
|
||||
"""
|
||||
dialogueState.currentActs=userActsFrame
|
||||
|
||||
if userActsFrame.act == 'hello()':
|
||||
pass
|
||||
elif userActsFrame.act == 'request':
|
||||
pass
|
||||
elif userActsFrame.act == 'inform':
|
||||
dialogueState=self.processinformFrame(userActsFrame, dialogueState)
|
||||
else:
|
||||
pass
|
||||
return dialogueState
|
||||
|
||||
|
||||
# def setDialogueState(self, dialogueState):
|
||||
# self.DialogueState=dialogueState
|
||||
#
|
||||
# def getDialogueState(self, dialogueState):
|
||||
# return self.DialogueState
|
Loading…
Reference in New Issue
Block a user