Python Chatterbot Library Training Not Efficient

53 views Asked by At
chatbot = ChatBot("Chabot",
                  storage_adapter='chatterbot.storage.SQLStorageAdapter',
                  database_uri='sqlite:///english.db',
                  logic_adapters=[
                      {
                          "import_path": "chatterbot.logic.BestMatch",
                          "statement_comparison_function": JaccardSimilarity,
                          "response_selection_method": get_first_response,
                          'maximum_similarity_threshold': 0.01,
                          "default_response": "I am sorry, but I do not understand."
                      }
                  ])    

trainer = ChatterBotCorpusTrainer(chatbot)
trainer.train("chatterbot.corpus.english.greetings")

RESULTS

Me: whats up

Bot: I am sorry, but I do not understand.

Me: what's up

Bot: I am sorry, but I do not understand.

Me: What's up

Bot: Not much.

I've tried with LevenshteinDistance, SynsetDistance, SentimentComparison and JaccardSimilarity for statement_comparison_function. And get_most_frequent_response, get_first_response and get_random_response for response_selection_method. Each still gives the same result as the above which is undesirable for me. I'm at least expecting it can understand "whats up". Is there anything I might have done wrongly?

Update #1 So I've tried with other words, such as "what is the first compute?" and yes, it will understand, and most other conversations performed well, but what's the case with "What's up"? Is there any particular reason that the chatterbot have to get precise input for it to generate the correct answer?

0

There are 0 answers