mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-03 19:08:06 +03:00
Fix handling of unseen labels in tagger
This commit is contained in:
parent
5b56aad4c2
commit
5a65418c40
|
@ -501,7 +501,7 @@ class Tagger(Pipe):
|
|||
cdef int idx = 0
|
||||
correct = numpy.zeros((scores.shape[0],), dtype='i')
|
||||
guesses = scores.argmax(axis=1)
|
||||
known_labels = numpy.ones((scores.shape[0],), dtype='f')
|
||||
known_labels = numpy.ones((scores.shape[0], 1), dtype='f')
|
||||
for gold in golds:
|
||||
for tag in gold.tags:
|
||||
if tag is None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user