How to initialize EntityRuler with sourced tagger, parser, lemmatizer, … components? #9587
Unanswered
kinghuang
asked this question in
Help: Coding & Implementations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to assemble a model where the
tagger,parser,lemmatizerand other components are sourced from another model. This model also has several EntityRulers, which I'm initializing with patterns. Some of the patterns use theLEMMAattribute.Config Excerpts:
Full Config File
Example Pattern:
{"id": "unit:AC", "label": "UNIT", "pattern": [{"LEMMA": "acre"}]}Problem:
When I run spacy assemble, a ValueError occurs. The
lemmatizercomponent is not active in the pipeline.Full Stack Trace
This is because
assemble_cli()disables all sourced pipeline components before callinginitialize()on the remaining components.spaCy/spacy/cli/assemble.py
Lines 47 to 51 in 90ec820
Pipeline Components During EntityRuler.initialize():
All the sourced pipeline components, including
lemmatizerare disabled.Question:
How I can initialize EntityRuler components with patterns that use attributes such as
LEMMAin a config where thelemmatizerand other components are sourced?I think what is needed is for the
assemblecommand to not initialize the sourced pipeline components, instead of disabling them during intialization.Beta Was this translation helpful? Give feedback.
All reactions