Skip to content

BishalMondal07/Simple-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Chatbot

This is a simple chatbot that can answer questions and have conversations with users. It is built in Python and uses regular expressions to match user input with predefined responses.

Getting Started

To use the chatbot, simply run the chatbot.py file in your terminal or IDE. The chatbot will greet you and ask how it can help you. You can then type your message and the chatbot will respond with a suitable answer.

To exit the chatbot, type exit, quit, or goodbye.

Adding Responses

To add new responses to the chatbot, use the add_response() function in the chatbot.py file. This function takes three arguments: user_input, bot_response, and probability.

● user_input is the text that the user might input to trigger this response.

● bot_response is the text that the chatbot will output if the user inputs user_input.

● probability is an optional argument that allows you to specify how likely the chatbot is to use this response. The default value is 1, meaning that the response will always be used if the user inputs user_input.

You can add as many responses as you like to the responses dictionary. The chatbot will use the response with the highest probability that matches the user input.

Customizing Responses

To customize the chatbot's standard responses, simply edit the standard_responses dictionary in the chatbot.py file. You can add, remove, or modify any of the responses in this dictionary to suit your needs.

Dependencies

This chatbot requires the re, random, and collections modules to run.

Improvements

This chatbot is a very basic example of what can be done with NLP. There are many improvements that could be made to make it more useful and more intelligent. Some possible improvements include:

● Using machine learning algorithms to improve the chatbot's ability to understand and respond to user input.

● Adding more advanced language processing techniques, such as sentiment analysis and entity recognition.

● Adding the ability to learn from user input in real time, rather than requiring a pre-built dictionary of responses.

● Adding the ability to integrate with external APIs and services to provide more advanced functionality, such as weather forecasts or news updates.

About

A simple Python chatbot program that uses NLP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages