mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-06 06:30:35 +03:00
Fix parser declaration
This commit is contained in:
parent
29d39d8a34
commit
2efe01bf26
|
@ -273,6 +273,7 @@ cdef class Parser:
|
||||||
[eg.predicted for eg in examples])
|
[eg.predicted for eg in examples])
|
||||||
states, golds, max_steps = self.moves.init_gold_batch(examples)
|
states, golds, max_steps = self.moves.init_gold_batch(examples)
|
||||||
all_states = list(states)
|
all_states = list(states)
|
||||||
|
states_golds = zip(states, golds)
|
||||||
for _ in range(max_steps):
|
for _ in range(max_steps):
|
||||||
if not states_golds:
|
if not states_golds:
|
||||||
break
|
break
|
||||||
|
@ -353,7 +354,6 @@ cdef class Parser:
|
||||||
|
|
||||||
def get_batch_loss(self, states, golds, float[:, ::1] scores, losses):
|
def get_batch_loss(self, states, golds, float[:, ::1] scores, losses):
|
||||||
cdef StateClass state
|
cdef StateClass state
|
||||||
cdef Example example
|
|
||||||
cdef Pool mem = Pool()
|
cdef Pool mem = Pool()
|
||||||
cdef int i
|
cdef int i
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user