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