#creating chatbot
from chatterbot import ChatBot
chatbot=ChatBot(
'Akpython',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapter=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch',
{
'import_path':'chatterbot.logic.BestMatch',
'default_response':'I am sorry,I do not understand',
'maximum_similarity_threshold':0.90
}
],
database_uri='sqlite:///database.sqlite3'
)
#Training
from chatterbot.trainers import ListTrainer
trainer=ListTrainer(chatbot)
trainingdata=open('/home/arun/Documents/Trainingdata').read().splitlines()
#Training the corpus
from chatterbot.trainers import ChatterBotCorpusTrainer
trainercorpus=ChatterBotCorpusTrainer(chatbot)
trainercorpus.train(
'chatterbot.corpus.english'
)
#BetterBot
name=input("Enter your name:")
print('Welcome to our Hotel',name,'Let me know how can I help you?')
while True:
request=input(name+':')
if request=='Bye'or request=='bye':
print("Bot:Bye")
break
else:
response=chatbot.get_response(request)
print('Bot:',response)
from chatterbot import ChatBot
chatbot=ChatBot(
'Akpython',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapter=[
'chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.TimeLogicAdapter',
'chatterbot.logic.BestMatch',
{
'import_path':'chatterbot.logic.BestMatch',
'default_response':'I am sorry,I do not understand',
'maximum_similarity_threshold':0.90
}
],
database_uri='sqlite:///database.sqlite3'
)
#Training
from chatterbot.trainers import ListTrainer
trainer=ListTrainer(chatbot)
trainingdata=open('/home/arun/Documents/Trainingdata').read().splitlines()
#Training the corpus
from chatterbot.trainers import ChatterBotCorpusTrainer
trainercorpus=ChatterBotCorpusTrainer(chatbot)
trainercorpus.train(
'chatterbot.corpus.english'
)
#BetterBot
name=input("Enter your name:")
print('Welcome to our Hotel',name,'Let me know how can I help you?')
while True:
request=input(name+':')
if request=='Bye'or request=='bye':
print("Bot:Bye")
break
else:
response=chatbot.get_response(request)
print('Bot:',response)
#YKYG : .aac is a popular audio extension.Do you know it's Full form?
Anonymous Quiz
20%
Audio Advanced coding
52%
Advanced audio coding
22%
Audio augmented coding
7%
A Audio coding
New video preparation is started today.Scripting is going on.I will meet you on end of this week.
#YKYG WORM expansion ( Interview Question )
Anonymous Quiz
57%
Write once read many
34%
Write on RAM memory
9%
Write on ROM memory
AK Python
Photo
Game development tutorial video is in editing progress.Tommorow i will upload on YouTube channel so staytuned.
Subscribe..!
Subscribe..!