Back

IN  CONVERSATION WITH A MACHINE  

Created 2 years ago
153 Views
0 Comments
cyril24MJTz
@cyril24MJTz
cyril24MJTz
@cyril24MJTzProfile is locked. Login

Rasa helps to make Chatbots that makes you to have a sensible conversation with machines

Ever wondered about chatting with computers that chat similarly to humans? Chatbots are responsible for these sensible conversations. Chatbots ate software applications used for online conversations by machines via text or voice.

Have you tried to create these chatbots or restrained from such activity due to the fear of coding? Then, here comes the solution. i.e Rasa open source.

Rasa is an open-source machine-learning framework for automated text and voice-based virtual assistance. It includes natural language understanding and open-source natural language processing.

Largely you don’t need any programming language expertise to use Rasa but you should be aware of the “Rasa Action Server” which is to activate external actions like calling API’s etc. Here you need a basic understanding and coding knowledge of python.

Features-Rasa.

  • Contextual Guidance and Intent Recognition.

  • Natural Language Processing.

  • Pre-Configured.

  • Analysis.

  • Third Party Integrations.

 

Overview Of Rasa Architecture

The diagram below  provides an overview of the Rasa architecture.

 The two primary components are Natural Language Understanding (NLU) and Natural language processing.

 

Rasa NLU — This is often the place, wherever Rasa tries to read the messages understand it, and analyze the user message. Rasa NLU has completely different parts for recognizing intents and entities, most of that has some extra dependencies.it is shown as NLU pipeine in the diagram

Rasa Core — This is often the place, wherever Rasa try and assist you with discourse message flow. On the basis of the user message, it will predict dialogue as a reply and can activate Rasa Action Server.It is shown as Dialogue Policies in diagram

The Agent class provides an interface for the most important Rasa functionality. This includes training, handling messages, loading a dialogue model, getting the next action, and handling a channel.

 

 

Now we can look at the installation:

 

1.Python Environment Setup

 

Check if the Python environment is already configured:

 

python3 –version

pip3--version

 

These commands should display version number for each steps and so you can skip this step to the next.

Otherwise, proceed with the instructions below.

 

C:\> pip3 install -U pip

(For windows)

 

2. Virtual Environment Setup

 

Create a new virtual environment by choosing a Python interpreter and making a .\\venv directory:

 

C:\> python3 -m venv ./venv

 

 

Activate the virtual environment:

 

C:\> .\venv\Scripts\activate

pip3--version

 

 

Install Rasa Open Source

 

First make sure your pip version is up to date:

 

pip3 install -U pip

To install Rasa Open Source:

 

pip3 install rasa

 

we can create a new project with:

 

rasa init

Additional dependencies

 

To keep the footprint small,some machine learning algorithms require additional python packages.

 

 

pip3 install rasa[full]

 

use this command to install all needed dependencies for every configuration.

 

Dependencies for spaCy

You can install it with the following commands:

pip3 install rasa[spacy]

python3 -m spacy download en_core_web_md

It is more convenient for using at least the "medium" sized models (_md) instead of the spaCy's default small en_core_web_sm model. Small models require less memory to run, but will reduce performance.

 spaCy is an open-source software library. It is used for advanced natural language processing. It is written in  Python and Cython


Dependencies for MITIE

 

MITIE got many pre-trained models giving varying levels of supports for  English, Spanish, and German languages and is trained using a variety of linguistic resources

First, run

pip3 install git+https://github.com/mit-nlp/MITIE.git

pip3 install rasa[mitie]

After that download the MITIE models.

We need the file total_word_feature_extractor.dat.

Save it.

Upgrading Versions

Use this command to upgrade your installed to the latest version from PyPI:

 

pip3 install --upgrade rasa

To download a specific version, specify the version number:

 

pip3 install rasa==3.0

 

Sample Chatbot

Rasa will create a sample chatbot for you with default information. Thus currently you'll begin victimization from Terminal. As a start line let’s take a look at your Chatbot from a terminal (remember to try  this in the Terminal)

rasa shell

(just try it and type “hi”,you’ll get a reply of “hi” from the machine)

 

Rasa X is a tool that helps you build, improve, and deploy AI Assistants that are powered by the Rasa framework. Rasa X includes a user interface and a REST API. Rasa X is the latest addition to the rasa stack..
We can use Rasa-X to try our chatbot on Browser. we can download training Data. we can also correct our training data by guiding your Bot.

 Type the following

rasa x

It will ask for the license Agreement. Then you can type “y” and continue.

Next,open this link on Browser — http://localhost:5002/talk

On the left side, you can start to chat and on the right side you will get the reply.

Rasa has been used to build bots in about 100 languages. so it is a strong, reliable and efficient tool to build and scale sophisticated conversational Al

 

Comments
Please login to comment.