What graph data structure is used in train function's Chatterbot module?

45 Views Asked by At

from chatterbot import ChatBot

from chatterbot.trainers import ListTrainer

chatbot = ChatBot("BotBot")

trainer = ListTrainer(chatbot)

trainer.train([

"Hi","Hello",

"I wanted to know today's date","Today's date is 11 Dec 2020",

"Thank you for the information","Do you need any more assistance",

"No thank you","Thank you"])

while True:

request = input("You:")

if request=='Bye' or request =='bye':

    print('Bot:Bye')

    break

else:

    response = chatbot.get_response(request)

    print("Bot:",response)
1

There are 1 best solutions below

0
On

train() function uses directed graph traversal while giving a response.