mirror of https://github.com/explosion/spaCy.git
* Set const-correctness for Feature* array
This commit is contained in:
parent
6ab7e40590
commit
f72243b156
|
@ -68,7 +68,7 @@ cdef class GreedyParser:
|
||||||
|
|
||||||
cpdef int parse(self, Tokens tokens) except -1:
|
cpdef int parse(self, Tokens tokens) except -1:
|
||||||
cdef:
|
cdef:
|
||||||
Feature* feats
|
const Feature* feats
|
||||||
const weight_t* scores
|
const weight_t* scores
|
||||||
Transition guess
|
Transition guess
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ cdef class GreedyParser:
|
||||||
|
|
||||||
def train_sent(self, Tokens tokens, list gold_heads, list gold_labels):
|
def train_sent(self, Tokens tokens, list gold_heads, list gold_labels):
|
||||||
cdef:
|
cdef:
|
||||||
Feature* feats
|
const Feature* feats
|
||||||
weight_t* scores
|
const weight_t* scores
|
||||||
Transition guess
|
Transition guess
|
||||||
Transition gold
|
Transition gold
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue