Skip to content
Discussion options

You must be logged in to vote

Sorry you're having trouble with this. I'll start with the question from the title here and come back to your other questions.

For example; I want to build a custom entity ruler, based on a dictionary of words I have. How should I go about that? Do I create a blank spaCy object, and add "entity_ruler" as a pipe?

The entity ruler works using patterns, so you should loop over your dictionary to create patterns. Exactly what patterns depends on the kind of match you want - maybe you want to match all of those if they match regardless of case, in which case you could use them as Phrase Matches and make the entity ruler match on the LOWER attribute. That would look a bit like this.

data = {"…

Replies: 5 comments 13 replies

Comment options

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

@woutrbe
Comment options

@polm
Comment options

@woutrbe
Comment options

Answer selected by adrianeboyd
Comment options

You must be logged in to vote
1 reply
@polm
Comment options

Comment options

You must be logged in to vote
5 replies
@polm
Comment options

@darrkj
Comment options

@polm
Comment options

@darrkj
Comment options

@polm
Comment options

Comment options

You must be logged in to vote
1 reply
@darrkj
Comment options

Comment options

You must be logged in to vote
2 replies
@polm
Comment options

@pythonic2020
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation and website feat / pipeline Feature: Processing pipeline and components feat / matcher Feature: Token, phrase and dependency matcher
5 participants
Converted from issue

This discussion was converted from issue #9766 on November 30, 2021 04:18.