Skip to content
Discussion options

You must be logged in to vote

The pattern {"LOWER": "Brain"} shouldn't ever match anything, so double-check your first pattern to see if you can reproduce this? If you still think it's a bug, can you provide a minimal working example that shows this problem in a short script we can run?

The lemma pattern is trickier because it depends on the lemma assigned by your model, which depends on the tagger and the lemmatizer. If you look carefully at the token.lemma_ values in your docs before you run the Matcher, you should be able to track down what's going on.

In terms of the vocab, you just need to be sure that the pipeline (nlp), entity ruler and the docs are all using the same vocab, so:

nlp = spacy.load(model)
ruler = …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by svlandeg
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / matcher Feature: Token, phrase and dependency matcher
2 participants