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şı
Subnet calculator script using python

subnetCalculator Subnet calculator script using python3 Interactive Version Define the subnet variable interactively Use: subnetDict = subnetCalculato

1 Feb 15, 2022
An easy way to access to your EPITECH subjects based on the Roslyn's database.

An easy way to access to your EPITECH subjects based on the Roslyn's database.

Mathias 1 Feb 09, 2022
An ongoing curated list of frameworks, libraries, learning tutorials, software and resources in Python Language.

Python Development Welcome to the world of Python. An ongoing curated list of frameworks, libraries, learning tutorials, software and resources in Pyt

Paul Veillard 2 Dec 24, 2021
A data engineering project with Kafka, Spark Streaming, dbt, Docker, Airflow, Terraform, GCP and much more!

Streamify A data pipeline with Kafka, Spark Streaming, dbt, Docker, Airflow, Terraform, GCP and much more! Description Objective The project will stre

Ankur Chavda 206 Dec 30, 2022
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Aviram Hassan 139 Dec 30, 2022
Open source tools to allow working with ESP devices in the browser

ESP Web Tools Allow flashing ESPHome or other ESP-based firmwares via the browser. Will automatically detect the board type and select a supported fir

ESPHome 195 Dec 31, 2022
DownTime-Score is a Small project aimed to Monitor the performance and the availabillity of a variety of the Vital and Critical Moroccan Web Portals

DownTime-Score DownTime-Score is a Small project aimed to Monitor the performance and the availabillity of a variety of the Vital and Critical Morocca

adnane-tebbaa 5 Apr 30, 2022
NES development tool made with Python and Lua

NES Builder NES development and romhacking tool made with Python and Lua Current Stage: Alpha Features Open source "Build" project, which exports vari

10 Aug 19, 2022
Small pip update helpers.

pipdate pipdate is a collection of small pip update helpers. The command pipdate # or python3.9 -m pipdate updates all your pip-installed packages. (O

Nico Schlömer 69 Dec 18, 2022
Digdata presented 'BrandX' as a clothing brand that wants to know the best places to set up a 'pop up' store.

Digdata presented 'BrandX' as a clothing brand that wants to know the best places to set up a 'pop up' store. I used the dataset given to write a program that ranks these places.

Mahmoud 1 Dec 11, 2021
The most widely used Python to C compiler

Welcome to Cython! Cython is a language that makes writing C extensions for Python as easy as Python itself. Cython is based on Pyrex, but supports mo

7.6k Jan 03, 2023
Writeup of NilbinSec's participation in the Winja CTF for c0c0n 2021

Winja-CTF-c0c0n-2021-Writeup NilbinSec's participation in the Winja CTF for c0c0n 2021 This repo covers NilbinSec's participation in the Winja CTF dur

1 Nov 15, 2021
Aesthetic NFT Generator

A E S T H E T I C Dependencies Pillow numpy OpenCV You can use pip to install any missing dependencies. Basic Usage Vaporwave artwork can be generated

Mentor Elezi 4 Mar 13, 2022
To attract customers, the hotel chain has added to its website the ability to book a room without prepayment

To attract customers, the hotel chain has added to its website the ability to book a room without prepayment. We need to predict whether the customer is going to reject the booking or not. Since in c

Taychinov Evgeniy 0 Aug 04, 2022
Files relating to polymtl university

This is a tool I developed quickly, which allows users to visualize class availability by day of the week for a given program at polymtl. The schedule

PN 3 Mar 15, 2022
Library support get vocabulary from MEM

Features: Support scraping the courses in MEM to take the vocabulary Translate the words to your own language Get the IPA for the English course Insta

Joseph Quang 4 Aug 13, 2022
A simple, fantasy and fast note taking program.

notes A simple, fantasy and fast note taking program Installation This program supposed to run in linux and may have some bugs on windows or any other

Ali Hosseinverdi 1 Apr 06, 2022
Run PD patches in NRT using Python

The files in this repository demonstrate how to use Pure Data (Pd) patches designed to run in Non-Real-Time mode to batch-process (synthesize, analyze, etc) sounds in series using Python.

Jose Henrique Padovani 3 Feb 08, 2022
Algo próximo do ARP

ArpPY Algo parecido com o ARP-Scan. Dependencias O script necessita no mínimo ter o Python versão 3.x instalado e ter o sockets instalado. Executando

Feh's 3 Jan 18, 2022
Block fingerprinting for the beacon chain, for client identification & client diversity metrics

blockprint This is a repository for discussion and development of tools for Ethereum block fingerprinting. The primary aim is to measure beacon chain

Sigma Prime 49 Dec 08, 2022