diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index 9a071ae14..e2c2b41c7 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -529,8 +529,6 @@ cdef class Parser: const float* feat_weights, int nr_class, int nr_feat, int nr_piece) nogil: '''This only works with no hidden layers -- fast but inaccurate''' - #for i in cython.parallel.prange(next_step.size(), num_threads=4, nogil=True): - # self._parse_step(next_step[i], feat_weights, nr_class, nr_feat) token_ids = calloc(nr_feat, sizeof(int)) scores = calloc(nr_class * nr_piece, sizeof(float)) is_valid = calloc(nr_class, sizeof(int)) diff --git a/spacy/syntax/stateclass.pyx b/spacy/syntax/stateclass.pyx index 9c179820c..ddd1f558c 100644 --- a/spacy/syntax/stateclass.pyx +++ b/spacy/syntax/stateclass.pyx @@ -62,27 +62,3 @@ cdef class StateClass: n0 = words[self.B(0)] n1 = words[self.B(1)] return ' '.join((third, second, top, '|', n0, n1)) - - @classmethod - def nr_context_tokens(cls): - return 13 - - def set_context_tokens(self, int[::1] output): - output[0] = self.B(0) - output[1] = self.B(1) - output[2] = self.S(0) - output[3] = self.S(1) - output[4] = self.S(2) - output[5] = self.L(self.S(0), 1) - output[6] = self.L(self.S(0), 2) - output[6] = self.R(self.S(0), 1) - output[7] = self.L(self.B(0), 1) - output[8] = self.R(self.S(0), 2) - output[9] = self.L(self.S(1), 1) - output[10] = self.L(self.S(1), 2) - output[11] = self.R(self.S(1), 1) - output[12] = self.R(self.S(1), 2) - - for i in range(13): - if output[i] != -1: - output[i] += self.c.offset