Answer to Question #189036 in Python for Kadin

Question #189036

i need help on assignment 3 chatbot for computer science


1
Expert's answer
2021-05-04T23:17:52-0400
from chatterbot import Chatbot
from chatterbot.trainers import ListTrainer

my_bot=Chatbot(name='PyBot',read_only=True,logic_adapters=

['chatterbot.logic.MathematicalEvaluation','chatterbot.logic.BestMatch'])

small_talk=['Hi',
            'Hi,There',
            'How do you do']
list_trainer=ListTrainer(my_bot)
for item in (small_talk):
    list_trainer.train(item)
    print(my_bot.get_response("hi"))
   

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS