mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-10 07:04:53 +03:00
Fix handling of tuple-valued tags in Tagger
This commit is contained in:
parent
9c5c940441
commit
6d42e0ad8e
|
@ -503,6 +503,8 @@ class Tagger(Pipe):
|
|||
elif isinstance(tag, list): # Leave these latent for now.
|
||||
correct[idx] = guesses[idx]
|
||||
else:
|
||||
if isinstance(tag, tuple):
|
||||
tag = tag[0]
|
||||
correct[idx] = tag_index[tag]
|
||||
idx += 1
|
||||
correct = self.model.ops.xp.array(correct, dtype='i')
|
||||
|
|
Loading…
Reference in New Issue
Block a user