mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Fix GoldParse argument to tagger.update
This commit is contained in:
parent
274a4d4272
commit
195d998a12
|
@ -211,6 +211,8 @@ cdef class Tagger:
|
|||
def update(self, Doc tokens, object gold):
|
||||
if hasattr(gold, 'tags'):
|
||||
gold_tag_strs = list(gold.tags)
|
||||
else:
|
||||
gold_tag_strs = gold
|
||||
assert len(tokens) == len(gold_tag_strs)
|
||||
for tag in gold_tag_strs:
|
||||
if tag != None and tag not in self.tag_names:
|
||||
|
|
Loading…
Reference in New Issue
Block a user