Skip to content

dtfiedler/simple-rasa-nlu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple RasaNLU Http Server

Installation:

Follow the docs to install RasaNLU available here

To run:

git clone git@github.com:dtfiedler/simple-rasa-nlu.git
cd simple-rasa-nlu
python -m rasa_nlu.server --path projects/default

Example Request

Once you have the server running, you can do an example request to the following URL:

http://localhost:5000/parse?q=hello%20there&project=rasaBot

You should see the following response:

{
  "entities": [], 
  "intent": {
    "confidence": 1.0, 
    "name": "greet"
  }, 
  "text": "hello there"
}

Adding your own project

Steps:

  1. Create your own training data using the site available here

  2. Download the file using the "Download" button in top right as <PROJECT_NAME>-trainging-data.json and save it in the data directory

  3. Update the config_spacy.json file to:

     {
         "fixed_model_name": "<PROJECT_NAME>",
         "pipeline": "spacy_sklearn",
         "path" : "./projects",
         "data" : "./data/PROJECT_NAME-training-data.json"
     }
    
  4. Run the command (this trains Rasa based on your input)

python -m rasa_nlu.train -c config_spacy.json
  1. This should create a new folder in the projects/default directory called <PROJECT_NAME>
  2. Rerun your server by running the command:
python -m rasa_nlu.server --path projects/default
  1. Test one of your example queries by going to
 http://localhost:5000/parse?q=<YOUR_SAMPLE_TEXT>&project=<YOUR_PROJECT_NAME>

About

A simple RasaNLU HTTP Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published