Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
wiki:software:beuthbot:rasa [23.01.2020 00:14] Abirathan Yogarajah |
wiki:software:beuthbot:rasa [24.01.2020 15:18] (aktuell) Abirathan Yogarajah |
||
---|---|---|---|
Zeile 33: | Zeile 33: | ||
''" | ''" | ||
\\ | \\ | ||
- | The user intention is then determined from the text.\\ | + | The user intention is then determined from the text. In the figure below, the response to the message is displayed. The user intention (" |
<code javascript> | <code javascript> | ||
Zeile 48: | Zeile 48: | ||
" | " | ||
" | " | ||
- | | + | ... |
- | " | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | ], | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | " | + | |
- | " | + | |
} | } | ||
- | ], | + | ] |
- | | + | ... |
- | { | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | }, | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | ], | + | |
- | " | + | |
} | } | ||
</ | </ | ||
- | Training data is needed so that Rasa can identify the intention of a text. Training | + | Training data is needed so that Rasa can identify the intention of a text. For this purpose, training |
To create a trained model for Rasa from the Markdown or JSON, Rasa offers a REST API. An alternative to creating trained models is to install Rasa on your local machine and then create the model using the command "rasa train nlu". Rasa creates the training model (tar.gz) from the Markdown or JSON. | To create a trained model for Rasa from the Markdown or JSON, Rasa offers a REST API. An alternative to creating trained models is to install Rasa on your local machine and then create the model using the command "rasa train nlu". Rasa creates the training model (tar.gz) from the Markdown or JSON. | ||
Zeile 103: | Zeile 76: | ||
- | === Project structure | + | === Project structure === |
+ | |||
+ | The following files and directories are important for the project to configure Rasa, customize training data and create appropriate training models. | ||
- config.yaml: | - config.yaml: | ||
Zeile 109: | Zeile 84: | ||
- /data (directory): | - /data (directory): | ||
contains training data in the form of JSON (Markdown would also be possible) \\ | contains training data in the form of JSON (Markdown would also be possible) \\ | ||
- | - /models: \\ | + | - / |
contains the trained model in the form of tar.gz.files The model is needed to capture entities and the user intent of a message. \\ | contains the trained model in the form of tar.gz.files The model is needed to capture entities and the user intent of a message. \\ | ||
Zeile 124: | Zeile 99: | ||
rasa shell nlu –m models/ | rasa shell nlu –m models/ | ||
</ | </ | ||
+ | |||
+ | 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 " | ||
=== 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 | 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 | ||
+ | |||
+ | {{: | ||
=== Add new Model for Rasa-Container (Docker) === | === Add new Model for Rasa-Container (Docker) === | ||
Zeile 142: | 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 ' |
:!: FIXME FIXME FIXME | :!: FIXME FIXME FIXME | ||
< | < | ||
- | # build and start Rasa-NLU-Container | + | # build and start Containers |
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 227: | Zeile 208: | ||
- https:// | - https:// | ||
- https:// | - https:// | ||
+ | <WRAP pagebreak></ |