🤖 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.
Vietnamese Drink Ordering Chatbot = Intent classification + Context Handler + Address fuzzy matching + Facebook Built-in NLP
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.
- Facebook Messenger app
- ngrok - An awesome and easy tool which creates a secure tunnel on your local machine along with a public URL. I used a json file instead of a database but you can use Heroku instead of ngrok and json.
- underthesea
- sklearn
- tensorflow
- Keras
- fuzzywuzzy
- bottle
>> python model/model.py
Crawl the real drink data
>> python crawler/data_crawler.py
PAGE_TOKEN = "EAAQgL...">> python server/server.py
>> ngrok.exe http 8088
You will get something like this:
Create a webhook, using Callback URL as https URL in ngrok console and Verify Token as access Token, we have just generated
Now your Messenger Chatbot is ready to chat with you!


