Here is my Senior Design Project that I implemented to graduate from Computer Engineering.

Overview

rasa-travel-chatbot

Ekran Resmi 2021-06-20 15 44 14

Here is my Senior Design Project that I implemented to graduate from Computer Engineering. It is a chatbot made in RASA and helps the user to plan their vacation in the Turkish language. In order to plan the user's vacation, it provides reservations by asking various questions for hotel, flight, or event.

How to Run the Project?

  1. Create a virtual environment of python 3.6 or greater.
  2. Navigate to the rasa directory. Run the command: rasa train
  3. After the model is trained, launch the rasa core server: rasa run -m models --enable-api
  4. Launch the rasa actions server in another terminal: rasa run actions
  5. Navigate to the chatbot/backend. Run the command: python route.py
  6. Launch the frontend on the local python http server under the interface directory: python -m http.server

Interface

Here is an example conversation for booking an event in Turkish.

Ekran Resmi 2021-06-20 15 00 44

In this figure, the chatbot is trying to learn which event the user wants to go to after the greeting.

Ekran Resmi 2021-06-20 15 00 57

After that the chatbot asks for how many tickets the user wants and tries to make the reservation by asking for an e-mail.

Ekran Resmi 2021-06-20 15 01 06

Finally, the chatbot tells the user how many tickets it has bought and sent to which e-mail address and asks if the user wants to take another action. If the user says no, chatbot finishes the conversation by saying goodbye.

Turkish Dataset

Due to the small number of chatbots in the Turkish language, Turkish datasets are also less. For this reason, we prepared a Turkish dataset from scratch while doing this project. In order to do this, we translated the English datasets into Turkish using the Google API. In the end, we have 93 intents 29 entities in total, and an average of 7 sentences for each intent.

Ekran Resmi 2021-06-20 15 08 45

RASA

Rasa is an open source python library for constructing conversational software with minimal (or no) initial training data. It consists of two parts: Rasa NLU and Rasa Core. Dialogue management problem can be handled as a classification problem. At each iteration, Rasa Core predicts which action to take from a predefined list. On the other hand, Rasa NLU is a tool for natural language understanding. It combines a number of natural language processing and machine learning libraries in a consistent API.

Ekran Resmi 2021-06-20 15 17 46

First a message is received and passed to Rasa NLU to extract the intent, entities, and the other structured information. Then the conversation state saved in the tracker which receives a notification that a new message has been received. In step 3, the policy receives the current state of the tracker and chooses which action to take next. Then chosen action is logged by the tracker and executed. If the predicted action is not ‘listen’, go back to step 3. After the first step all the remaining steps are performed by Rasa Core.

Ekran Resmi 2021-06-20 15 17 46

Here is an example of intent classification and entity extraction for a possible input sentence that chatbot can receive from user in this project.

Ekran Resmi 2021-06-20 15 45 03

Best Configuration

We used pre-trained language model BERT for our pipeline. We compared three different pipeline configurations: a light configuration, a configuration using ConveRT, and a heavy configuration that included BERT. In each case we’re training a DIETClassifier for combined intent classification and entity recognition for 200 epochs, but in the light configuration we have CountVectorsFeaturizer, which creates bag-of-word representations for each incoming message at word and character levels. In the end, we chose config-light as the configuration of the chatbot.

Results of the Configurations

Ekran Resmi 2021-06-20 15 21 16

Ekran Resmi 2021-06-20 15 21 27

In the images below, there are confusion matrices created by each configuration for intent classification and entity extraction in turn.

config-light:

Ekran Resmi 2021-06-20 15 26 15 Ekran Resmi 2021-06-20 15 26 36 Ekran Resmi 2021-06-20 15 27 25 Ekran Resmi 2021-06-20 15 27 46

config-convert:

Ekran Resmi 2021-06-20 15 30 19 Ekran Resmi 2021-06-20 15 30 30 Ekran Resmi 2021-06-20 15 30 42 Ekran Resmi 2021-06-20 15 30 54

config-heavy:

Ekran Resmi 2021-06-20 15 32 01 Ekran Resmi 2021-06-20 15 32 12 Ekran Resmi 2021-06-20 15 32 22 Ekran Resmi 2021-06-20 15 32 32

Owner
Ezgi Subaşı
Ezgi Subaşı
Rates how pog a word or user is. Not random and does have *some* kind of algorithm to it.

PogRater :D Rates how pogchamp a word is :D A fun project coded by JBYT27 using Python3 Have you ever wondered how pog a word is? Well, congrats, you

an aspirin 2 Jun 25, 2022
A data driven app for bicycle hiring in London(UK)

bicycle_hiring_app_deployed A data driven app for bicycle hiring in London(UK). It predicts expected number of bicycle hire in London. It asks users t

Rajarshi Roy Raju 1 Dec 10, 2021
Fastest Semantle solver this side of the Mississippi

semantle Fastest Semantle solver this side of the Mississippi. Roughly 3 average turns to win Measured against (part of) the word2vec-google-news-300

Frank Odom 8 Dec 26, 2022
Blender addon, import and update mixamo animation

This is a blender addon for import and update mixamo animations.

ywaby 7 Apr 19, 2022
Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password protected link.

PY-CHAT Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password prote

1 Nov 24, 2021
Download and process GOES-16 and GOES-17 data from NOAA's archive on AWS using Python.

Download and display GOES-East and GOES-West data GOES-East and GOES-West satellite data are made available on Amazon Web Services through NOAA's Big

Brian Blaylock 88 Dec 16, 2022
This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021.

BrightNetworkUK-GCC-2021 This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021. Language used here is py

Dareer Ahmad Mufti 28 May 23, 2022
Graveyard is an attempt at open-source reimplementation of DraciDoupe.cz

Graveyard: Place for Dead (and Undead) Graveyard is an attempt at open-source reimplementation of DraciDoupe.cz (referred to as DDCZ in this text). De

DraciDoupe.cz 5 Mar 17, 2022
LeetComp - Background tasks powering the static content at LeetComp

LeetComp Analysing compensations mentioned on the Leetcode forums (https://kuuts

Kumar Utsav 125 Dec 21, 2022
Just a little benchmark for scrapper PC's

PopMark Just a little benchmark for scrapper PC's This benchmark is for old computer that dont support other benchmark because of support. Like lack o

Garry 1 Nov 24, 2021
Tc-python - A Python script to receive message from a twitch chat

Twitch-Chat 📜 I did a script in Python to receive messages from a twitch chat.

miyucode 2 May 31, 2022
Generate your personal 8-bit avatars using Cellular Automata, a mathematical model that simulates life, survival, and extinction

Try the interactive demo here ✨ ✨ Sprites-as-a-Service is an open-source web application that allows you to generate custom 8-bit sprites using Cellul

Lj Miranda 265 Dec 26, 2022
C++ Environment InitiatorVisual Studio Code C / C++ Environment Initiator

Visual Studio Code C / C++ Environment Initiator Latest Version : v 1.0.1(2021/11/08) .exe link here About : Visual Studio Code에서 C/C++환경을 MinGW GCC/G

Junho Yoon 2 Dec 19, 2021
A simple python project which control paint brush in microsoft paint app

Paint Buddy In Python A simple python project which control paint brush in micro

Ordinary Pythoneer 1 Dec 27, 2021
Beacon Object File (BOF) to obtain a usable TGT for the current user.

Beacon Object File (BOF) to obtain a usable TGT for the current user.

Connor McGarr 109 Dec 25, 2022
CalHacks 8 Repo: Megha Jain, Gaurav Bhatnagar, Howard Meng, Vibha Tantry

CalHacks8 CalHacks 8 Repo: Megha Jain, Gaurav Bhatnagar, Howard Meng, Vibha Tantry Setup FE Install React Native via Expo, run App.js. Backend Create

0 Aug 20, 2022
Create standalone, installable R Shiny apps using Electron

Create standalone, installable R Shiny apps using Electron

Chase Clark 5 Dec 24, 2021
Is a util for xferring skinning from one mesh to another

maya_pythonplugins skinTo: Is a util for xferring skinning from one mesh to another args: :param maxInfluences: is the number of max influences on the

James Dunlop 2 Jan 24, 2022
Read and write life sciences file formats

Python-bioformats is a Python wrapper for Bio-Formats, a standalone Java library for reading and writing life sciences image file formats. Bio-Formats

CellProfiler 106 Dec 19, 2022
EFB Docker image with efb-telegram-master and efb-wechat-slave

efb-wechat-docker EFB Docker image with efb-telegram-master and efb-wechat-slave Features Container run by non-root user. Support add environment vari

Haukeng 1 Nov 10, 2022