Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

Building a Simple Chatbot from Scratch in Python (using NLTK)

NotificationsYou must be signed in to change notification settings

parulnith/Building-a-Simple-Chatbot-in-Python-using-NLTK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text

History of chatbots dates back to 1966 when a computer program called ELIZA was invented by Weizenbaum. It imitated the language of a psychotherapist from only 200 lines of code. You can still converse with it here:Eliza.

On similar lines let's create a very basic chatbot utlising the Python's NLTK library.It's a very simple bot with hardly any cognitive skills,but still a good way to get into NLP and get to know about chatbots.

Outline

Motivation

The idea of this project was not to create some SOTA chatbot with exceptional cognitive skills but just to utilise and test my Python skills.This was one of my very first projects, created when I just stepped into the world of NLP and I thought of creating a simple chatbot just to make use of my newly acquired knowledge.

BlogPost

For detailed overview, here is the accompanying blog titled:Building a Simple Chatbot in Python (using NLTK)

Pre-requisites

NLTK(Natural Language Toolkit)

Natural Language Processing with Python provides a practical introduction to programming for language processing.

For platform-specific instructions, readhere

Installation of NLTK

pip install nltk

Installing required packages

After NLTK has been downloaded, install required packages

import nltkfrom nltk.stem import WordNetLemmatizernltk.download('popular', quiet=True) # for downloading popular packagesnltk.download('punkt') nltk.download('wordnet')

How to run

  • Jupyter NotebookBinder

You can run thechatbot.ipynb which also includes step by step instructions.

  • Through Terminal
python chatbot.py

[8]ページ先頭

©2009-2025 Movatter.jp