Skip to content
Discussion options

You must be logged in to vote

Hi @chillwinston, let me address

Different words and poor language structure can prevent entities from being recognised.

first. You are assigning your new component to temp_ruler - but then proceed to create a different EntityRuler, assign it to ruler, and add your patterns to the latter. ruler is not part of your pipeline, hence the search pattern is not applied. One way to do this properly is to pass your config options as config to nlp.add_pipe(). Below is a corrected example. If you run, you'll see that all listed examples are processed properly.

nlp = spacy.load('en_core_web_sm')
ruler = nlp.add_pipe(
    "entity_ruler",
    name="temp_ruler",
    validate=True,
    config={"valida…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rmitsch
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
usage General spaCy usage feat / pipeline Feature: Processing pipeline and components feat / matcher Feature: Token, phrase and dependency matcher
2 participants
Converted from issue

This discussion was converted from issue #11597 on October 10, 2022 07:26.