monitor_stanu_dialogowego implementation
This commit is contained in:
parent
7bfae90d1e
commit
6bc9f36154
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
__pycache__/
|
@ -1,2 +1,14 @@
|
|||||||
|
dialogue_state = []
|
||||||
|
|
||||||
def monitor_stanu_dialogowego(frame):
|
def monitor_stanu_dialogowego(frame):
|
||||||
print(frame)
|
# Some frames can reset the dialogue state, like saying hello.
|
||||||
|
reset_state_if_needed(frame)
|
||||||
|
|
||||||
|
list(map(lambda x: dialogue_state.append(x), frame))
|
||||||
|
return dialogue_state
|
||||||
|
|
||||||
|
|
||||||
|
def reset_state_if_needed(frame):
|
||||||
|
if 'hello' in frame:
|
||||||
|
dialogue_state.clear()
|
||||||
|
|
||||||
|
@ -4,11 +4,14 @@ from taktyka_dialogu import taktyka_dialogu
|
|||||||
from generator_jezyka_nautalnego import generator_jezyka_nautalnego
|
from generator_jezyka_nautalnego import generator_jezyka_nautalnego
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
text = input('>>>')
|
running = True
|
||||||
frame = analizator_jezyka_naturalnego(text)
|
|
||||||
monitor_stanu_dialogowego(frame)
|
while running:
|
||||||
taktyka_dialogu()
|
text = input('>>>')
|
||||||
generator_jezyka_nautalnego()
|
frame = analizator_jezyka_naturalnego(text)
|
||||||
|
state = monitor_stanu_dialogowego(frame)
|
||||||
|
taktyka_dialogu(state)
|
||||||
|
generator_jezyka_nautalnego()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
def taktyka_dialogu():
|
def taktyka_dialogu(state):
|
||||||
pass
|
print(state)
|
||||||
|
Loading…
Reference in New Issue
Block a user