From 195d998a127f7f83e8c423af6085b6163e34adc2 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Oct 2016 17:05:09 +0200 Subject: [PATCH] Fix GoldParse argument to tagger.update --- spacy/tagger.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/tagger.pyx b/spacy/tagger.pyx index b00c0a31c..c834dcfac 100644 --- a/spacy/tagger.pyx +++ b/spacy/tagger.pyx @@ -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: