Skip to content

LeonardMF/testing_nlu

Repository files navigation

TestNLU for Voice User Interfaces

The TestNLU ist part of the Test Environment for Voice user Interfaces, which has been developed in the thesis Automatisiertes Testen von dialogfähigen Sprachassistenten.

The Test NLU uses Rasa 1.0 Stack. Using only NLU approach has been used, since the Chatbot functionality of Rasa CORE is handled by the Test Manager in the Frontend.

Prerequisites

Python >= 3.7.4

Create Virtual Environment

Follow the instruction in der Docs and Blog:

$ python3 -m venv venv
$ echo 'venv' > .gitignore

$ source venv/bin/activate

Select Interpreter (VS Code)

To select a specific environment, use the Command Palette (⇧⌘P). Type in Python: Select Interpreter and select ./venv/bin/python.

Docs

Install Rasa

Follow the instruction in der Docs:

$ pip3 install rasa

Know Error. With 1.1.7 and Only NLU: Workaround:

$ pip install git+git://github.com/rasaHQ/rasa.git@master

Install NLU Dependencies

Follow the instruction in der Docs:

$ pip install rasa[spacy]
$ python -m spacy download en_core_web_md
$ python -m spacy link en_core_web_md en

$ python -m spacy download de

$ python -m spacy download de_core_news_md
$ python -m spacy link de_core_news_md de

Taken from spacy.io.

Freeze the requirements:

$ pip freeze > requirements.txt
$ git add requirements.txt

$ pip install -r requirements.txt

Init Rasa

$ rasa init

Train Model

$ rasa nlu train

Run Rasa on server

$ rasa run --enable-api -m models/nlu-20190728-223910.tar.gz --cors "*"

$ rasa run --enable-api -m models --cors "*"

[Docs](https://rasa.com/docs/rasa/nlu/using-nlu-only/)

Run Docker s

$ docker run -p 8000:8000 rasa/duckling
$ docker run rasa/rasa:latest-full -p5000:5000

Run Docker Compose

$ docker-compose up

Check Rasa NLU Container

$ docker ps
$ docker exec -it rasa_rasa_1 /bin/bash
# exit -->

Start with Test Manager

$ docker-compose -f docker-compose.yml -f ../test_manager/docker-compose.yaml up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published