Alignment between ParserStepModel output scores dim and EntityRecognizer.move_names off by 1 #10157
-
Hi there! I'm trying to match the output scores from the ParserStepModel's forward pass with the available actions, but I'm finding that the output scores produced in line 329 of If I have a single label in my dataset then the Spacy version |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I see that the discrepancy might be because the first element corresponds to a "U-" token which is then removed when fetching the |
Beta Was this translation helpful? Give feedback.
-
The list from |
Beta Was this translation helpful? Give feedback.
U-
is used internally for blocked entities, which are tokens that are marked as not being allowed to be part of any entity, soner
won't predict any entity spans that include them. This feature isn't used that frequently, but it's supported byDoc.set_ents
andner
.The list from
move_names
is only for display to the user (not for anything internal in the parser), so my guess is that it's removed here to avoid confusion related to an "invalid-looking" tag that users wouldn't be expecting.