mirror of https://github.com/explosion/spaCy.git
* Fix Reduce oracle. Getting 86.35
This commit is contained in:
parent
bb09b5d91a
commit
b7b18c279d
|
@ -149,10 +149,7 @@ cdef class Reduce:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef inline int move_cost(StateClass st, const GoldParseC* gold) nogil:
|
cdef inline int move_cost(StateClass st, const GoldParseC* gold) nogil:
|
||||||
if st.shifted[st.S(0)]:
|
|
||||||
return pop_cost(st, gold, st.S(0))
|
return pop_cost(st, gold, st.S(0))
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef inline int label_cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
cdef inline int label_cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
||||||
|
@ -233,8 +230,9 @@ cdef class Break:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef int transition(StateClass st, int label) nogil:
|
cdef int transition(StateClass st, int label) nogil:
|
||||||
#st.set_sent_end()
|
#st.set_sent_start()
|
||||||
pass
|
while st.stack_depth() >= 2 and st.buffer_length() == 0:
|
||||||
|
Reduce.transition(st, -1)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef int cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
cdef int cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
||||||
|
|
Loading…
Reference in New Issue