Skip to content

Vietnamese Drink Ordering Chatbot = Intent classification + Context Handler+ Address fuzzy matching + Facebook Built-in NLP

Notifications You must be signed in to change notification settings

Dec1mo/Vietnamese-Chatbot-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot logo

Vietnamese Drink Ordering Chatbot

Status Platform Built-in_NLP


🤖 A Messenger chatbot built without any frameworks which are able to chat, provide information, help users order drinks and pay.

⚠️ Because of some large data files, I didn't push the data and saved files. If you want to reproduce this work, you can check the full version of the repository here.

📝 Table of Contents

🧐 About

Vietnamese Drink Ordering Chatbot = Intent classification + Context Handler + Address fuzzy matching + Facebook Built-in NLP

🎥 Demo

Working

💭 How it works

A session starts with a message from a user.

When the bot receives a text message, it predicts the intent (greeting, goodbye, complain, praise, thanks, sorry, ask_drink, order, ask_coupon, payment, ask_owner) of the text. If it is:

  • ask_drink/order: The bot responses with a template for the user to pick his drink and topping.
  • ask_payment: The bot sets up a context, asks, and stores the user's information that is required for delivery order such as phone number, time of receipt, location.
    • The bot uses the Built-in NLP of Facebook to get phone numbers and time of receipt effectively and accurately.
    • The bot uses fuzzy matching to match the input location with a location in a standard address table to parse the input location.
  • else: the bot responses a text corresponds to the intent.

🏁 Getting Started

Requirements

Installing

Train and save the intent classification model

>> python model/model.py
>> python crawler/data_crawler.py

Generate an Access Token for your page

access_token

Put the token we had just generated into the server.py file

PAGE_TOKEN = "EAAQgL..."

Run server on localhost

>> python server/server.py

Run ngrok, remember to use the same port as the port localhost holding

>> ngrok.exe http 8088

You will get something like this: ngrok

Create a webhook, using Callback URL as https URL in ngrok console and Verify Token as access Token, we have just generated

webhooks

Remember to turn on Built-in NLP and set up Default Language Model

built-in_NLP

Now your Messenger Chatbot is ready to chat with you!

About

Vietnamese Drink Ordering Chatbot = Intent classification + Context Handler+ Address fuzzy matching + Facebook Built-in NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages