mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 18:12:00 +03:00
remove duplicate declaration
This commit is contained in:
parent
afc3a5a4af
commit
e847487ebb
|
@ -712,9 +712,8 @@ class SpanCategorizer(TrainablePipe):
|
|||
) -> SpanGroup:
|
||||
"""Find the argmax label for each span."""
|
||||
# Handle cases when there are zero suggestions
|
||||
spans = SpanGroup(doc, name=self.key)
|
||||
if scores.size == 0:
|
||||
return spans
|
||||
return SpanGroup(doc, name=self.key)
|
||||
scores = self.model.ops.to_numpy(scores)
|
||||
indices = self.model.ops.to_numpy(indices)
|
||||
predicted = scores.argmax(axis=1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user