diff --git a/chatbot.py b/chatbot.py index 855fa3f..aa4cb04 100644 --- a/chatbot.py +++ b/chatbot.py @@ -1,17 +1,32 @@ from nltk.chat.util import Chat, reflections -pairs = [ +pair1 = [ [ r"(.*)nazywam się (.*)", ["Cześć %2, jak się dzisiaj czujesz?",] ] ] -chatbot = Chat(pairs, reflections) +pair2 = [ + [ + r"(.*)czuję się (.*)", + ["Cieszę się czujesz się %2?",] + ] +] + +pair3 = [ + +] + +pair4 = [ + +] + +chatbot = Chat(pair1+pair2+pair3+pair4, reflections) def hello(): print("Przedstaw się\n") - chatbot.converse() + chatbot.converse(quit='wyjdź') if __name__ == "__main__": hello() \ No newline at end of file