notice
This is documentation for Rasa Open Source Documentation v2.1.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.2.x).
rasa.nlu.model
InvalidModelError Objects
Raised when a model failed to load.
Attributes:
message
- explanation of why the model is invalid
UnsupportedModelError Objects
Raised when a model is too old to be loaded.
Attributes:
message
- explanation of why the model is invalid
Metadata Objects
Captures all information about a model to load and prepare it.
load
Loads the metadata from a models directory.
Arguments:
model_dir
- the directory where the model is saved.
Returns:
Metadata
- A metadata object describing the model
language
Language of the underlying model
persist
Persists the metadata of a model to a given directory.
Trainer Objects
Trainer will load the data and train all components.
Requires a pipeline specification and configuration to use for the training.
train
Trains the underlying pipeline using the provided training data.
persist
Persist all components of the pipeline to the passed path.
Returns the directory of the persisted model.
Interpreter Objects
Use a trained pipeline of components to parse text messages.
load
Create an interpreter based on a persisted model.
Arguments:
skip_validation
- If set toTrue
, does not check that all required packages for the components are installed before loading them.model_dir
- The path of the model to loadcomponent_builder
- The :class:rasa.nlu.components.ComponentBuilder
to use.
Returns:
An interpreter that uses the loaded model.
create
Load stored model and components defined by the provided metadata.
parse
Parse the input text, classify it and return pipeline result.
The pipeline result usually contains intent and entities.
featurize_message
Tokenize and featurize the input message
Arguments:
message
- message storing text to process;
Returns:
message
- it contains the tokens and features which are the output of the NLU pipeline;