Skip to content

spancat - only one label being learned #8967

Discussion options

You must be logged in to vote

Ah, I think this may just be a known bug in the scorer. If you run the model and inspect docs, do you see that some of the nested spans are labeled as expected?

The scorer has the value for allow_overlap set incorrectly. You can edit this line in spacy/pipeline/spancat.py to fix it:

-        kwargs.setdefault("multi_label", True)
+        kwargs.setdefault("allow_overlap", True)

This is fixed in develop for the upcoming v3.2, but we need to backport it to the next v3.1.x release, too.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@lnatspacy
Comment options

Comment options

You must be logged in to vote
4 replies
@lnatspacy
Comment options

@adrianeboyd
Comment options

@lnatspacy
Comment options

@svlandeg
Comment options

Answer selected by lnatspacy
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
training Training and updating models feat / spancat Feature: Span Categorizer
4 participants