Skip to content

VISHAL291137/Text-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot using NLTK in Python

This code creates a basic chatbot using NLTK in Python. It defines patterns and responses for various user inputs. The chatbot responds to user input based on matching patterns. It can provide information about time, date, Python, and has some custom responses. The code runs in an infinite loop, continuously taking user input and responding until the user types "quit."

# Place your Python code here
# ...

# Example:
import nltk
from nltk.chat.util import Chat, reflections

# Define patterns and responses
patterns = [
    (r'quit', ['Goodbye!', 'See you later.']),
    # Add more patterns and responses as needed
]

# Create and run the chatbot
chatbot = Chat(patterns, reflections)
chatbot.converse()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published