Skip to content
Discussion options

You must be logged in to vote

Hi!

The relation_extractor is not a built-in functionality in spaCy. Assuming you're using a custom implementation inspired by e.g. this REL tutorial, then you have to make sure that this definition is exposed to your working environment:

@Language.factory(
    "relation_extractor",
    ...
)
def make_relation_extractor(
    nlp: Language, name: str, model: Model, *, threshold: float
): 
...

You can do so by importing the relevant function at run-time, by using entry-points and/or packaging the model as explained here and here.

The final part of the error message makes this explicit: spaCy's internal configuration & catalogue system searches for the "relation_extractor" factory but can't …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Gowdasuma
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
usage General spaCy usage install Installation issues feat / rel Feature: Relation Extractor
2 participants
Converted from issue

This discussion was converted from issue #12957 on September 05, 2023 13:02.