Skip to content
Discussion options

You must be logged in to vote

There is not a separate registry for components because components are just a wrapper for factory registry entries.

However the entry points behavior is pretty confusing because:

  • importing code related to an entry point can run additional code through decorators
  • there is a hidden internal entry points registry for factories just to make it easy to import+run code with decorators, and it's the decorators that are important not the entry point names

So with this code + entry point, you'll end up with a factory for the name my_component:

from spacy import Language


@Language.component("my_component")
def my_method(doc):
    return doc
spacy_factories =
    _some_unused_name = my_package.c…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@coltonflowers1
Comment options

@adrianeboyd
Comment options

@coltonflowers1
Comment options

@adrianeboyd
Comment options

Answer selected by adrianeboyd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / pipeline Feature: Processing pipeline and components
2 participants