Skip to content
Discussion options

You must be logged in to vote

A function in a registry should not be a method on an instance of an object. As you have the decorator now, the function you have for patterns has to be called on an instance of Metabase, but there's no place to get the Metabase object from. The error means that you're creating the function but you're not passing the required argument of self, but there's also no way to specify that in the config file.

Things that go in the config need to be JSON serializable. Assuming Metabase is not JSON serializable, the easiest thing here is probably to have a function on the PhraseMatcherComponent that allows you to set the Metabase after the component has been initialized, such as set_metabase(self,…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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 v2 spaCy v2.x
2 participants