wiki.ziemers.de

ziemer's informatik Wiki

Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki:software:beuthbot:rasa

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
wiki:software:beuthbot:rasa [23.01.2020 10:21]
Timo Bruns
wiki:software:beuthbot:rasa [24.01.2020 15:18] (aktuell)
Abirathan Yogarajah
Zeile 1: Zeile 1:
 ===== Rasa NLU ===== ===== Rasa NLU =====
-[[wiki:software:beuthbot:registry]] 
  
 > Rasa is an open source solution for developing "AI assistants" or chatbots. Rasa provides a stack consisting of the modules "Rasa NLU" and "Rasa Core". With the help of "Rasa NLU" the user intention is determined from the received text message (Intent Recognition) and afterwards the NLU returns all intentions of the message sorted according to the "Confidence Score". Training data is required to record the user's intentions. Furthermore, Rasa NLU allows "entity recognition" to extract relevant terms from the text. The Rasa Core is a dialog engine that uses machine-learning trained models to decide which response to send to the user, such as greet the user. Furthermore, the core allows "session management" as well as "context-handling". Within the project only the component "Rasa NLU" will be used, because only the functionality is needed to capture entities from a text message and to determine the user intention.  > Rasa is an open source solution for developing "AI assistants" or chatbots. Rasa provides a stack consisting of the modules "Rasa NLU" and "Rasa Core". With the help of "Rasa NLU" the user intention is determined from the received text message (Intent Recognition) and afterwards the NLU returns all intentions of the message sorted according to the "Confidence Score". Training data is required to record the user's intentions. Furthermore, Rasa NLU allows "entity recognition" to extract relevant terms from the text. The Rasa Core is a dialog engine that uses machine-learning trained models to decide which response to send to the user, such as greet the user. Furthermore, the core allows "session management" as well as "context-handling". Within the project only the component "Rasa NLU" will be used, because only the functionality is needed to capture entities from a text message and to determine the user intention. 
Zeile 100: Zeile 99:
 rasa shell nlu –m models/name-of-the-model.tar.gz rasa shell nlu –m models/name-of-the-model.tar.gz
 </code> </code>
 +
 +Running Duckling:
 +
 +After using the command "rasa train nlu" a model is generated. When communicating with Rasa via the shell ("rasa shell nlu ...") the component "Duckling" is not addressed. With Duckling you can identify and resolve dates. To use Duckling you can add the trained model in the path "docker\rasa-app-data\models". Then you can run Rasa and Duckling as docker-containers and query them using the Rest API. Running Rasa and Duckling as docker-containers are explained in a later section.
  
 === How to generate training datasets === === How to generate training datasets ===
  
 In this project we write training data in the form of JSON, because JSON offers the possibility to extract entities from a text message. For this purpose the data was generated with the tool   [[https://github.com/YuukanOO/tracy|Tracy]]. In the image below, Tracy is shown with "Öffnungszeiten". Entities are added as "slots", such as "Ort". Training data follows in the lower part of the picture. As training data, you can specify messages, which the user can send to the "chatbot". Currently the three user intentions "Mensa", "Wetter" and "Öffnungszeiten" are supported. In this project we write training data in the form of JSON, because JSON offers the possibility to extract entities from a text message. For this purpose the data was generated with the tool   [[https://github.com/YuukanOO/tracy|Tracy]]. In the image below, Tracy is shown with "Öffnungszeiten". Entities are added as "slots", such as "Ort". Training data follows in the lower part of the picture. As training data, you can specify messages, which the user can send to the "chatbot". Currently the three user intentions "Mensa", "Wetter" and "Öffnungszeiten" are supported.
 +
 +{{:wiki:software:beuthbot:index.png_.png?400|}}
  
 === Add new Model for Rasa-Container (Docker) === === Add new Model for Rasa-Container (Docker) ===
Zeile 118: Zeile 123:
 === Installing === === Installing ===
  
-After the repository has been cloned and the prerequisites have been fulfilled, you can run the Docker-Compose-file.+After the repository has been cloned and the prerequisites have been fulfilled, you can run the Docker-Compose-file. The docker commands must be executed in the 'docker'-directory.
  
 :!: FIXME FIXME FIXME :!: FIXME FIXME FIXME
  
 <code> <code>
-# build and start Rasa-NLU-Container && serve at localhost:5005+# build and start Containers && serve at localhost:5005 (rasa) and at localhost:8000 (duckling)
 docker-compose up docker-compose up
  
-# stop and remove rasa-container, volumes, images and networks+# stop and remove rasa-containers, volumes, images and networks
 docker-compose down docker-compose down
  
Zeile 203: Zeile 208:
 - https://www.artificial-solutions.com/wp-content/uploads/chatbots-ebook-deutsche.pdf (Retrieved 12.12.2019)\\ - https://www.artificial-solutions.com/wp-content/uploads/chatbots-ebook-deutsche.pdf (Retrieved 12.12.2019)\\
 - https://docs.docker.com/ (Retrieved 12.12.2019) - https://docs.docker.com/ (Retrieved 12.12.2019)
 +<WRAP pagebreak></WRAP>
wiki/software/beuthbot/rasa.1579771301.txt.gz · Zuletzt geändert: 23.01.2020 10:21 von Timo Bruns