notice

This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.8.x).

Version: Master/Unreleased

rasa.nlu.featurizers.dense_featurizer.spacy_featurizer

SpacyFeaturizerGraphComponent Objects

class SpacyFeaturizerGraphComponent(DenseFeaturizer2, GraphComponent)

Featurize messages using SpaCy.

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 SpacyFeaturizerGraphComponent.

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.
  • model - A Mitie model.

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.

validate_compatibility_with_tokenizer

@classmethod
def validate_compatibility_with_tokenizer(cls, config: Dict[Text, Any], tokenizer_type: Type[TokenizerGraphComponent]) -> None

Validates that the featurizer is compatible with the given tokenizer.