mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
* Neaten oracle
This commit is contained in:
parent
66cb4f96e1
commit
8f84e8a78b
|
@ -32,23 +32,21 @@ cdef int set_accept_if_oracle(Move* moves, int n, State* s,
|
|||
g_start = g_starts[s.curr.start]
|
||||
g_end = g_ends[s.curr.start]
|
||||
accept_o = False
|
||||
if g_start == s.curr.start and g_end >= s.i:
|
||||
if g_end == s.i:
|
||||
accept_r = True
|
||||
r_label = g_labels[s.curr.start]
|
||||
accept_s = False
|
||||
else:
|
||||
accept_s = True
|
||||
accept_r = False
|
||||
if g_start == s.curr.start and g_end == s.i:
|
||||
accept_r = True
|
||||
r_label = g_labels[s.curr.start]
|
||||
accept_s = False
|
||||
elif g_start == s.curr.start and g_end > s.i:
|
||||
accept_s = True
|
||||
accept_r = False
|
||||
elif g_starts[s.i] == s.i:
|
||||
accept_r = True
|
||||
r_label = 0
|
||||
accept_s = False
|
||||
else:
|
||||
if g_starts[s.i] == s.i:
|
||||
accept_r = True
|
||||
r_label = 0
|
||||
accept_s = False
|
||||
else:
|
||||
accept_r = True
|
||||
accept_s = True
|
||||
r_label = 0
|
||||
accept_r = True
|
||||
accept_s = True
|
||||
r_label = 0
|
||||
else:
|
||||
accept_r = False
|
||||
if g_starts[s.i] == s.i:
|
||||
|
|
Loading…
Reference in New Issue
Block a user