Skip to content
Discussion options

You must be logged in to vote

Seems like your issue stems from the fact that the positional parameters passed to the PhuzzyMatcher constructor are incorrect:

@Language.factory("phuzzymatcher")
def create_phuzzymatcher(
    nlp: Language, name: str, set: list, match: int, label=None, stop_words=None
):
    return PhuzzyMatcher(nlp, set, match, label, stop_words)

class PhuzzyMatcher:
    def __init__(self, nlp, name, set, match, label, stop_words=None):
		...

Passing name before set resolves the error you're seeing.

On a related note, when spaCy v3.5 is released, it will include fuzzy matching support in the Matcher class.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@lorijwong
Comment options

@shadeMe
Comment options

@lorijwong
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by shadeMe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
third-party Third-party packages and services feat / matcher Feature: Token, phrase and dependency matcher
2 participants