add non-pivot-acts
This commit is contained in:
parent
e4e5b5b98f
commit
7733c5c91a
@ -14,6 +14,9 @@ dialogue_state = {
|
|||||||
|
|
||||||
|
|
||||||
def monitor_stanu_dialogowego(frame):
|
def monitor_stanu_dialogowego(frame):
|
||||||
|
not_pivot_acts = ['time',
|
||||||
|
'repo',
|
||||||
|
'howmany']
|
||||||
global dialogue_state
|
global dialogue_state
|
||||||
# Some frames can reset the dialogue state, like saying hello.
|
# Some frames can reset the dialogue state, like saying hello.
|
||||||
|
|
||||||
@ -24,7 +27,7 @@ def monitor_stanu_dialogowego(frame):
|
|||||||
return dialogue_state
|
return dialogue_state
|
||||||
|
|
||||||
reset_state_if_needed(frame, dialogue_state)
|
reset_state_if_needed(frame, dialogue_state)
|
||||||
|
if frame['act'] not in not_pivot_acts:
|
||||||
dialogue_state['current_context'] = frame['act']
|
dialogue_state['current_context'] = frame['act']
|
||||||
append_or_merge_frame(frame, dialogue_state)
|
append_or_merge_frame(frame, dialogue_state)
|
||||||
|
|
||||||
@ -83,4 +86,3 @@ def reset_state_if_needed(frame, dialogue_state):
|
|||||||
dialogue_state['topics'] = []
|
dialogue_state['topics'] = []
|
||||||
dialogue_state['counter'] = 0
|
dialogue_state['counter'] = 0
|
||||||
# should we reset 'facts' aswell?
|
# should we reset 'facts' aswell?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user