notice

This is unreleased documentation for Rasa & Rasa Pro Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

rasa.nlu.extractors.spacy_entity_extractor

SpacyEntityExtractor Objects

@DefaultV1Recipe.register(
DefaultV1Recipe.ComponentType.ENTITY_EXTRACTOR,
is_trainable=False,
model_from="SpacyNLP",
)
class SpacyEntityExtractor(GraphComponent, EntityExtractorMixin)

Entity extractor which uses SpaCy.

required_components

@classmethod
def required_components(cls) -> List[Type]

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

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]) -> None

Initialize SpacyEntityExtractor.

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

required_packages

@staticmethod
def required_packages() -> List[Text]

Lists required dependencies (see parent class for full docstring).

process

def process(messages: List[Message], model: SpacyModel) -> List[Message]

Extract entities using SpaCy.

Arguments:

  • messages - List of messages to process.
  • model - Container holding a loaded spacy nlp model.
  • Returns - The processed messages.