Skip to content

younusesherif/hot-pizz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hot-pizz - Pizza-Ordering-Chatbot

This is Chatbot implementing NLP by Python-NLTK.

Language

python

Prerequisite

  • python-NLTK
  • python-Flask
  • HTML & CSS
  • JavaScript
STEPS DESCRIPTION
"Sentence Tokenization" Sentence tokenizer breaks text paragraph into sentences.
"Word Tokenization" Word tokenizer breaks text paragraph into words.
"Stemming" stemming just removes the last few characters, often leading to incorrect meanings and spelling errors
"Lemmatization" lemmatization considers the context and converts the word to its meaningful base form
import nltk
nltk.dowload()

Sentence Tokenization

sent_tokens  =  nltk.sent_tokenize(text)

Word Tokenization

sent_tokens  =  nltk.sent_tokenize(text)

Stemming and Lemmatization

lemmer = nltk.stem.WordNetLemmatizer()
def LemTokens(tokens):
	return [lemmer.lemmatize(token) for token in tokens]
remove_punct_dict = dict((ord(punct), None) for punct in string.punctuation)
def LemNormalize(text):
	return LemTokens(nltk.word_tokenize(text.lower().translate(remove_punct_dict)))

Feature Extraction

from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity

TfidfVec = TfidfVectorizer(tokenizer=LemNormalize, stop_words='english')
tfidf = TfidfVec.fit_transform(sent_tokens)
vals = cosine_similarity(tfidf[-1], tfidf)

MongoDB

MongoDB is an NOSQL database for ChatBot.All the order are stored in the Database

drawing

Application

hot-pizz Chatbot

drawing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published