Version: 3.x

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

Initialize SpacyEntityExtractor.

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

required_packages

| @classmethod
| required_packages(cls) -> List[Text]

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

process

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