mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
spancat: replace a cast by an assertion
This commit is contained in:
parent
b828954fb6
commit
0bd5730d16
|
@ -311,8 +311,9 @@ class SpanCategorizer(TrainablePipe):
|
||||||
labels = self.labels
|
labels = self.labels
|
||||||
|
|
||||||
indices = activations["indices"]
|
indices = activations["indices"]
|
||||||
|
scores = activations["scores"]
|
||||||
assert isinstance(indices, Ragged)
|
assert isinstance(indices, Ragged)
|
||||||
scores = cast(Floats2d, activations["scores"])
|
assert isinstance(scores, Floats2d)
|
||||||
|
|
||||||
offset = 0
|
offset = 0
|
||||||
for i, doc in enumerate(docs):
|
for i, doc in enumerate(docs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user