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.extractors.spacy_entity_extractor

SpacyEntityExtractorGraphComponent Objects

class SpacyEntityExtractorGraphComponent(GraphComponent, EntityExtractorMixin)

Entity extractor which uses 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]) -> None

Initialize SpacyEntityExtractorGraphComponent.

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

@classmethod
def required_packages(cls) -> 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.