mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-28 21:03:41 +03:00
Revert "Improve parser oracle around sentence breaks."
This reverts commit 50817dc9ad
.
This commit is contained in:
parent
f0478635df
commit
36e481c584
|
@ -110,8 +110,7 @@ cdef bint _is_gold_root(const GoldParseC* gold, int word) nogil:
|
||||||
cdef class Shift:
|
cdef class Shift:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
||||||
sent_start = st._sent[st.B_(0).l_edge].sent_start
|
return st.buffer_length() >= 2 and not st.shifted[st.B(0)] and st.B_(0).sent_start != 1
|
||||||
return st.buffer_length() >= 2 and not st.shifted[st.B(0)] and sent_start != 1
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef int transition(StateC* st, attr_t label) nogil:
|
cdef int transition(StateC* st, attr_t label) nogil:
|
||||||
|
@ -171,8 +170,7 @@ cdef class Reduce:
|
||||||
cdef class LeftArc:
|
cdef class LeftArc:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
||||||
sent_start = st._sent[st.B_(0).l_edge].sent_start
|
return st.B_(0).sent_start != 1
|
||||||
return sent_start != 1
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef int transition(StateC* st, attr_t label) nogil:
|
cdef int transition(StateC* st, attr_t label) nogil:
|
||||||
|
@ -207,8 +205,7 @@ cdef class RightArc:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
cdef bint is_valid(const StateC* st, attr_t label) nogil:
|
||||||
# If there's (perhaps partial) parse pre-set, don't allow cycle.
|
# If there's (perhaps partial) parse pre-set, don't allow cycle.
|
||||||
sent_start = st._sent[st.B_(0).l_edge].sent_start
|
return st.B_(0).sent_start != 1 and st.H(st.S(0)) != st.B(0)
|
||||||
return sent_start != 1 and st.H(st.S(0)) != st.B(0)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef int transition(StateC* st, attr_t label) nogil:
|
cdef int transition(StateC* st, attr_t label) nogil:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user