Version: 3.x

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
| required_components(cls) -> List[Type]

Components that should be included in the pipeline before this component.

get_default_config

| @staticmethod
| get_default_config() -> Dict[Text, Any]

The component's default config (see parent class for full docstring).

__init__

| __init__(config: Dict[Text, Any], name: Text) -> None

Initializes SpacyFeaturizer.

create

| @classmethod
| 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

| process(messages: List[Message]) -> List[Message]

Processes incoming messages and computes and sets features.

process_training_data

| 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
| validate_config(cls, config: Dict[Text, Any]) -> None

Validates that the component is configured properly.