notice
This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
rasa.shared.importers.importer
TrainingDataImporter Objects
Common interface for different mechanisms to load training data.
get_domain
Retrieves the domain of the bot.
Returns:
Loaded Domain
.
get_stories
Retrieves the stories that should be used for training.
Arguments:
template_variables
- Values of templates that should be replaced while reading the story files.use_e2e
- Specifies whether to parse end to end learning annotations.exclusion_percentage
- Amount of training data that should be excluded.
Returns:
StoryGraph
containing all loaded stories.
get_conversation_tests
Retrieves end-to-end conversation stories for testing.
Returns:
StoryGraph
containing all loaded stories.
get_config
Retrieves the configuration that should be used for the training.
Returns:
The configuration as dictionary.
get_nlu_data
Retrieves the NLU training data that should be used for training.
Arguments:
language
- Can be used to only load training data for a certain language.
Returns:
Loaded NLU TrainingData
.
load_from_config
Loads a TrainingDataImporter
instance from a configuration file.
load_core_importer_from_config
Loads core TrainingDataImporter
instance.
Instance loaded from configuration file will only read Core training data.
load_nlu_importer_from_config
Loads nlu TrainingDataImporter
instance.
Instance loaded from configuration file will only read NLU training data.
load_from_dict
Loads a TrainingDataImporter
instance from a dictionary.
NluDataImporter Objects
Importer that skips any Core-related file reading.
get_domain
Retrieves model domain (see parent class for full docstring).
get_stories
Retrieves training stories / rules (see parent class for full docstring).
get_conversation_tests
Retrieves conversation test stories (see parent class for full docstring).
get_config
Retrieves model config (see parent class for full docstring).
get_nlu_data
Retrieves NLU training data (see parent class for full docstring).
CombinedDataImporter Objects
A TrainingDataImporter
that combines multiple importers.
Uses multiple TrainingDataImporter
instances
to load the data as if they were a single instance.
get_config
Retrieves model config (see parent class for full docstring).
get_domain
Retrieves model domain (see parent class for full docstring).
get_stories
Retrieves training stories / rules (see parent class for full docstring).
get_conversation_tests
Retrieves conversation test stories (see parent class for full docstring).
get_nlu_data
Retrieves NLU training data (see parent class for full docstring).
ResponsesSyncImporter Objects
Importer that syncs responses
between Domain and NLU training data.
Synchronizes responses between Domain and NLU and adds retrieval intent properties from the NLU training data back to the Domain.
get_config
Retrieves model config (see parent class for full docstring).
get_domain
Merge existing domain with properties of retrieval intents in NLU data.
get_stories
Retrieves training stories / rules (see parent class for full docstring).
get_conversation_tests
Retrieves conversation test stories (see parent class for full docstring).
get_nlu_data
Updates NLU data with responses for retrieval intents from domain.
E2EImporter Objects
Importer with the following functionality.
- enhances the NLU training data with actions / user messages from the stories.
- adds potential end-to-end bot messages from stories as actions to the domain
get_domain
Retrieves model domain (see parent class for full docstring).
get_stories
Retrieves the stories that should be used for training.
See parent class for details.
get_conversation_tests
Retrieves conversation test stories (see parent class for full docstring).
get_config
Retrieves model config (see parent class for full docstring).
get_nlu_data
Retrieves NLU training data (see parent class for full docstring).