https://nlu.rasa.ai/tutorial.html
Estruturação de intenções e entendidas a partir de solução com exemplo de boleto.
O JSON de treinamento pode ser gerado de forma dinâmica utilizando chatito
Debian
sudo apt-get update
sudo apt-get install python-dev -y
sudo apt-get install python-pip -y
Centos
sudo yum install python-devel
MacOS
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install python3
RASA
sudo pip install rasa_nlu
sudo pip install -U scikit-learn scipy sklearn-crfsuite
sudo pip install spacy
sudo pip install sklearn
#IF ERROR
pip install --upgrade --force-reinstall sklearn
sudo python -m spacy download en
sudo python -m spacy download pt
python -m rasa_nlu.train -c config/config_spacy.json
python -m rasa_nlu.server -c config/config_spacy.json
https://github.com/RasaHQ/rasa-nlu-trainer https://rasahq.github.io/rasa-nlu-trainer
Raw POST sample as JSON
{"q":"quero gerar o boleto de janeiro"}
{
"entities": [
{
"start": 14,
"extractor": "ner_crf",
"end": 20,
"value": "boleto",
"entity": "boleto"
},
{
"start": 21,
"extractor": "ner_crf",
"end": 31,
"value": "de janeiro",
"entity": "mes"
}
],
"intent": {
"confidence": 0.6182224263214309,
"name": "findBoletoDASByMes"
},
"text": "quero gerar o boleto de janeiro",
"intent_ranking": [
{
"confidence": 0.6182224263214309,
"name": "findBoletoDASByMes"
},
{
"confidence": 0.2125461695864951,
"name": "goodbye"
},
{
"confidence": 0.12601956063941733,
"name": "findBoletoDAS"
},
{
"confidence": 0.04321184345265633,
"name": "greet"
}
]
}