Added basic logic

This commit is contained in:
Maciej Sobkowiak 2021-03-20 16:54:12 +01:00
parent 5edc53cef3
commit 7d0497c336
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/venv

17
chatbot.py Normal file
View File

@ -0,0 +1,17 @@
from nltk.chat.util import Chat, reflections
pairs = [
[
r"(.*)nazywam się (.*)",
["Cześć %2, jak się dzisiaj czujesz?",]
]
]
chatbot = Chat(pairs, reflections)
def hello():
print("Przedstaw się\n")
chatbot.converse()
if __name__ == "__main__":
hello()