You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want a spancat that categorize spans of text suggested by another component. I want to train the spancat from the gold standard so I'm just interested in the classification part and not in the SpanSuggester. To do this I have a training and validation docbin files, each doc have the spangroup 'sc' and each span have its own label. For the config file I just changed the default ngram suggester with the spacy.preset_span_suggester.v1.
As soon as the training start it crash in:
[...]/spacy/pipeline/spancat.py", line 123, in preset_spans_suggester
if doc.spans[spans_key]:
So I tried debug the preset_span_suggester function to print the spans that the doc contains and print an empty dict, but the input data is correct
EDIT:
I came to the conclusion that preset_span_suggester is not meant for this. I think that I need a component that copy the SpanGroup from the "reference" to the "predicted" document of the Examples, then I can use the preset_span_suggester, am I right?
The text was updated successfully, but these errors were encountered:
Have you added component that suggests the spans to the annotating_components list in the config? That will save its annotations in the predicted document during training.
This issue has been automatically closed because there has been no response to a request for more information from the original author. With only the information that is currently in the issue, there's not enough information to take action. If you're the original author, feel free to reopen the issue if you have or find the answers needed to investigate further.
I want a spancat that categorize spans of text suggested by another component. I want to train the spancat from the gold standard so I'm just interested in the classification part and not in the SpanSuggester. To do this I have a training and validation docbin files, each doc have the spangroup 'sc' and each span have its own label. For the config file I just changed the default ngram suggester with the spacy.preset_span_suggester.v1.
As soon as the training start it crash in:
[...]/spacy/pipeline/spancat.py", line 123, in preset_spans_suggester
if doc.spans[spans_key]:
So I tried debug the preset_span_suggester function to print the spans that the doc contains and print an empty dict, but the input data is correct
EDIT:
I came to the conclusion that preset_span_suggester is not meant for this. I think that I need a component that copy the SpanGroup from the "reference" to the "predicted" document of the Examples, then I can use the preset_span_suggester, am I right?
The text was updated successfully, but these errors were encountered: