Skip to content

How to remove the default patterns on EntityRuler? #5025

Discussion options

You must be logged in to vote

The labels 'CARDINAL' etc. you're seeing, are not coming from default rules in the EntityRuler, but are in fact produced by a pretrained NER component that is part of the pretrained model you're loading. To remove this component, you can either run your code in a with nlp.disable_pipes("ner"): block to disable it temporarily, or you can remove it completely by running nlp.remove_pipe("ner").

The other option you have is to start with a blank model, e.g. nlp = English() which doesn't have any pretrained components (also no sentence splitter!).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ines
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
Converted from issue

This discussion was converted from issue #5025 on December 11, 2020 00:45.