-1
I’m studying about the chatterbot and in the first training test appeared that he just handed me the first characters as an answer, someone knows explain to me why?
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
import os
bot = ChatBot('teste')
treino = ListTrainer(bot)
diretorio = '/Users/archo/PycharmProjects/untield/venv/testechatbot/treinadores/'
for treinadores in os.listdir(diretorio):
treino.train(diretorio + treinadores)
while True:
req = str(input("Voce: "))
req = bot.get_response(req)
print('Bot: ' + str(req))
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data] /Users/archo/nltk_data...
[nltk_data] Package averaged_perceptron_tagger is already up-to-
[nltk_data] date!
[nltk_data] Downloading package stopwords to /Users/archo/nltk_data...
[nltk_data] Package stopwords is already up-to-date!
List Trainer: [####################] 100%
List Trainer: [####################] 100%
List Trainer: [####################] 100%
List Trainer: [####################] 100%
You: hi
Bot: t
You: good morning
Bot: the
i made a subdirectory called coaches with. yml files to train him