mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 04:10:20 +03:00
Correct test
This commit is contained in:
parent
c763c500d8
commit
c2c0a28ede
|
@ -208,6 +208,16 @@ def test_incomplete_data(lowercasing: bool):
|
||||||
xp = lemmatizer.model.ops.xp
|
xp = lemmatizer.model.ops.xp
|
||||||
|
|
||||||
# Missing annotations.
|
# Missing annotations.
|
||||||
|
if lowercasing:
|
||||||
|
assert xp.count_nonzero(dX[0][0][:-1]) == 0
|
||||||
|
assert xp.count_nonzero(dX[0][3][:-1]) == 0
|
||||||
|
assert xp.count_nonzero(dX[1][0][:-1]) == 0
|
||||||
|
assert xp.count_nonzero(dX[1][3][:-1]) == 0
|
||||||
|
|
||||||
|
# Misaligned annotations.
|
||||||
|
assert xp.count_nonzero(dX[1][1][:-1]) == 0
|
||||||
|
|
||||||
|
else:
|
||||||
assert xp.count_nonzero(dX[0][0]) == 0
|
assert xp.count_nonzero(dX[0][0]) == 0
|
||||||
assert xp.count_nonzero(dX[0][3]) == 0
|
assert xp.count_nonzero(dX[0][3]) == 0
|
||||||
assert xp.count_nonzero(dX[1][0]) == 0
|
assert xp.count_nonzero(dX[1][0]) == 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user