1.1 Edit data in dataset/data.yaml
1.2 Export data with command
python scripts/export_data.py
1.3 Edit data/stories.yml
(optional)
- Download cc.vi.300.bin, move it to
.cache/fasttext
rasa train --config config/fasttext.yml
rasa train --config {config_file}
rasa train nlu --config {config_file}
rasa shell
# or
rasa shell nlu
Example: 5 folds CV
rasa test nlu --config config/fasttext.yml --cross-validation --runs 5 --fold 5 --out results/fasttext
or run all configs, see test_models.bat
rasa test nlu --config config/custom.yml --cross-validation --runs 5 --fold 5 --out results/vectorcount
rasa test nlu --config config/fasttext.yml --cross-validation --runs 5 --fold 5 --out results/fasttext
rasa test nlu --config config/bert.yml --cross-validation --runs 5 --fold 5 --out results/bert
rasa test nlu --config config/phobert_base.yml --cross-validation --runs 5 --fold 5 --out results/phobert_base
rasa test nlu --config config/phobert_large.yml --cross-validation --runs 5 --fold 5 --out results/phobert_large
Prettify and display test result from results/
folder
python eval.py
# Sample output
------
Model |Acc |Precision |Recall
------------------------------------------------------------
fasttext | 0.869| 0.871| 0.89
vectorcount | 0.833| 0.856| 0.819
bert | 0.77| 0.81| 0.781
phobert_base | 0.705| 0.754| 0.681
phobert_large | 0.63| 0.603| 0.612
pip install --upgrade pip
pip3 install rasa-x==0.39.3 --extra-index-url https://pypi.rasa.com/simple --use-deprecated=legacy-resolver
- Required trained model with {config_file} before
rasa x --config {config_file}
# Sample output
Starting Rasa X in local mode... >
...
The server is running at http://localhost:5002/login?username=me&password=xxxxxxxxx
This should open a browser tab to http://localhost:5002 and login automatically
- Install ngrok, run and command
ngrok http 5002
# Sample output
Session Status online
Session Expires 7 hours, 59 minutes
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4041
Forwarding http://831897ef2f98.ngrok.io -> http://localhost:5002
Forwarding https://831897ef2f98.ngrok.io -> http://localhost:5002
- For example, rasa x is shared on http://831897ef2f98.ngrok.io