diff --git a/requirements.txt b/requirements.txt index 9ce19a4e0..f4eccb86c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ pathlib numpy>=1.7 cymem>=1.30,<1.32 preshed>=0.46.4,<0.47.0 -thinc>=5.0.0,<5.1.0 +thinc>=6.0.0,<6.1.0 murmurhash>=0.26,<0.27 plac<0.9.3 six diff --git a/setup.py b/setup.py index 4ba997a0c..b3af17e00 100644 --- a/setup.py +++ b/setup.py @@ -235,7 +235,7 @@ def setup_package(): 'murmurhash>=0.26,<0.27', 'cymem>=1.30,<1.32', 'preshed>=0.46.0,<0.47.0', - 'thinc>=5.0.0,<5.1.0', + 'thinc>=6.0.0,<6.1.0', 'plac', 'six', 'cloudpickle', diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index eb094fa97..50ded884f 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -255,10 +255,10 @@ cdef class Parser: cdef weight_t loss = 0 cdef Transition action while not stcls.is_final(): - self.model.set_featuresC(&eg.c, stcls.c) + self.model.set_featuresC(eg.c, stcls.c) self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold) self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat) - self.model.updateC(&eg.c) + self.model.updateC(eg.c) guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class) action = self.moves.c[eg.guess] @@ -343,7 +343,7 @@ cdef class StepwiseState: def predict(self): self.eg.reset() - self.parser.model.set_featuresC(&self.eg.c, self.stcls.c) + self.parser.model.set_featuresC(self.eg.c, self.stcls.c) self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c) self.parser.model.set_scoresC(self.eg.c.scores, self.eg.c.features, self.eg.c.nr_feat) diff --git a/spacy/tagger.pyx b/spacy/tagger.pyx index 7903c44fb..c8968f55d 100644 --- a/spacy/tagger.pyx +++ b/spacy/tagger.pyx @@ -192,7 +192,7 @@ cdef class Tagger: nr_feat=self.model.nr_feat) for i in range(tokens.length): if tokens.c[i].pos == 0: - self.model.set_featuresC(&eg.c, tokens.c, i) + self.model.set_featuresC(eg.c, tokens.c, i) self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat) guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class) @@ -244,11 +244,11 @@ cdef class Tagger: nr_class=self.vocab.morphology.n_tags, nr_feat=self.model.nr_feat) for i in range(tokens.length): - self.model.set_featuresC(&eg.c, tokens.c, i) + self.model.set_featuresC(eg.c, tokens.c, i) eg.costs = [ 1 if golds[i] not in (c, -1) else 0 for c in xrange(eg.nr_class) ] self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat) - self.model.updateC(&eg.c) + self.model.updateC(eg.c) self.vocab.morphology.assign_tag_id(&tokens.c[i], eg.guess)