How to create training data for RASA NLU through p

2019-06-10 04:51发布

How to create training data through program for RASA NLU? Actually I am developing an application using MEAN stack, this application prepares the data that needs to be trained with RASA NLU.

But I don't know how to pass this info from my nodejs server to RASA NLU. Is there any supported api's to achieve this?

2条回答
ゆ 、 Hurt°
2楼-- · 2019-06-10 05:13

Rasa has a highly functional API as documented here.

To answer the specific question you can pass training data to the Rasa NLU API via the below commands:

If your training data is in a file:

curl -XPOST localhost:5000/train?project=my_project -d @data/examples/rasa/demo-rasa.json

If your training data is in json format:

curl --request POST \
  --url 'http://localhost:5000/train?project=test&fixed_model_name=tested-project' \
  --header 'content-type: application/json' \
  --data ' {
  "rasa_nlu_data": {
    "regex_features": [
      {
        "name": "zipcode",
        "pattern": "[0-9]{5}"
      }
    ],
    "entity_synonyms": [
      {
        "value": "chinese",
        "synonyms": ["Chinese", "Chines", "chines"]
      },
      {
        "value": "vegetarian",
        "synonyms": ["veggie", "vegg"]
      }
    ],
    "common_examples": []
  }
}'

Obviously you'll need to create the json file or payload. and in Node you wouldn't be using curl, but a library like request.

I've written a series of tutorials that may be good to help you get started interacting with Rasa's API.

查看更多
虎瘦雄心在
3楼-- · 2019-06-10 05:20

I use a python library which is pretty good to power your conversational software, based on the latest Machine Learning research.

In order to use this, you have to build a python service that will interact with your nodejs server.

It would be also easy for you to scale and maintain both in the future

Or you can check this opensource app https://github.com/aashreys/chatbot-example

查看更多
登录 后发表回答