notice
This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).
rasa.nlu.featurizers.sparse_featurizer.regex_featurizer
RegexFeaturizer Objects
Adds message features based on regex expressions.
required_components
Components that should be included in the pipeline before this component.
get_default_config
Returns the component's default config.
__init__
Constructs new features for regexes and lookup table using regex expressions.
Arguments:
config
- Configuration for the component.model_storage
- Storage which graph components can use to persist and load themselves.resource
- Resource locator for this component which can be used to persist and load itself from themodel_storage
.execution_context
- Information about the current graph run.known_patterns
- Regex Patterns the component should pre-load itself with.
create
Creates a new untrained component (see parent class for full docstring).
train
Trains the component with all patterns extracted from training data.
process_training_data
Processes the training examples (see parent class for full docstring).
process
Featurizes all given messages in-place.
Returns:
the given list of messages which have been modified in-place
load
Loads trained component (see parent class for full docstring).
validate_config
Validates that the component is configured properly.