Added basic logic
This commit is contained in:
parent
5edc53cef3
commit
7d0497c336
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/venv
|
17
chatbot.py
Normal file
17
chatbot.py
Normal 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()
|
Loading…
Reference in New Issue
Block a user