Configuration

You can provide options to Rasa NLU through:

  • a yaml-formatted config file
  • environment variables
  • command line arguments

Environment variables override options in your config file, and command line args will override any options specified elsewhere. Environment variables are capitalised and prefixed with RASA_, so the option pipeline is specified with the RASA_PIPELINE env var.

Default

Here is an example model configuration:

language: "en"

pipeline:
- name: "nlp_spacy"
  model: "en"
- name: "ner_spacy"
- name: "ner_ngrams"
  max_number_of_ngrams: 7
- name: "ner_duckling_http"
  url: "http://my_url"
  dimensions:
  - "NUMBER"
- name: "ner_crf"
  BILOU_flag: true
  features:
    # features for word before token
    - ["low", "title", "upper", "pos", "pos2"]
    # features of token itself
    - ["bias", "low", "word3", "word2", "upper", "title", "digit", "pos", "pos2", "pattern"]
    # features for word after the token we want to tag
    - ["low", "title", "upper", "pos", "pos2"]
  max_iterations: 50
  L1_c: 1
  L2_c: 1e-3
- name: "intent_classifier_sklearn"
  C: [1, 2, 5, 10, 20, 100]
  kernel: "linear"

As you can see, there are a couple of top-level configuration keys, like language and pipeline - but most of the configuration is component specific.

Explanations for the configuration keys of the different components are part of the Processing Pipeline.

Options

A short explanation and examples for each configuration value.

pipeline

Type:

str or [dict]

Examples:

using a pipeline template (predefined set of components with default parameters):

pipeline: "spacy_sklearn"

or alternatively specifying the components and paremters:

pipeline:
- name: "nlp_spacy"
  model: "en"               # parameter of the spacy component
- name: "ner_synonyms"
Description:

The pipeline used for training. Can either be a template (passing a string) or a list of components (array) and there configuration values. For all available templates, see Processing Pipeline. The component specific parameters are listed there as well.

language

Type:

str

Examples:
language: "en"
Description:

Language the model is trained in. Underlying word vectors will be loaded by using this language. There is more info about available languages in Language Support.