Trainable pipeline with pre-added layout spans #13718
Unanswered
thatbudakguy
asked this question in
Help: Coding & Implementations
Replies: 1 comment 1 reply
-
...I guess this is a bad idea, since What I'm interested in ultimately is having layout information already annotated on the training docs. I generated and exported annotations using prodigy's |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe this isn't the right way to do this, but I'm attempting to run the layout before the rest of my pipeline, so that I can use the spans identified by it and pass them to my components.
Specifically, the use case is taking the identified layout spans (
Doc.spans["layout"]
) and using them as the suggested spans for theSpanCategorizer
directly (viaspacy.preset_spans_suggester.v1
).What I tried to do was define a callback like:
And use it in my config, e.g.:
And then invoke
spacy train --code my_code.py
to pick up the function.What I get is:
Beta Was this translation helpful? Give feedback.
All reactions