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