SpanCategorizer prediction issue #10716
Answered
by
thomashacker
smisra1
asked this question in
Help: Coding & Implementations
-
I successfully trained the spancat model. However I can't get a predicted span with a label form the same. I have added the code I used for prediction. How could I get the result as the chosen span and the label associated with it
output:
My config.cfg is below, if required:
|
Beta Was this translation helpful? Give feedback.
Answered by
thomashacker
Apr 27, 2022
Replies: 1 comment 1 reply
-
Hello, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
adrianeboyd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
The Spancat component saves the predicted spans to a SpanGroup (in your case
spans_key = "sc"
). You can access the spans from the SpanGroup by:docs.spans["sc"]
Then you can access the predicted labels from the span by:
span.label_