notice
This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).
Version: Main/Unreleased
rasa.nlu.featurizers.dense_featurizer.spacy_featurizer
SpacyFeaturizer Objects
@DefaultV1Recipe.register(
DefaultV1Recipe.ComponentType.MESSAGE_FEATURIZER, is_trainable=False
)
class SpacyFeaturizer(DenseFeaturizer, GraphComponent)
Featurize messages using SpaCy.
required_components
@classmethod
def required_components(cls) -> List[Type]
Components that should be included in the pipeline before this component.
required_packages
@staticmethod
def required_packages() -> List[Text]
Any extra python dependencies required for this component to run.
get_default_config
@staticmethod
def get_default_config() -> Dict[Text, Any]
The component's default config (see parent class for full docstring).
__init__
def __init__(config: Dict[Text, Any], name: Text) -> None
Initializes SpacyFeaturizer.
create
@classmethod
def create(cls, config: Dict[Text, Any], model_storage: ModelStorage,
resource: Resource,
execution_context: ExecutionContext) -> GraphComponent
Creates a new component (see parent class for full docstring).
process
def process(messages: List[Message]) -> List[Message]
Processes incoming messages and computes and sets features.
process_training_data
def process_training_data(training_data: TrainingData) -> TrainingData
Processes the training examples in the given training data in-place.
Arguments:
training_data
- Training data.
Returns:
Same training data after processing.
validate_config
@classmethod
def validate_config(cls, config: Dict[Text, Any]) -> None
Validates that the component is configured properly.