Frames in taktyka_dialogu
This commit is contained in:
parent
012dd6e2a3
commit
c584b99d95
@ -10,7 +10,7 @@ def main():
|
||||
text = input('>>>')
|
||||
frame = analizator_jezyka_naturalnego(text)
|
||||
state = monitor_stanu_dialogowego(frame)
|
||||
response_frames = taktyka_dialogu(state)
|
||||
response_frames = taktyka_dialogu(state, frame)
|
||||
generator_jezyka_nautalnego(response_frames)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -10,18 +10,18 @@ def check_condition(state, conditions, type=all):
|
||||
return False
|
||||
|
||||
|
||||
def taktyka_dialogu(state):
|
||||
if should_respond_gently(state):
|
||||
def taktyka_dialogu(state, frame):
|
||||
if should_respond_gently(frame):
|
||||
return [hello_act, name_response_act]
|
||||
if should_prompt(state):
|
||||
if should_prompt(frame):
|
||||
return [hello_act, help_response_act]
|
||||
if should_respond_cold(state):
|
||||
if should_respond_cold(frame):
|
||||
return [name_response_act]
|
||||
return [unknown_act]
|
||||
|
||||
|
||||
def should_respond_gently(state):
|
||||
return check_condition(state, [hello_act, name_request_act])
|
||||
return check_condition(state, [hello_act, name_request_act])
|
||||
|
||||
|
||||
def should_prompt(state):
|
||||
|
Loading…
Reference in New Issue
Block a user