added todo
This commit is contained in:
parent
6d5109df64
commit
38e860cc67
@ -4,16 +4,15 @@ welcome = 'Witaj!'
|
|||||||
unknown = "Nie rozumiem."
|
unknown = "Nie rozumiem."
|
||||||
end = "Żegnaj!"
|
end = "Żegnaj!"
|
||||||
help = "Obsługuję przekazywanie informacji z systemu GitHub - repozytoria, pull requesty, issue, powiadomienia."
|
help = "Obsługuję przekazywanie informacji z systemu GitHub - repozytoria, pull requesty, issue, powiadomienia."
|
||||||
|
#todo dodać więcej odpowiedzi
|
||||||
|
|
||||||
|
#todo generator powinien przyjmować zwrotkę z taktyki dialogu
|
||||||
def generator_jezyka_nautalnego(frame, question, state):
|
def generator_jezyka_nautalnego(frame, question, state):
|
||||||
if question != Questions.NONE:
|
if question != Questions.NONE:
|
||||||
#ask additional questions
|
#ask additional questions
|
||||||
if question == Questions.TIME:
|
if question == Questions.TIME:
|
||||||
print("Z jakiego czasu?")
|
print("Z jakiego czasu?")
|
||||||
|
|
||||||
elif len(state) > 2 and state[-2]['questions'] != Questions.NONE and frame['act'] != "":
|
|
||||||
print("Przyjęto odpowiedź na pytanie.")
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
#dont ask questions
|
#dont ask questions
|
||||||
if frame['act'] == "hello":
|
if frame['act'] == "hello":
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
dialogue_state = []
|
dialogue_state = []
|
||||||
iterator = 1
|
iterator = 1
|
||||||
|
|
||||||
|
#todo uporzadkować
|
||||||
def monitor_stanu_dialogowego(frame, questions):
|
def monitor_stanu_dialogowego(frame, questions):
|
||||||
global iterator
|
global iterator
|
||||||
# Some frames can reset the dialogue state, like saying hello.
|
# Some frames can reset the dialogue state, like saying hello.
|
||||||
|
@ -11,8 +11,9 @@ def main():
|
|||||||
text = input('>>>')
|
text = input('>>>')
|
||||||
|
|
||||||
frame = analizator_jezyka_naturalnego(text)
|
frame = analizator_jezyka_naturalnego(text)
|
||||||
|
#{'act': 'notifications', 'slots': [('time_when', None), ('liczba', ''), ('timeunit', None)]}
|
||||||
|
|
||||||
questions = taktyka_dialogu(frame)
|
questions = taktyka_dialogu(frame) # todo dodac stan
|
||||||
|
|
||||||
state = monitor_stanu_dialogowego(frame, questions)
|
state = monitor_stanu_dialogowego(frame, questions)
|
||||||
|
|
||||||
|
@ -5,11 +5,12 @@ class Questions(Enum):
|
|||||||
REPO = "repo"
|
REPO = "repo"
|
||||||
NONE = "none"
|
NONE = "none"
|
||||||
|
|
||||||
|
#todo taktyka ma zwracać bardziej złożony obiekt
|
||||||
def taktyka_dialogu(frame):
|
def taktyka_dialogu(frame):
|
||||||
return questions(frame)
|
return questions(frame)
|
||||||
# TODO inna taktyka
|
|
||||||
|
|
||||||
|
|
||||||
|
#todo dodac wiecej casow
|
||||||
|
#brac pod uwage stan
|
||||||
def questions(frame):
|
def questions(frame):
|
||||||
for slot in frame['slots']:
|
for slot in frame['slots']:
|
||||||
|
|
||||||
@ -20,3 +21,6 @@ def questions(frame):
|
|||||||
return Questions.REPO
|
return Questions.REPO
|
||||||
|
|
||||||
return Questions.NONE
|
return Questions.NONE
|
||||||
|
|
||||||
|
|
||||||
|
#todo dodać mock github api
|
Loading…
Reference in New Issue
Block a user